diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 324b65c3ebd..a2567d7cb1e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -31360,6 +31360,522 @@ components: required: - databaseMonitoringTrigger type: object + DatabricksCloudCostMetricsIntegrationDataflowRequest: + description: The Databricks cloud cost metrics dataflow. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest" + type: object + DatabricksCloudCostMetricsIntegrationDataflowResponse: + description: The Databricks cloud cost metrics dataflow. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse" + type: object + DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the Databricks cloud cost metrics dataflow. Only the fields provided are changed. + properties: + ccm_collect_all_workspaces: + description: Whether cost data is collected for every workspace in the Databricks account rather than this workspace only. + example: true + type: boolean + type: object + DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse: + description: Settings of the Databricks cloud cost metrics dataflow. + properties: + ccm_collect_all_workspaces: + description: Whether cost data is collected for every workspace in the Databricks account rather than this workspace only. + example: true + type: boolean + type: object + DatabricksDataJobMonitoringIntegrationDataflowRequest: + description: The Databricks Data Jobs Monitoring dataflow. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest" + type: object + DatabricksDataJobMonitoringIntegrationDataflowResponse: + description: The Databricks Data Jobs Monitoring dataflow. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse" + type: object + DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the Databricks Data Jobs Monitoring dataflow. Only the fields provided are changed. + properties: + dd_api_key_id: + description: >- + ID of the Datadog API key the global init script uses to submit data. Setting or changing it requires `dd_api_key_secret` in the same request. + example: fe383f4e-09fc-46bf-8e10-4efdd453a646 + type: string + dd_api_key_secret: + description: Secret value of the Datadog API key identified by `dd_api_key_id`. + example: your-datadog-api-key + type: string + writeOnly: true + djm_global_init_script_enabled: + description: Whether Datadog manages the global init script that installs the Agent on your Databricks clusters. + example: true + type: boolean + script_gpum_enabled: + description: >- + Whether GPU metrics are collected from your Databricks clusters. The Agent installed by the global init script performs the collection, so this requires the dataflow to be enabled with `djm_global_init_script_enabled` set to `true`. + example: true + type: boolean + script_logs_enabled: + description: >- + Whether logs are collected from your Databricks clusters. The Agent installed by the global init script performs the collection, so this requires the dataflow to be enabled with `djm_global_init_script_enabled` set to `true`. + example: true + type: boolean + type: object + DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse: + description: Settings of the Databricks Data Jobs Monitoring dataflow. + properties: + dd_api_key_id: + description: ID of the Datadog API key the global init script uses to submit data. + example: fe383f4e-09fc-46bf-8e10-4efdd453a646 + type: string + djm_global_init_script_enabled: + description: Whether Datadog manages the global init script that installs the Agent on your Databricks clusters. + example: true + type: boolean + script_gpum_enabled: + description: >- + Whether GPU metrics are collected from your Databricks clusters. The Agent installed by the global init script performs the collection, so this requires the dataflow to be enabled with `djm_global_init_script_enabled` set to `true`. + example: true + type: boolean + script_logs_enabled: + description: >- + Whether logs are collected from your Databricks clusters. The Agent installed by the global init script performs the collection, so this requires the dataflow to be enabled with `djm_global_init_script_enabled` set to `true`. + example: true + type: boolean + type: object + DatabricksDataObservabilityIntegrationDataflowRequest: + description: The Databricks data observability dataflow. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityIntegrationDataflowSettingsRequest" + type: object + DatabricksDataObservabilityIntegrationDataflowResponse: + description: The Databricks data observability dataflow. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityIntegrationDataflowSettingsResponse" + type: object + DatabricksDataObservabilityIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the Databricks data observability dataflow. Only the fields provided are changed. + properties: + do_crawlers_cron: + description: Cron expression setting how often the data observability crawlers run. + example: "0 * * * *" + type: string + sync_system_catalog: + description: Whether the Databricks `system` catalog is synchronized alongside your data catalogs. + example: true + type: boolean + type: object + DatabricksDataObservabilityIntegrationDataflowSettingsResponse: + description: Settings of the Databricks data observability dataflow. + properties: + do_crawlers_cron: + description: Cron expression setting how often the data observability crawlers run. + example: "0 * * * *" + type: string + sync_system_catalog: + description: Whether the Databricks `system` catalog is synchronized alongside your data catalogs. + example: true + type: boolean + type: object + DatabricksIntegrationAccountAuthenticationRequest: + description: >- + Authentication for creating the Databricks integration account. Exactly one method is set. Choosing `private-action-runner` leaves the `databricks-model-serving-metrics` dataflow unable to collect data. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthRequest" + - $ref: "#/components/schemas/IntegrationAccountPrivateActionRunnerAuthRequest" + DatabricksIntegrationAccountAuthenticationResponse: + description: Authentication configured on the Databricks integration account. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthResponse" + - $ref: "#/components/schemas/IntegrationAccountPrivateActionRunnerAuthResponse" + - $ref: "#/components/schemas/DatabricksIntegrationAccountPatAuthResponse" + DatabricksIntegrationAccountAuthenticationUpdate: + description: >- + Authentication for updating the Databricks integration account. Exactly one method is set. Choosing `private-action-runner` leaves the `databricks-model-serving-metrics` dataflow unable to collect data. `pat` is accepted only on accounts that already use it, so it cannot move an account onto personal access token authentication. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthUpdate" + - $ref: "#/components/schemas/IntegrationAccountPrivateActionRunnerAuthRequest" + - $ref: "#/components/schemas/DatabricksIntegrationAccountPatAuthUpdate" + DatabricksIntegrationAccountCreateAttributes: + description: Writable attributes used to create a Databricks integration account. + properties: + authentication: + $ref: "#/components/schemas/DatabricksIntegrationAccountAuthenticationRequest" + dataflows: + $ref: "#/components/schemas/DatabricksIntegrationDataflowsRequest" + name: + description: Human-readable name of the Databricks integration account. + example: My Databricks Workspace + type: string + settings: + $ref: "#/components/schemas/DatabricksIntegrationAccountSettingsRequest" + required: + - name + - authentication + - settings + type: object + DatabricksIntegrationAccountCreateData: + description: Data envelope for creating a Databricks integration account. + properties: + attributes: + $ref: "#/components/schemas/DatabricksIntegrationAccountCreateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + DatabricksIntegrationAccountCreateRequest: + description: Request payload to create a Databricks integration account. + properties: + data: + $ref: "#/components/schemas/DatabricksIntegrationAccountCreateData" + required: + - data + type: object + DatabricksIntegrationAccountOAuthAuthRequest: + additionalProperties: false + description: Databricks OAuth machine-to-machine authentication using a service principal. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthType" + azure_tenant_id: + description: Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + example: 4d3bac44-0230-4732-9e70-cc00736f0a97 + type: string + client_id: + description: Client ID of the Databricks service principal. + example: 5c10654a-b3a3-4840-b37f-f477590c70a0 + type: string + client_secret: + description: Secret of the Databricks service principal. + example: your-client-secret + type: string + writeOnly: true + required: + - auth_type + - client_id + - client_secret + type: object + DatabricksIntegrationAccountOAuthAuthResponse: + description: The Databricks OAuth authentication method and service principal configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthType" + azure_tenant_id: + description: Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + example: 4d3bac44-0230-4732-9e70-cc00736f0a97 + type: string + client_id: + description: Client ID of the Databricks service principal. + example: 5c10654a-b3a3-4840-b37f-f477590c70a0 + type: string + required: + - auth_type + - client_id + type: object + DatabricksIntegrationAccountOAuthAuthType: + default: databricks-oauth + description: The authentication method type. + enum: + - databricks-oauth + example: databricks-oauth + type: string + x-enum-varnames: + - DATABRICKS_OAUTH + DatabricksIntegrationAccountOAuthAuthUpdate: + additionalProperties: false + description: >- + Databricks OAuth machine-to-machine authentication using a service principal. Omit `client_secret` to keep the stored one; `client_id` must be provided on every submission. Omitting `azure_tenant_id` clears it. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthType" + azure_tenant_id: + description: Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + example: 4d3bac44-0230-4732-9e70-cc00736f0a97 + type: string + client_id: + description: Client ID of the Databricks service principal. + example: 5c10654a-b3a3-4840-b37f-f477590c70a0 + type: string + client_secret: + description: Secret of the Databricks service principal. + example: your-client-secret + type: string + writeOnly: true + required: + - auth_type + - client_id + type: object + DatabricksIntegrationAccountPatAuthResponse: + deprecated: true + description: >- + The Databricks personal access token authentication method configured on the account. Deprecated: migrate these accounts to `databricks-oauth` or `private-action-runner`. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountPatAuthType" + required: + - auth_type + type: object + DatabricksIntegrationAccountPatAuthType: + default: pat + description: The authentication method type. + enum: + - pat + example: pat + type: string + x-enum-varnames: + - PAT + DatabricksIntegrationAccountPatAuthUpdate: + additionalProperties: false + deprecated: true + description: >- + Databricks personal access token authentication. Deprecated: accepted only on accounts that already use it, and never on creation. Use `databricks-oauth` or `private-action-runner` instead. Omit `token` to keep the stored one. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountPatAuthType" + token: + description: Secret Databricks personal access token. + example: your-personal-access-token + type: string + writeOnly: true + required: + - auth_type + type: object + DatabricksIntegrationAccountResponse: + description: Response payload for a single Databricks integration account. + properties: + data: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponseData" + required: + - data + type: object + DatabricksIntegrationAccountResponseAttributes: + description: Attributes of a Databricks integration account returned in responses. + properties: + authentication: + $ref: "#/components/schemas/DatabricksIntegrationAccountAuthenticationResponse" + dataflows: + $ref: "#/components/schemas/DatabricksIntegrationDataflowsResponse" + name: + description: Human-readable name of the Databricks integration account. + example: My Databricks Workspace + type: string + settings: + $ref: "#/components/schemas/DatabricksIntegrationAccountSettingsResponse" + required: + - name + - settings + type: object + DatabricksIntegrationAccountResponseData: + description: Data envelope of a Databricks integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponseAttributes" + id: + description: Server-generated unique identifier of the Databricks integration account. + example: a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - attributes + - type + type: object + DatabricksIntegrationAccountSettingsRequest: + additionalProperties: false + description: Settings for creating the Databricks integration account. + properties: + system_tables_sql_warehouse_id: + description: ID of the SQL warehouse used to query the Databricks system tables. + example: aba7c023d4172910 + type: string + workspace_url: + description: URL of the Databricks workspace. + example: "https://dbc-1234abcd.cloud.databricks.com" + type: string + required: + - workspace_url + type: object + DatabricksIntegrationAccountSettingsResponse: + description: Settings configured on the Databricks integration account. + properties: + system_tables_sql_warehouse_id: + description: ID of the SQL warehouse used to query the Databricks system tables. + example: aba7c023d4172910 + type: string + workspace_url: + description: URL of the Databricks workspace. + example: "https://dbc-1234abcd.cloud.databricks.com" + type: string + required: + - workspace_url + type: object + DatabricksIntegrationAccountSettingsUpdate: + additionalProperties: false + description: Settings for updating the Databricks integration account. Only the fields provided are changed. + properties: + system_tables_sql_warehouse_id: + description: ID of the SQL warehouse used to query the Databricks system tables. + example: aba7c023d4172910 + type: string + workspace_url: + description: URL of the Databricks workspace. + example: "https://dbc-1234abcd.cloud.databricks.com" + type: string + type: object + DatabricksIntegrationAccountUpdateAttributes: + description: >- + Writable attributes used to update a Databricks integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration, as do the settings of an included dataflow that provides only `enabled`. + properties: + authentication: + $ref: "#/components/schemas/DatabricksIntegrationAccountAuthenticationUpdate" + dataflows: + $ref: "#/components/schemas/DatabricksIntegrationDataflowsRequest" + name: + description: Human-readable name of the Databricks integration account. + example: My Databricks Workspace + type: string + settings: + $ref: "#/components/schemas/DatabricksIntegrationAccountSettingsUpdate" + type: object + DatabricksIntegrationAccountUpdateData: + description: Data envelope for updating a Databricks integration account. + properties: + attributes: + $ref: "#/components/schemas/DatabricksIntegrationAccountUpdateAttributes" + id: + description: Unique identifier of the Databricks integration account to update. + example: a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + DatabricksIntegrationAccountUpdateRequest: + description: Request payload to update a Databricks integration account. + properties: + data: + $ref: "#/components/schemas/DatabricksIntegrationAccountUpdateData" + required: + - data + type: object + DatabricksIntegrationAccountsResponse: + description: Response payload for a list of Databricks integration accounts. + properties: + data: + description: List of Databricks integration accounts. + items: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponseData" + type: array + required: + - data + type: object + DatabricksIntegrationDataflowsRequest: + additionalProperties: false + description: >- + Dataflows to configure on the Databricks integration account, keyed by dataflow id. Some dataflows and settings have prerequisites, noted on each. Those prerequisites are not checked when the request is made, so anything left enabled without them is stored but collects no data. + properties: + databricks-cloud-cost-metrics: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowRequest" + databricks-data-job-monitoring: + $ref: "#/components/schemas/DatabricksDataJobMonitoringIntegrationDataflowRequest" + databricks-data-observability: + $ref: "#/components/schemas/DatabricksDataObservabilityIntegrationDataflowRequest" + databricks-model-serving-metrics: + $ref: "#/components/schemas/DatabricksModelServingMetricsIntegrationDataflowRequest" + databricks-serverless-jobs: + $ref: "#/components/schemas/DatabricksServerlessJobsIntegrationDataflowRequest" + type: object + DatabricksIntegrationDataflowsResponse: + description: Dataflows configured on the Databricks integration account, keyed by dataflow id. + properties: + databricks-cloud-cost-metrics: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowResponse" + databricks-data-job-monitoring: + $ref: "#/components/schemas/DatabricksDataJobMonitoringIntegrationDataflowResponse" + databricks-data-observability: + $ref: "#/components/schemas/DatabricksDataObservabilityIntegrationDataflowResponse" + databricks-model-serving-metrics: + $ref: "#/components/schemas/DatabricksModelServingMetricsIntegrationDataflowResponse" + databricks-serverless-jobs: + $ref: "#/components/schemas/DatabricksServerlessJobsIntegrationDataflowResponse" + type: object + DatabricksModelServingMetricsIntegrationDataflowRequest: + description: >- + The Databricks model serving metrics dataflow. Not supported on accounts that authenticate with `private-action-runner`; on those accounts this dataflow collects no data even when enabled. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + type: object + DatabricksModelServingMetricsIntegrationDataflowResponse: + description: >- + The Databricks model serving metrics dataflow. Not supported on accounts that authenticate with `private-action-runner`; on those accounts this dataflow collects no data even when enabled. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + type: object + DatabricksServerlessJobsIntegrationDataflowRequest: + description: The Databricks serverless jobs dataflow. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + type: object + DatabricksServerlessJobsIntegrationDataflowResponse: + description: The Databricks serverless jobs dataflow. + properties: + enabled: + description: Whether the Databricks dataflow is enabled. + example: true + type: boolean + type: object DatadogAPIKey: description: The definition of the `DatadogAPIKey` object. properties: @@ -53517,6 +54033,61 @@ components: type: string readOnly: true type: object + IntegrationAccountPrivateActionRunnerAuthRequest: + additionalProperties: false + description: >- + Private Action Runner authentication. The runner holds the credentials, so this method carries no secrets; `connection_id` and `user_uuid` must be provided on every submission. + properties: + auth_type: + $ref: "#/components/schemas/IntegrationAccountPrivateActionRunnerAuthType" + connection_id: + description: Unique identifier of the Private Action Runner connection holding the credentials. + example: 08356fb7-3ae3-4ea2-913e-b4cb1b7e7ec2 + type: string + secret_path: + description: Path of the credential inside the secret backend configured on the runner. + example: /vault/databricks/prod + type: string + user_uuid: + description: Unique identifier of the user the Private Action Runner connection belongs to. + example: ac470ea4-aa08-11f0-994d-da9212322ca2 + type: string + required: + - auth_type + - connection_id + - user_uuid + type: object + IntegrationAccountPrivateActionRunnerAuthResponse: + description: The Private Action Runner authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/IntegrationAccountPrivateActionRunnerAuthType" + connection_id: + description: Unique identifier of the Private Action Runner connection holding the credentials. + example: 08356fb7-3ae3-4ea2-913e-b4cb1b7e7ec2 + type: string + secret_path: + description: Path of the credential inside the secret backend configured on the runner. + example: /vault/databricks/prod + type: string + user_uuid: + description: Unique identifier of the user the Private Action Runner connection belongs to. + example: ac470ea4-aa08-11f0-994d-da9212322ca2 + type: string + required: + - auth_type + - connection_id + - user_uuid + type: object + IntegrationAccountPrivateActionRunnerAuthType: + default: private-action-runner + description: The authentication method type. + enum: + - private-action-runner + example: private-action-runner + type: string + x-enum-varnames: + - PRIVATE_ACTION_RUNNER IntegrationAccountType: default: integration-account description: The type of the integration account resource. Always `integration-account`. @@ -159672,6 +160243,308 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/databricks/accounts: + get: + description: List Databricks integration accounts. + operationId: ListDatabricksIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + auth_type: databricks-oauth + client_id: 5c10654a-b3a3-4840-b37f-f477590c70a0 + dataflows: + databricks-cloud-cost-metrics: + enabled: true + settings: + ccm_collect_all_workspaces: true + databricks-data-job-monitoring: + enabled: true + settings: + dd_api_key_id: fe383f4e-09fc-46bf-8e10-4efdd453a646 + djm_global_init_script_enabled: true + script_gpum_enabled: false + script_logs_enabled: true + databricks-data-observability: + enabled: true + settings: + do_crawlers_cron: "0 * * * *" + sync_system_catalog: true + databricks-model-serving-metrics: + enabled: false + databricks-serverless-jobs: + enabled: true + name: My Databricks Workspace + settings: + system_tables_sql_warehouse_id: aba7c023d4172910 + workspace_url: "https://dbc-1234abcd.cloud.databricks.com" + id: a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f + type: integration-account + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Databricks integration accounts + tags: + - Databricks Integration Accounts + "x-permission": + operator: OR + permissions: + - integrations_read + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a Databricks integration account. + operationId: CreateDatabricksIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: databricks-oauth + client_id: 5c10654a-b3a3-4840-b37f-f477590c70a0 + dataflows: + databricks-cloud-cost-metrics: + enabled: true + settings: + ccm_collect_all_workspaces: true + databricks-data-job-monitoring: + enabled: true + settings: + dd_api_key_id: fe383f4e-09fc-46bf-8e10-4efdd453a646 + djm_global_init_script_enabled: true + script_gpum_enabled: false + script_logs_enabled: true + databricks-data-observability: + enabled: true + settings: + do_crawlers_cron: "0 * * * *" + sync_system_catalog: true + databricks-model-serving-metrics: + enabled: false + databricks-serverless-jobs: + enabled: true + name: My Databricks Workspace + settings: + system_tables_sql_warehouse_id: aba7c023d4172910 + workspace_url: "https://dbc-1234abcd.cloud.databricks.com" + id: a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f + type: integration-account + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a Databricks integration account + tags: + - Databricks Integration Accounts + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/databricks/accounts/{account_id}: + delete: + description: Delete a Databricks integration account. + operationId: DeleteDatabricksIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a Databricks integration account + tags: + - Databricks Integration Accounts + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a Databricks integration account. + operationId: GetDatabricksIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: databricks-oauth + client_id: 5c10654a-b3a3-4840-b37f-f477590c70a0 + dataflows: + databricks-cloud-cost-metrics: + enabled: true + settings: + ccm_collect_all_workspaces: true + databricks-data-job-monitoring: + enabled: true + settings: + dd_api_key_id: fe383f4e-09fc-46bf-8e10-4efdd453a646 + djm_global_init_script_enabled: true + script_gpum_enabled: false + script_logs_enabled: true + databricks-data-observability: + enabled: true + settings: + do_crawlers_cron: "0 * * * *" + sync_system_catalog: true + databricks-model-serving-metrics: + enabled: false + databricks-serverless-jobs: + enabled: true + name: My Databricks Workspace + settings: + system_tables_sql_warehouse_id: aba7c023d4172910 + workspace_url: "https://dbc-1234abcd.cloud.databricks.com" + id: a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f + type: integration-account + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a Databricks integration account + tags: + - Databricks Integration Accounts + "x-permission": + operator: OR + permissions: + - integrations_read + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a Databricks integration account. Only the fields provided are changed. + operationId: UpdateDatabricksIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: databricks-oauth + client_id: 5c10654a-b3a3-4840-b37f-f477590c70a0 + dataflows: + databricks-cloud-cost-metrics: + enabled: true + settings: + ccm_collect_all_workspaces: true + databricks-data-job-monitoring: + enabled: true + settings: + dd_api_key_id: fe383f4e-09fc-46bf-8e10-4efdd453a646 + djm_global_init_script_enabled: true + script_gpum_enabled: false + script_logs_enabled: true + databricks-data-observability: + enabled: true + settings: + do_crawlers_cron: "0 * * * *" + sync_system_catalog: true + databricks-model-serving-metrics: + enabled: false + databricks-serverless-jobs: + enabled: true + name: My Databricks Workspace + settings: + system_tables_sql_warehouse_id: aba7c023d4172910 + workspace_url: "https://dbc-1234abcd.cloud.databricks.com" + id: a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f + type: integration-account + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a Databricks integration account + tags: + - Databricks Integration Accounts + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration-interfaces/elastic-cloud/accounts: get: description: List Elastic Cloud integration accounts. @@ -223011,6 +223884,18 @@ tags: name: Data Deletion - description: Manage and run data observability monitors. name: Data Observability + - description: |- + Manage your Datadog Databricks integration accounts directly through the Datadog API. + Create, update, and delete accounts, configure authentication and settings, and + enable or disable dataflows such as Data Jobs Monitoring, serverless jobs, + cluster logs, GPU metrics, cloud cost metrics, data observability, and model serving + metrics. See the + [Databricks integration page](https://docs.datadoghq.com/integrations/databricks/) for + more information. + externalDocs: + description: Databricks integration. + url: https://docs.datadoghq.com/integrations/databricks/ + name: Databricks Integration Accounts - description: |- Data Access Controls in Datadog is a feature that allows administrators and access managers to regulate access to sensitive data. By defining Restricted Datasets, you can ensure that only specific teams or roles can diff --git a/examples/v2/databricks-integration-accounts/CreateDatabricksIntegrationAccount.java b/examples/v2/databricks-integration-accounts/CreateDatabricksIntegrationAccount.java new file mode 100644 index 00000000000..0b50b5eaf5f --- /dev/null +++ b/examples/v2/databricks-integration-accounts/CreateDatabricksIntegrationAccount.java @@ -0,0 +1,100 @@ +// Create a Databricks integration account returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DatabricksIntegrationAccountsApi; +import com.datadog.api.client.v2.model.DatabricksCloudCostMetricsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksDataJobMonitoringIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountAuthenticationRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountCreateAttributes; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountCreateData; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountCreateRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountOAuthAuthRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountOAuthAuthType; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountResponse; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationDataflowsRequest; +import com.datadog.api.client.v2.model.DatabricksModelServingMetricsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksServerlessJobsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.IntegrationAccountType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createDatabricksIntegrationAccount", true); + DatabricksIntegrationAccountsApi apiInstance = + new DatabricksIntegrationAccountsApi(defaultClient); + + DatabricksIntegrationAccountCreateRequest body = + new DatabricksIntegrationAccountCreateRequest() + .data( + new DatabricksIntegrationAccountCreateData() + .attributes( + new DatabricksIntegrationAccountCreateAttributes() + .authentication( + new DatabricksIntegrationAccountAuthenticationRequest( + new DatabricksIntegrationAccountOAuthAuthRequest() + .authType( + DatabricksIntegrationAccountOAuthAuthType + .DATABRICKS_OAUTH) + .azureTenantId("4d3bac44-0230-4732-9e70-cc00736f0a97") + .clientId("5c10654a-b3a3-4840-b37f-f477590c70a0") + .clientSecret("your-client-secret"))) + .dataflows( + new DatabricksIntegrationDataflowsRequest() + .databricksCloudCostMetrics( + new DatabricksCloudCostMetricsIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest() + .ccmCollectAllWorkspaces(true))) + .databricksDataJobMonitoring( + new DatabricksDataJobMonitoringIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest() + .ddApiKeyId( + "fe383f4e-09fc-46bf-8e10-4efdd453a646") + .ddApiKeySecret("your-datadog-api-key") + .djmGlobalInitScriptEnabled(true) + .scriptGpumEnabled(true) + .scriptLogsEnabled(true))) + .databricksDataObservability( + new DatabricksDataObservabilityIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksDataObservabilityIntegrationDataflowSettingsRequest() + .doCrawlersCron("0 * * * *") + .syncSystemCatalog(true))) + .databricksModelServingMetrics( + new DatabricksModelServingMetricsIntegrationDataflowRequest() + .enabled(true)) + .databricksServerlessJobs( + new DatabricksServerlessJobsIntegrationDataflowRequest() + .enabled(true))) + .name("My Databricks Workspace") + .settings( + new DatabricksIntegrationAccountSettingsRequest() + .systemTablesSqlWarehouseId("aba7c023d4172910") + .workspaceUrl("https://dbc-1234abcd.cloud.databricks.com"))) + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + DatabricksIntegrationAccountResponse result = + apiInstance.createDatabricksIntegrationAccount(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " DatabricksIntegrationAccountsApi#createDatabricksIntegrationAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/databricks-integration-accounts/DeleteDatabricksIntegrationAccount.java b/examples/v2/databricks-integration-accounts/DeleteDatabricksIntegrationAccount.java new file mode 100644 index 00000000000..3cf9edd4bfb --- /dev/null +++ b/examples/v2/databricks-integration-accounts/DeleteDatabricksIntegrationAccount.java @@ -0,0 +1,26 @@ +// Delete a Databricks integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DatabricksIntegrationAccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteDatabricksIntegrationAccount", true); + DatabricksIntegrationAccountsApi apiInstance = + new DatabricksIntegrationAccountsApi(defaultClient); + + try { + apiInstance.deleteDatabricksIntegrationAccount("account_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " DatabricksIntegrationAccountsApi#deleteDatabricksIntegrationAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/databricks-integration-accounts/GetDatabricksIntegrationAccount.java b/examples/v2/databricks-integration-accounts/GetDatabricksIntegrationAccount.java new file mode 100644 index 00000000000..736a9cedc2a --- /dev/null +++ b/examples/v2/databricks-integration-accounts/GetDatabricksIntegrationAccount.java @@ -0,0 +1,29 @@ +// Get a Databricks integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DatabricksIntegrationAccountsApi; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getDatabricksIntegrationAccount", true); + DatabricksIntegrationAccountsApi apiInstance = + new DatabricksIntegrationAccountsApi(defaultClient); + + try { + DatabricksIntegrationAccountResponse result = + apiInstance.getDatabricksIntegrationAccount("account_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " DatabricksIntegrationAccountsApi#getDatabricksIntegrationAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/databricks-integration-accounts/ListDatabricksIntegrationAccounts.java b/examples/v2/databricks-integration-accounts/ListDatabricksIntegrationAccounts.java new file mode 100644 index 00000000000..85e2e441cea --- /dev/null +++ b/examples/v2/databricks-integration-accounts/ListDatabricksIntegrationAccounts.java @@ -0,0 +1,29 @@ +// List Databricks integration accounts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DatabricksIntegrationAccountsApi; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listDatabricksIntegrationAccounts", true); + DatabricksIntegrationAccountsApi apiInstance = + new DatabricksIntegrationAccountsApi(defaultClient); + + try { + DatabricksIntegrationAccountsResponse result = + apiInstance.listDatabricksIntegrationAccounts(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " DatabricksIntegrationAccountsApi#listDatabricksIntegrationAccounts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/databricks-integration-accounts/UpdateDatabricksIntegrationAccount.java b/examples/v2/databricks-integration-accounts/UpdateDatabricksIntegrationAccount.java new file mode 100644 index 00000000000..d0fc29f03e1 --- /dev/null +++ b/examples/v2/databricks-integration-accounts/UpdateDatabricksIntegrationAccount.java @@ -0,0 +1,101 @@ +// Update a Databricks integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DatabricksIntegrationAccountsApi; +import com.datadog.api.client.v2.model.DatabricksCloudCostMetricsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksDataJobMonitoringIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountAuthenticationUpdate; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountOAuthAuthType; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountOAuthAuthUpdate; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountResponse; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountSettingsUpdate; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountUpdateAttributes; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountUpdateData; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationDataflowsRequest; +import com.datadog.api.client.v2.model.DatabricksModelServingMetricsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksServerlessJobsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.IntegrationAccountType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateDatabricksIntegrationAccount", true); + DatabricksIntegrationAccountsApi apiInstance = + new DatabricksIntegrationAccountsApi(defaultClient); + + DatabricksIntegrationAccountUpdateRequest body = + new DatabricksIntegrationAccountUpdateRequest() + .data( + new DatabricksIntegrationAccountUpdateData() + .attributes( + new DatabricksIntegrationAccountUpdateAttributes() + .authentication( + new DatabricksIntegrationAccountAuthenticationUpdate( + new DatabricksIntegrationAccountOAuthAuthUpdate() + .authType( + DatabricksIntegrationAccountOAuthAuthType + .DATABRICKS_OAUTH) + .azureTenantId("4d3bac44-0230-4732-9e70-cc00736f0a97") + .clientId("5c10654a-b3a3-4840-b37f-f477590c70a0") + .clientSecret("your-client-secret"))) + .dataflows( + new DatabricksIntegrationDataflowsRequest() + .databricksCloudCostMetrics( + new DatabricksCloudCostMetricsIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest() + .ccmCollectAllWorkspaces(true))) + .databricksDataJobMonitoring( + new DatabricksDataJobMonitoringIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest() + .ddApiKeyId( + "fe383f4e-09fc-46bf-8e10-4efdd453a646") + .ddApiKeySecret("your-datadog-api-key") + .djmGlobalInitScriptEnabled(true) + .scriptGpumEnabled(true) + .scriptLogsEnabled(true))) + .databricksDataObservability( + new DatabricksDataObservabilityIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksDataObservabilityIntegrationDataflowSettingsRequest() + .doCrawlersCron("0 * * * *") + .syncSystemCatalog(true))) + .databricksModelServingMetrics( + new DatabricksModelServingMetricsIntegrationDataflowRequest() + .enabled(true)) + .databricksServerlessJobs( + new DatabricksServerlessJobsIntegrationDataflowRequest() + .enabled(true))) + .name("My Databricks Workspace") + .settings( + new DatabricksIntegrationAccountSettingsUpdate() + .systemTablesSqlWarehouseId("aba7c023d4172910") + .workspaceUrl("https://dbc-1234abcd.cloud.databricks.com"))) + .id("a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f") + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + DatabricksIntegrationAccountResponse result = + apiInstance.updateDatabricksIntegrationAccount("account_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " DatabricksIntegrationAccountsApi#updateDatabricksIntegrationAccount"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 9635aa7aab5..f83dbacc894 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1222,6 +1222,11 @@ public class ApiClient { put("v2.updateIncidentUserDefinedField", false); put("v2.updateIncidentUserDefinedRole", false); put("v2.updateTimestampOverride", false); + put("v2.createDatabricksIntegrationAccount", false); + put("v2.deleteDatabricksIntegrationAccount", false); + put("v2.getDatabricksIntegrationAccount", false); + put("v2.listDatabricksIntegrationAccounts", false); + put("v2.updateDatabricksIntegrationAccount", false); put("v2.createElasticCloudIntegrationAccount", false); put("v2.deleteElasticCloudIntegrationAccount", false); put("v2.getElasticCloudIntegrationAccount", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/DatabricksIntegrationAccountsApi.java b/src/main/java/com/datadog/api/client/v2/api/DatabricksIntegrationAccountsApi.java new file mode 100644 index 00000000000..415d3e04e50 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/DatabricksIntegrationAccountsApi.java @@ -0,0 +1,849 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountCreateRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountResponse; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.DatabricksIntegrationAccountsResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountsApi { + private ApiClient apiClient; + + public DatabricksIntegrationAccountsApi() { + this(ApiClient.getDefaultApiClient()); + } + + public DatabricksIntegrationAccountsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create a Databricks integration account. + * + *

See {@link #createDatabricksIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return DatabricksIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public DatabricksIntegrationAccountResponse createDatabricksIntegrationAccount( + DatabricksIntegrationAccountCreateRequest body) throws ApiException { + return createDatabricksIntegrationAccountWithHttpInfo(body).getData(); + } + + /** + * Create a Databricks integration account. + * + *

See {@link #createDatabricksIntegrationAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<DatabricksIntegrationAccountResponse> + */ + public CompletableFuture + createDatabricksIntegrationAccountAsync(DatabricksIntegrationAccountCreateRequest body) { + return createDatabricksIntegrationAccountWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a Databricks integration account. + * + * @param body (required) + * @return ApiResponse<DatabricksIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 The server cannot process the request because it contains invalid data. -
429 Too many requests -
+ */ + public ApiResponse + createDatabricksIntegrationAccountWithHttpInfo(DatabricksIntegrationAccountCreateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createDatabricksIntegrationAccount"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling createDatabricksIntegrationAccount"); + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/databricks/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.createDatabricksIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a Databricks integration account. + * + *

See {@link #createDatabricksIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<DatabricksIntegrationAccountResponse>> + */ + public CompletableFuture> + createDatabricksIntegrationAccountWithHttpInfoAsync( + DatabricksIntegrationAccountCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createDatabricksIntegrationAccount"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " createDatabricksIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/databricks/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.createDatabricksIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete a Databricks integration account. + * + *

See {@link #deleteDatabricksIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @throws ApiException if fails to make API call + */ + public void deleteDatabricksIntegrationAccount(String accountId) throws ApiException { + deleteDatabricksIntegrationAccountWithHttpInfo(accountId); + } + + /** + * Delete a Databricks integration account. + * + *

See {@link #deleteDatabricksIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteDatabricksIntegrationAccountAsync(String accountId) { + return deleteDatabricksIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a Databricks integration account. + * + * @param accountId Unique identifier of the integration account. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteDatabricksIntegrationAccountWithHttpInfo(String accountId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteDatabricksIntegrationAccount"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " deleteDatabricksIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/databricks/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.deleteDatabricksIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a Databricks integration account. + * + *

See {@link #deleteDatabricksIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteDatabricksIntegrationAccountWithHttpInfoAsync( + String accountId) { + // Check if unstable operation is enabled + String operationId = "deleteDatabricksIntegrationAccount"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " deleteDatabricksIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/databricks/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.deleteDatabricksIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get a Databricks integration account. + * + *

See {@link #getDatabricksIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return DatabricksIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public DatabricksIntegrationAccountResponse getDatabricksIntegrationAccount(String accountId) + throws ApiException { + return getDatabricksIntegrationAccountWithHttpInfo(accountId).getData(); + } + + /** + * Get a Databricks integration account. + * + *

See {@link #getDatabricksIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<DatabricksIntegrationAccountResponse> + */ + public CompletableFuture + getDatabricksIntegrationAccountAsync(String accountId) { + return getDatabricksIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a Databricks integration account. + * + * @param accountId Unique identifier of the integration account. (required) + * @return ApiResponse<DatabricksIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + getDatabricksIntegrationAccountWithHttpInfo(String accountId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getDatabricksIntegrationAccount"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " getDatabricksIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/databricks/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.getDatabricksIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a Databricks integration account. + * + *

See {@link #getDatabricksIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<DatabricksIntegrationAccountResponse>> + */ + public CompletableFuture> + getDatabricksIntegrationAccountWithHttpInfoAsync(String accountId) { + // Check if unstable operation is enabled + String operationId = "getDatabricksIntegrationAccount"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " getDatabricksIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/databricks/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.getDatabricksIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Databricks integration accounts. + * + *

See {@link #listDatabricksIntegrationAccountsWithHttpInfo}. + * + * @return DatabricksIntegrationAccountsResponse + * @throws ApiException if fails to make API call + */ + public DatabricksIntegrationAccountsResponse listDatabricksIntegrationAccounts() + throws ApiException { + return listDatabricksIntegrationAccountsWithHttpInfo().getData(); + } + + /** + * List Databricks integration accounts. + * + *

See {@link #listDatabricksIntegrationAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<DatabricksIntegrationAccountsResponse> + */ + public CompletableFuture + listDatabricksIntegrationAccountsAsync() { + return listDatabricksIntegrationAccountsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List Databricks integration accounts. + * + * @return ApiResponse<DatabricksIntegrationAccountsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + listDatabricksIntegrationAccountsWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listDatabricksIntegrationAccounts"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/databricks/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.listDatabricksIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Databricks integration accounts. + * + *

See {@link #listDatabricksIntegrationAccountsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<DatabricksIntegrationAccountsResponse>> + */ + public CompletableFuture> + listDatabricksIntegrationAccountsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listDatabricksIntegrationAccounts"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/databricks/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.listDatabricksIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a Databricks integration account. + * + *

See {@link #updateDatabricksIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return DatabricksIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public DatabricksIntegrationAccountResponse updateDatabricksIntegrationAccount( + String accountId, DatabricksIntegrationAccountUpdateRequest body) throws ApiException { + return updateDatabricksIntegrationAccountWithHttpInfo(accountId, body).getData(); + } + + /** + * Update a Databricks integration account. + * + *

See {@link #updateDatabricksIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<DatabricksIntegrationAccountResponse> + */ + public CompletableFuture + updateDatabricksIntegrationAccountAsync( + String accountId, DatabricksIntegrationAccountUpdateRequest body) { + return updateDatabricksIntegrationAccountWithHttpInfoAsync(accountId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a Databricks integration account. Only the fields provided are changed. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return ApiResponse<DatabricksIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 The server cannot process the request because it contains invalid data. -
429 Too many requests -
+ */ + public ApiResponse + updateDatabricksIntegrationAccountWithHttpInfo( + String accountId, DatabricksIntegrationAccountUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateDatabricksIntegrationAccount"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " updateDatabricksIntegrationAccount"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling updateDatabricksIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/databricks/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.updateDatabricksIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a Databricks integration account. + * + *

See {@link #updateDatabricksIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<DatabricksIntegrationAccountResponse>> + */ + public CompletableFuture> + updateDatabricksIntegrationAccountWithHttpInfoAsync( + String accountId, DatabricksIntegrationAccountUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateDatabricksIntegrationAccount"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " updateDatabricksIntegrationAccount")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateDatabricksIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/databricks/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DatabricksIntegrationAccountsApi.updateDatabricksIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowRequest.java new file mode 100644 index 00000000000..683fb11db8a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowRequest.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks cloud cost metrics dataflow. */ +@JsonPropertyOrder({ + DatabricksCloudCostMetricsIntegrationDataflowRequest.JSON_PROPERTY_ENABLED, + DatabricksCloudCostMetricsIntegrationDataflowRequest.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksCloudCostMetricsIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest settings; + + public DatabricksCloudCostMetricsIntegrationDataflowRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public DatabricksCloudCostMetricsIntegrationDataflowRequest settings( + DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the Databricks cloud cost metrics dataflow. Only the fields provided are changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest getSettings() { + return settings; + } + + public void setSettings(DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksCloudCostMetricsIntegrationDataflowRequest + */ + @JsonAnySetter + public DatabricksCloudCostMetricsIntegrationDataflowRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksCloudCostMetricsIntegrationDataflowRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksCloudCostMetricsIntegrationDataflowRequest + databricksCloudCostMetricsIntegrationDataflowRequest = + (DatabricksCloudCostMetricsIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, databricksCloudCostMetricsIntegrationDataflowRequest.enabled) + && Objects.equals( + this.settings, databricksCloudCostMetricsIntegrationDataflowRequest.settings) + && Objects.equals( + this.additionalProperties, + databricksCloudCostMetricsIntegrationDataflowRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksCloudCostMetricsIntegrationDataflowRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowResponse.java new file mode 100644 index 00000000000..acfa3f77b1f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowResponse.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks cloud cost metrics dataflow. */ +@JsonPropertyOrder({ + DatabricksCloudCostMetricsIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + DatabricksCloudCostMetricsIntegrationDataflowResponse.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksCloudCostMetricsIntegrationDataflowResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse settings; + + public DatabricksCloudCostMetricsIntegrationDataflowResponse enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public DatabricksCloudCostMetricsIntegrationDataflowResponse settings( + DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the Databricks cloud cost metrics dataflow. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse getSettings() { + return settings; + } + + public void setSettings(DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksCloudCostMetricsIntegrationDataflowResponse + */ + @JsonAnySetter + public DatabricksCloudCostMetricsIntegrationDataflowResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksCloudCostMetricsIntegrationDataflowResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksCloudCostMetricsIntegrationDataflowResponse + databricksCloudCostMetricsIntegrationDataflowResponse = + (DatabricksCloudCostMetricsIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, databricksCloudCostMetricsIntegrationDataflowResponse.enabled) + && Objects.equals( + this.settings, databricksCloudCostMetricsIntegrationDataflowResponse.settings) + && Objects.equals( + this.additionalProperties, + databricksCloudCostMetricsIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksCloudCostMetricsIntegrationDataflowResponse {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest.java new file mode 100644 index 00000000000..bc66cb817a0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest.java @@ -0,0 +1,96 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** Settings of the Databricks cloud cost metrics dataflow. Only the fields provided are changed. */ +@JsonPropertyOrder({ + DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest + .JSON_PROPERTY_CCM_COLLECT_ALL_WORKSPACES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CCM_COLLECT_ALL_WORKSPACES = + "ccm_collect_all_workspaces"; + private Boolean ccmCollectAllWorkspaces; + + public DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest ccmCollectAllWorkspaces( + Boolean ccmCollectAllWorkspaces) { + this.ccmCollectAllWorkspaces = ccmCollectAllWorkspaces; + return this; + } + + /** + * Whether cost data is collected for every workspace in the Databricks account rather than this + * workspace only. + * + * @return ccmCollectAllWorkspaces + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CCM_COLLECT_ALL_WORKSPACES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCcmCollectAllWorkspaces() { + return ccmCollectAllWorkspaces; + } + + public void setCcmCollectAllWorkspaces(Boolean ccmCollectAllWorkspaces) { + this.ccmCollectAllWorkspaces = ccmCollectAllWorkspaces; + } + + /** + * Return true if this DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest + databricksCloudCostMetricsIntegrationDataflowSettingsRequest = + (DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest) o; + return Objects.equals( + this.ccmCollectAllWorkspaces, + databricksCloudCostMetricsIntegrationDataflowSettingsRequest.ccmCollectAllWorkspaces); + } + + @Override + public int hashCode() { + return Objects.hash(ccmCollectAllWorkspaces); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest {\n"); + sb.append(" ccmCollectAllWorkspaces: ") + .append(toIndentedString(ccmCollectAllWorkspaces)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse.java new file mode 100644 index 00000000000..ef6c9e7d093 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse.java @@ -0,0 +1,153 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Settings of the Databricks cloud cost metrics dataflow. */ +@JsonPropertyOrder({ + DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse + .JSON_PROPERTY_CCM_COLLECT_ALL_WORKSPACES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CCM_COLLECT_ALL_WORKSPACES = + "ccm_collect_all_workspaces"; + private Boolean ccmCollectAllWorkspaces; + + public DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse ccmCollectAllWorkspaces( + Boolean ccmCollectAllWorkspaces) { + this.ccmCollectAllWorkspaces = ccmCollectAllWorkspaces; + return this; + } + + /** + * Whether cost data is collected for every workspace in the Databricks account rather than this + * workspace only. + * + * @return ccmCollectAllWorkspaces + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CCM_COLLECT_ALL_WORKSPACES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCcmCollectAllWorkspaces() { + return ccmCollectAllWorkspaces; + } + + public void setCcmCollectAllWorkspaces(Boolean ccmCollectAllWorkspaces) { + this.ccmCollectAllWorkspaces = ccmCollectAllWorkspaces; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse + */ + @JsonAnySetter + public DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse + databricksCloudCostMetricsIntegrationDataflowSettingsResponse = + (DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse) o; + return Objects.equals( + this.ccmCollectAllWorkspaces, + databricksCloudCostMetricsIntegrationDataflowSettingsResponse.ccmCollectAllWorkspaces) + && Objects.equals( + this.additionalProperties, + databricksCloudCostMetricsIntegrationDataflowSettingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ccmCollectAllWorkspaces, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse {\n"); + sb.append(" ccmCollectAllWorkspaces: ") + .append(toIndentedString(ccmCollectAllWorkspaces)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowRequest.java new file mode 100644 index 00000000000..9602d1f7020 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowRequest.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks Data Jobs Monitoring dataflow. */ +@JsonPropertyOrder({ + DatabricksDataJobMonitoringIntegrationDataflowRequest.JSON_PROPERTY_ENABLED, + DatabricksDataJobMonitoringIntegrationDataflowRequest.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataJobMonitoringIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest settings; + + public DatabricksDataJobMonitoringIntegrationDataflowRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public DatabricksDataJobMonitoringIntegrationDataflowRequest settings( + DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the Databricks Data Jobs Monitoring dataflow. Only the fields provided are changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest getSettings() { + return settings; + } + + public void setSettings(DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksDataJobMonitoringIntegrationDataflowRequest + */ + @JsonAnySetter + public DatabricksDataJobMonitoringIntegrationDataflowRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksDataJobMonitoringIntegrationDataflowRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataJobMonitoringIntegrationDataflowRequest + databricksDataJobMonitoringIntegrationDataflowRequest = + (DatabricksDataJobMonitoringIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, databricksDataJobMonitoringIntegrationDataflowRequest.enabled) + && Objects.equals( + this.settings, databricksDataJobMonitoringIntegrationDataflowRequest.settings) + && Objects.equals( + this.additionalProperties, + databricksDataJobMonitoringIntegrationDataflowRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataJobMonitoringIntegrationDataflowRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowResponse.java new file mode 100644 index 00000000000..46b4f6cf516 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowResponse.java @@ -0,0 +1,179 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks Data Jobs Monitoring dataflow. */ +@JsonPropertyOrder({ + DatabricksDataJobMonitoringIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + DatabricksDataJobMonitoringIntegrationDataflowResponse.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataJobMonitoringIntegrationDataflowResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse settings; + + public DatabricksDataJobMonitoringIntegrationDataflowResponse enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public DatabricksDataJobMonitoringIntegrationDataflowResponse settings( + DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the Databricks Data Jobs Monitoring dataflow. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse getSettings() { + return settings; + } + + public void setSettings(DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksDataJobMonitoringIntegrationDataflowResponse + */ + @JsonAnySetter + public DatabricksDataJobMonitoringIntegrationDataflowResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksDataJobMonitoringIntegrationDataflowResponse object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataJobMonitoringIntegrationDataflowResponse + databricksDataJobMonitoringIntegrationDataflowResponse = + (DatabricksDataJobMonitoringIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, databricksDataJobMonitoringIntegrationDataflowResponse.enabled) + && Objects.equals( + this.settings, databricksDataJobMonitoringIntegrationDataflowResponse.settings) + && Objects.equals( + this.additionalProperties, + databricksDataJobMonitoringIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataJobMonitoringIntegrationDataflowResponse {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest.java new file mode 100644 index 00000000000..29e6d01739f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest.java @@ -0,0 +1,229 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Settings of the Databricks Data Jobs Monitoring dataflow. Only the fields provided are changed. + */ +@JsonPropertyOrder({ + DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest.JSON_PROPERTY_DD_API_KEY_ID, + DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest.JSON_PROPERTY_DD_API_KEY_SECRET, + DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_DJM_GLOBAL_INIT_SCRIPT_ENABLED, + DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest.JSON_PROPERTY_SCRIPT_GPUM_ENABLED, + DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest.JSON_PROPERTY_SCRIPT_LOGS_ENABLED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DD_API_KEY_ID = "dd_api_key_id"; + private String ddApiKeyId; + + public static final String JSON_PROPERTY_DD_API_KEY_SECRET = "dd_api_key_secret"; + private String ddApiKeySecret; + + public static final String JSON_PROPERTY_DJM_GLOBAL_INIT_SCRIPT_ENABLED = + "djm_global_init_script_enabled"; + private Boolean djmGlobalInitScriptEnabled; + + public static final String JSON_PROPERTY_SCRIPT_GPUM_ENABLED = "script_gpum_enabled"; + private Boolean scriptGpumEnabled; + + public static final String JSON_PROPERTY_SCRIPT_LOGS_ENABLED = "script_logs_enabled"; + private Boolean scriptLogsEnabled; + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest ddApiKeyId( + String ddApiKeyId) { + this.ddApiKeyId = ddApiKeyId; + return this; + } + + /** + * ID of the Datadog API key the global init script uses to submit data. Setting or changing it + * requires dd_api_key_secret in the same request. + * + * @return ddApiKeyId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DD_API_KEY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDdApiKeyId() { + return ddApiKeyId; + } + + public void setDdApiKeyId(String ddApiKeyId) { + this.ddApiKeyId = ddApiKeyId; + } + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest ddApiKeySecret( + String ddApiKeySecret) { + this.ddApiKeySecret = ddApiKeySecret; + return this; + } + + /** + * Secret value of the Datadog API key identified by dd_api_key_id. + * + * @return ddApiKeySecret + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DD_API_KEY_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDdApiKeySecret() { + return ddApiKeySecret; + } + + public void setDdApiKeySecret(String ddApiKeySecret) { + this.ddApiKeySecret = ddApiKeySecret; + } + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest djmGlobalInitScriptEnabled( + Boolean djmGlobalInitScriptEnabled) { + this.djmGlobalInitScriptEnabled = djmGlobalInitScriptEnabled; + return this; + } + + /** + * Whether Datadog manages the global init script that installs the Agent on your Databricks + * clusters. + * + * @return djmGlobalInitScriptEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DJM_GLOBAL_INIT_SCRIPT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDjmGlobalInitScriptEnabled() { + return djmGlobalInitScriptEnabled; + } + + public void setDjmGlobalInitScriptEnabled(Boolean djmGlobalInitScriptEnabled) { + this.djmGlobalInitScriptEnabled = djmGlobalInitScriptEnabled; + } + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest scriptGpumEnabled( + Boolean scriptGpumEnabled) { + this.scriptGpumEnabled = scriptGpumEnabled; + return this; + } + + /** + * Whether GPU metrics are collected from your Databricks clusters. The Agent installed by the + * global init script performs the collection, so this requires the dataflow to be enabled with + * djm_global_init_script_enabled set to true. + * + * @return scriptGpumEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCRIPT_GPUM_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getScriptGpumEnabled() { + return scriptGpumEnabled; + } + + public void setScriptGpumEnabled(Boolean scriptGpumEnabled) { + this.scriptGpumEnabled = scriptGpumEnabled; + } + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest scriptLogsEnabled( + Boolean scriptLogsEnabled) { + this.scriptLogsEnabled = scriptLogsEnabled; + return this; + } + + /** + * Whether logs are collected from your Databricks clusters. The Agent installed by the global + * init script performs the collection, so this requires the dataflow to be enabled with + * djm_global_init_script_enabled set to true. + * + * @return scriptLogsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCRIPT_LOGS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getScriptLogsEnabled() { + return scriptLogsEnabled; + } + + public void setScriptLogsEnabled(Boolean scriptLogsEnabled) { + this.scriptLogsEnabled = scriptLogsEnabled; + } + + /** + * Return true if this DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest + databricksDataJobMonitoringIntegrationDataflowSettingsRequest = + (DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest) o; + return Objects.equals( + this.ddApiKeyId, + databricksDataJobMonitoringIntegrationDataflowSettingsRequest.ddApiKeyId) + && Objects.equals( + this.ddApiKeySecret, + databricksDataJobMonitoringIntegrationDataflowSettingsRequest.ddApiKeySecret) + && Objects.equals( + this.djmGlobalInitScriptEnabled, + databricksDataJobMonitoringIntegrationDataflowSettingsRequest + .djmGlobalInitScriptEnabled) + && Objects.equals( + this.scriptGpumEnabled, + databricksDataJobMonitoringIntegrationDataflowSettingsRequest.scriptGpumEnabled) + && Objects.equals( + this.scriptLogsEnabled, + databricksDataJobMonitoringIntegrationDataflowSettingsRequest.scriptLogsEnabled); + } + + @Override + public int hashCode() { + return Objects.hash( + ddApiKeyId, + ddApiKeySecret, + djmGlobalInitScriptEnabled, + scriptGpumEnabled, + scriptLogsEnabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataJobMonitoringIntegrationDataflowSettingsRequest {\n"); + sb.append(" ddApiKeyId: ").append(toIndentedString(ddApiKeyId)).append("\n"); + sb.append(" ddApiKeySecret: ").append(toIndentedString(ddApiKeySecret)).append("\n"); + sb.append(" djmGlobalInitScriptEnabled: ") + .append(toIndentedString(djmGlobalInitScriptEnabled)) + .append("\n"); + sb.append(" scriptGpumEnabled: ").append(toIndentedString(scriptGpumEnabled)).append("\n"); + sb.append(" scriptLogsEnabled: ").append(toIndentedString(scriptLogsEnabled)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse.java new file mode 100644 index 00000000000..0f41a506f7a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse.java @@ -0,0 +1,253 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Settings of the Databricks Data Jobs Monitoring dataflow. */ +@JsonPropertyOrder({ + DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse.JSON_PROPERTY_DD_API_KEY_ID, + DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse + .JSON_PROPERTY_DJM_GLOBAL_INIT_SCRIPT_ENABLED, + DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse.JSON_PROPERTY_SCRIPT_GPUM_ENABLED, + DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse.JSON_PROPERTY_SCRIPT_LOGS_ENABLED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DD_API_KEY_ID = "dd_api_key_id"; + private String ddApiKeyId; + + public static final String JSON_PROPERTY_DJM_GLOBAL_INIT_SCRIPT_ENABLED = + "djm_global_init_script_enabled"; + private Boolean djmGlobalInitScriptEnabled; + + public static final String JSON_PROPERTY_SCRIPT_GPUM_ENABLED = "script_gpum_enabled"; + private Boolean scriptGpumEnabled; + + public static final String JSON_PROPERTY_SCRIPT_LOGS_ENABLED = "script_logs_enabled"; + private Boolean scriptLogsEnabled; + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse ddApiKeyId( + String ddApiKeyId) { + this.ddApiKeyId = ddApiKeyId; + return this; + } + + /** + * ID of the Datadog API key the global init script uses to submit data. + * + * @return ddApiKeyId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DD_API_KEY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDdApiKeyId() { + return ddApiKeyId; + } + + public void setDdApiKeyId(String ddApiKeyId) { + this.ddApiKeyId = ddApiKeyId; + } + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse djmGlobalInitScriptEnabled( + Boolean djmGlobalInitScriptEnabled) { + this.djmGlobalInitScriptEnabled = djmGlobalInitScriptEnabled; + return this; + } + + /** + * Whether Datadog manages the global init script that installs the Agent on your Databricks + * clusters. + * + * @return djmGlobalInitScriptEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DJM_GLOBAL_INIT_SCRIPT_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDjmGlobalInitScriptEnabled() { + return djmGlobalInitScriptEnabled; + } + + public void setDjmGlobalInitScriptEnabled(Boolean djmGlobalInitScriptEnabled) { + this.djmGlobalInitScriptEnabled = djmGlobalInitScriptEnabled; + } + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse scriptGpumEnabled( + Boolean scriptGpumEnabled) { + this.scriptGpumEnabled = scriptGpumEnabled; + return this; + } + + /** + * Whether GPU metrics are collected from your Databricks clusters. The Agent installed by the + * global init script performs the collection, so this requires the dataflow to be enabled with + * djm_global_init_script_enabled set to true. + * + * @return scriptGpumEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCRIPT_GPUM_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getScriptGpumEnabled() { + return scriptGpumEnabled; + } + + public void setScriptGpumEnabled(Boolean scriptGpumEnabled) { + this.scriptGpumEnabled = scriptGpumEnabled; + } + + public DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse scriptLogsEnabled( + Boolean scriptLogsEnabled) { + this.scriptLogsEnabled = scriptLogsEnabled; + return this; + } + + /** + * Whether logs are collected from your Databricks clusters. The Agent installed by the global + * init script performs the collection, so this requires the dataflow to be enabled with + * djm_global_init_script_enabled set to true. + * + * @return scriptLogsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCRIPT_LOGS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getScriptLogsEnabled() { + return scriptLogsEnabled; + } + + public void setScriptLogsEnabled(Boolean scriptLogsEnabled) { + this.scriptLogsEnabled = scriptLogsEnabled; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse + */ + @JsonAnySetter + public DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse + databricksDataJobMonitoringIntegrationDataflowSettingsResponse = + (DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse) o; + return Objects.equals( + this.ddApiKeyId, + databricksDataJobMonitoringIntegrationDataflowSettingsResponse.ddApiKeyId) + && Objects.equals( + this.djmGlobalInitScriptEnabled, + databricksDataJobMonitoringIntegrationDataflowSettingsResponse + .djmGlobalInitScriptEnabled) + && Objects.equals( + this.scriptGpumEnabled, + databricksDataJobMonitoringIntegrationDataflowSettingsResponse.scriptGpumEnabled) + && Objects.equals( + this.scriptLogsEnabled, + databricksDataJobMonitoringIntegrationDataflowSettingsResponse.scriptLogsEnabled) + && Objects.equals( + this.additionalProperties, + databricksDataJobMonitoringIntegrationDataflowSettingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + ddApiKeyId, + djmGlobalInitScriptEnabled, + scriptGpumEnabled, + scriptLogsEnabled, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataJobMonitoringIntegrationDataflowSettingsResponse {\n"); + sb.append(" ddApiKeyId: ").append(toIndentedString(ddApiKeyId)).append("\n"); + sb.append(" djmGlobalInitScriptEnabled: ") + .append(toIndentedString(djmGlobalInitScriptEnabled)) + .append("\n"); + sb.append(" scriptGpumEnabled: ").append(toIndentedString(scriptGpumEnabled)).append("\n"); + sb.append(" scriptLogsEnabled: ").append(toIndentedString(scriptLogsEnabled)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowRequest.java new file mode 100644 index 00000000000..b27b125a39c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowRequest.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks data observability dataflow. */ +@JsonPropertyOrder({ + DatabricksDataObservabilityIntegrationDataflowRequest.JSON_PROPERTY_ENABLED, + DatabricksDataObservabilityIntegrationDataflowRequest.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksDataObservabilityIntegrationDataflowSettingsRequest settings; + + public DatabricksDataObservabilityIntegrationDataflowRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public DatabricksDataObservabilityIntegrationDataflowRequest settings( + DatabricksDataObservabilityIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the Databricks data observability dataflow. Only the fields provided are changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityIntegrationDataflowSettingsRequest getSettings() { + return settings; + } + + public void setSettings(DatabricksDataObservabilityIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksDataObservabilityIntegrationDataflowRequest + */ + @JsonAnySetter + public DatabricksDataObservabilityIntegrationDataflowRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksDataObservabilityIntegrationDataflowRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityIntegrationDataflowRequest + databricksDataObservabilityIntegrationDataflowRequest = + (DatabricksDataObservabilityIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, databricksDataObservabilityIntegrationDataflowRequest.enabled) + && Objects.equals( + this.settings, databricksDataObservabilityIntegrationDataflowRequest.settings) + && Objects.equals( + this.additionalProperties, + databricksDataObservabilityIntegrationDataflowRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataObservabilityIntegrationDataflowRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowResponse.java new file mode 100644 index 00000000000..7c0217a0f4c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowResponse.java @@ -0,0 +1,179 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks data observability dataflow. */ +@JsonPropertyOrder({ + DatabricksDataObservabilityIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + DatabricksDataObservabilityIntegrationDataflowResponse.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityIntegrationDataflowResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksDataObservabilityIntegrationDataflowSettingsResponse settings; + + public DatabricksDataObservabilityIntegrationDataflowResponse enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public DatabricksDataObservabilityIntegrationDataflowResponse settings( + DatabricksDataObservabilityIntegrationDataflowSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the Databricks data observability dataflow. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityIntegrationDataflowSettingsResponse getSettings() { + return settings; + } + + public void setSettings(DatabricksDataObservabilityIntegrationDataflowSettingsResponse settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksDataObservabilityIntegrationDataflowResponse + */ + @JsonAnySetter + public DatabricksDataObservabilityIntegrationDataflowResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksDataObservabilityIntegrationDataflowResponse object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityIntegrationDataflowResponse + databricksDataObservabilityIntegrationDataflowResponse = + (DatabricksDataObservabilityIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, databricksDataObservabilityIntegrationDataflowResponse.enabled) + && Objects.equals( + this.settings, databricksDataObservabilityIntegrationDataflowResponse.settings) + && Objects.equals( + this.additionalProperties, + databricksDataObservabilityIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataObservabilityIntegrationDataflowResponse {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowSettingsRequest.java new file mode 100644 index 00000000000..4fe2002fda3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowSettingsRequest.java @@ -0,0 +1,122 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** Settings of the Databricks data observability dataflow. Only the fields provided are changed. */ +@JsonPropertyOrder({ + DatabricksDataObservabilityIntegrationDataflowSettingsRequest.JSON_PROPERTY_DO_CRAWLERS_CRON, + DatabricksDataObservabilityIntegrationDataflowSettingsRequest.JSON_PROPERTY_SYNC_SYSTEM_CATALOG +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityIntegrationDataflowSettingsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DO_CRAWLERS_CRON = "do_crawlers_cron"; + private String doCrawlersCron; + + public static final String JSON_PROPERTY_SYNC_SYSTEM_CATALOG = "sync_system_catalog"; + private Boolean syncSystemCatalog; + + public DatabricksDataObservabilityIntegrationDataflowSettingsRequest doCrawlersCron( + String doCrawlersCron) { + this.doCrawlersCron = doCrawlersCron; + return this; + } + + /** + * Cron expression setting how often the data observability crawlers run. + * + * @return doCrawlersCron + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DO_CRAWLERS_CRON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDoCrawlersCron() { + return doCrawlersCron; + } + + public void setDoCrawlersCron(String doCrawlersCron) { + this.doCrawlersCron = doCrawlersCron; + } + + public DatabricksDataObservabilityIntegrationDataflowSettingsRequest syncSystemCatalog( + Boolean syncSystemCatalog) { + this.syncSystemCatalog = syncSystemCatalog; + return this; + } + + /** + * Whether the Databricks system catalog is synchronized alongside your data + * catalogs. + * + * @return syncSystemCatalog + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNC_SYSTEM_CATALOG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSyncSystemCatalog() { + return syncSystemCatalog; + } + + public void setSyncSystemCatalog(Boolean syncSystemCatalog) { + this.syncSystemCatalog = syncSystemCatalog; + } + + /** + * Return true if this DatabricksDataObservabilityIntegrationDataflowSettingsRequest object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityIntegrationDataflowSettingsRequest + databricksDataObservabilityIntegrationDataflowSettingsRequest = + (DatabricksDataObservabilityIntegrationDataflowSettingsRequest) o; + return Objects.equals( + this.doCrawlersCron, + databricksDataObservabilityIntegrationDataflowSettingsRequest.doCrawlersCron) + && Objects.equals( + this.syncSystemCatalog, + databricksDataObservabilityIntegrationDataflowSettingsRequest.syncSystemCatalog); + } + + @Override + public int hashCode() { + return Objects.hash(doCrawlersCron, syncSystemCatalog); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataObservabilityIntegrationDataflowSettingsRequest {\n"); + sb.append(" doCrawlersCron: ").append(toIndentedString(doCrawlersCron)).append("\n"); + sb.append(" syncSystemCatalog: ").append(toIndentedString(syncSystemCatalog)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowSettingsResponse.java new file mode 100644 index 00000000000..9e5de0cb9e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityIntegrationDataflowSettingsResponse.java @@ -0,0 +1,179 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Settings of the Databricks data observability dataflow. */ +@JsonPropertyOrder({ + DatabricksDataObservabilityIntegrationDataflowSettingsResponse.JSON_PROPERTY_DO_CRAWLERS_CRON, + DatabricksDataObservabilityIntegrationDataflowSettingsResponse.JSON_PROPERTY_SYNC_SYSTEM_CATALOG +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityIntegrationDataflowSettingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DO_CRAWLERS_CRON = "do_crawlers_cron"; + private String doCrawlersCron; + + public static final String JSON_PROPERTY_SYNC_SYSTEM_CATALOG = "sync_system_catalog"; + private Boolean syncSystemCatalog; + + public DatabricksDataObservabilityIntegrationDataflowSettingsResponse doCrawlersCron( + String doCrawlersCron) { + this.doCrawlersCron = doCrawlersCron; + return this; + } + + /** + * Cron expression setting how often the data observability crawlers run. + * + * @return doCrawlersCron + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DO_CRAWLERS_CRON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDoCrawlersCron() { + return doCrawlersCron; + } + + public void setDoCrawlersCron(String doCrawlersCron) { + this.doCrawlersCron = doCrawlersCron; + } + + public DatabricksDataObservabilityIntegrationDataflowSettingsResponse syncSystemCatalog( + Boolean syncSystemCatalog) { + this.syncSystemCatalog = syncSystemCatalog; + return this; + } + + /** + * Whether the Databricks system catalog is synchronized alongside your data + * catalogs. + * + * @return syncSystemCatalog + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYNC_SYSTEM_CATALOG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSyncSystemCatalog() { + return syncSystemCatalog; + } + + public void setSyncSystemCatalog(Boolean syncSystemCatalog) { + this.syncSystemCatalog = syncSystemCatalog; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksDataObservabilityIntegrationDataflowSettingsResponse + */ + @JsonAnySetter + public DatabricksDataObservabilityIntegrationDataflowSettingsResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksDataObservabilityIntegrationDataflowSettingsResponse object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityIntegrationDataflowSettingsResponse + databricksDataObservabilityIntegrationDataflowSettingsResponse = + (DatabricksDataObservabilityIntegrationDataflowSettingsResponse) o; + return Objects.equals( + this.doCrawlersCron, + databricksDataObservabilityIntegrationDataflowSettingsResponse.doCrawlersCron) + && Objects.equals( + this.syncSystemCatalog, + databricksDataObservabilityIntegrationDataflowSettingsResponse.syncSystemCatalog) + && Objects.equals( + this.additionalProperties, + databricksDataObservabilityIntegrationDataflowSettingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(doCrawlersCron, syncSystemCatalog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataObservabilityIntegrationDataflowSettingsResponse {\n"); + sb.append(" doCrawlersCron: ").append(toIndentedString(doCrawlersCron)).append("\n"); + sb.append(" syncSystemCatalog: ").append(toIndentedString(syncSystemCatalog)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationRequest.java new file mode 100644 index 00000000000..2a599373480 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationRequest.java @@ -0,0 +1,330 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = + DatabricksIntegrationAccountAuthenticationRequest + .DatabricksIntegrationAccountAuthenticationRequestDeserializer.class) +@JsonSerialize( + using = + DatabricksIntegrationAccountAuthenticationRequest + .DatabricksIntegrationAccountAuthenticationRequestSerializer.class) +public class DatabricksIntegrationAccountAuthenticationRequest extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(DatabricksIntegrationAccountAuthenticationRequest.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class DatabricksIntegrationAccountAuthenticationRequestSerializer + extends StdSerializer { + public DatabricksIntegrationAccountAuthenticationRequestSerializer( + Class t) { + super(t); + } + + public DatabricksIntegrationAccountAuthenticationRequestSerializer() { + this(null); + } + + @Override + public void serialize( + DatabricksIntegrationAccountAuthenticationRequest value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class DatabricksIntegrationAccountAuthenticationRequestDeserializer + extends StdDeserializer { + public DatabricksIntegrationAccountAuthenticationRequestDeserializer() { + this(DatabricksIntegrationAccountAuthenticationRequest.class); + } + + public DatabricksIntegrationAccountAuthenticationRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public DatabricksIntegrationAccountAuthenticationRequest deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize DatabricksIntegrationAccountOAuthAuthRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Integer.class) + || DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Long.class) + || DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Float.class) + || DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Double.class) + || DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Boolean.class) + || DatabricksIntegrationAccountOAuthAuthRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Integer.class) + || DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Float.class) + || DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountOAuthAuthRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountOAuthAuthRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountOAuthAuthRequest.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((DatabricksIntegrationAccountOAuthAuthRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'DatabricksIntegrationAccountOAuthAuthRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'DatabricksIntegrationAccountOAuthAuthRequest'", + e); + } + + // deserialize IntegrationAccountPrivateActionRunnerAuthRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Integer.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Long.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Float.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Double.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Boolean.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Integer.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Float.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(IntegrationAccountPrivateActionRunnerAuthRequest.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IntegrationAccountPrivateActionRunnerAuthRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'IntegrationAccountPrivateActionRunnerAuthRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'IntegrationAccountPrivateActionRunnerAuthRequest'", + e); + } + + DatabricksIntegrationAccountAuthenticationRequest ret = + new DatabricksIntegrationAccountAuthenticationRequest(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public DatabricksIntegrationAccountAuthenticationRequest getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "DatabricksIntegrationAccountAuthenticationRequest cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public DatabricksIntegrationAccountAuthenticationRequest() { + super("oneOf", Boolean.FALSE); + } + + public DatabricksIntegrationAccountAuthenticationRequest( + DatabricksIntegrationAccountOAuthAuthRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DatabricksIntegrationAccountAuthenticationRequest( + IntegrationAccountPrivateActionRunnerAuthRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "DatabricksIntegrationAccountOAuthAuthRequest", + new GenericType() {}); + schemas.put( + "IntegrationAccountPrivateActionRunnerAuthRequest", + new GenericType() {}); + JSON.registerDescendants( + DatabricksIntegrationAccountAuthenticationRequest.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return DatabricksIntegrationAccountAuthenticationRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: DatabricksIntegrationAccountOAuthAuthRequest, + * IntegrationAccountPrivateActionRunnerAuthRequest + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + DatabricksIntegrationAccountOAuthAuthRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + IntegrationAccountPrivateActionRunnerAuthRequest.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be DatabricksIntegrationAccountOAuthAuthRequest," + + " IntegrationAccountPrivateActionRunnerAuthRequest"); + } + + /** + * Get the actual instance, which can be the following: + * DatabricksIntegrationAccountOAuthAuthRequest, IntegrationAccountPrivateActionRunnerAuthRequest + * + * @return The actual instance (DatabricksIntegrationAccountOAuthAuthRequest, + * IntegrationAccountPrivateActionRunnerAuthRequest) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `DatabricksIntegrationAccountOAuthAuthRequest`. If the actual + * instance is not `DatabricksIntegrationAccountOAuthAuthRequest`, the ClassCastException will be + * thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountOAuthAuthRequest` + * @throws ClassCastException if the instance is not + * `DatabricksIntegrationAccountOAuthAuthRequest` + */ + public DatabricksIntegrationAccountOAuthAuthRequest + getDatabricksIntegrationAccountOAuthAuthRequest() throws ClassCastException { + return (DatabricksIntegrationAccountOAuthAuthRequest) super.getActualInstance(); + } + + /** + * Get the actual instance of `IntegrationAccountPrivateActionRunnerAuthRequest`. If the actual + * instance is not `IntegrationAccountPrivateActionRunnerAuthRequest`, the ClassCastException will + * be thrown. + * + * @return The actual instance of `IntegrationAccountPrivateActionRunnerAuthRequest` + * @throws ClassCastException if the instance is not + * `IntegrationAccountPrivateActionRunnerAuthRequest` + */ + public IntegrationAccountPrivateActionRunnerAuthRequest + getIntegrationAccountPrivateActionRunnerAuthRequest() throws ClassCastException { + return (IntegrationAccountPrivateActionRunnerAuthRequest) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationResponse.java new file mode 100644 index 00000000000..7841661dc41 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationResponse.java @@ -0,0 +1,412 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = + DatabricksIntegrationAccountAuthenticationResponse + .DatabricksIntegrationAccountAuthenticationResponseDeserializer.class) +@JsonSerialize( + using = + DatabricksIntegrationAccountAuthenticationResponse + .DatabricksIntegrationAccountAuthenticationResponseSerializer.class) +public class DatabricksIntegrationAccountAuthenticationResponse extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(DatabricksIntegrationAccountAuthenticationResponse.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class DatabricksIntegrationAccountAuthenticationResponseSerializer + extends StdSerializer { + public DatabricksIntegrationAccountAuthenticationResponseSerializer( + Class t) { + super(t); + } + + public DatabricksIntegrationAccountAuthenticationResponseSerializer() { + this(null); + } + + @Override + public void serialize( + DatabricksIntegrationAccountAuthenticationResponse value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class DatabricksIntegrationAccountAuthenticationResponseDeserializer + extends StdDeserializer { + public DatabricksIntegrationAccountAuthenticationResponseDeserializer() { + this(DatabricksIntegrationAccountAuthenticationResponse.class); + } + + public DatabricksIntegrationAccountAuthenticationResponseDeserializer(Class vc) { + super(vc); + } + + @Override + public DatabricksIntegrationAccountAuthenticationResponse deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize DatabricksIntegrationAccountOAuthAuthResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Integer.class) + || DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Long.class) + || DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Float.class) + || DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Double.class) + || DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Boolean.class) + || DatabricksIntegrationAccountOAuthAuthResponse.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Integer.class) + || DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Float.class) + || DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountOAuthAuthResponse.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountOAuthAuthResponse.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountOAuthAuthResponse.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((DatabricksIntegrationAccountOAuthAuthResponse) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'DatabricksIntegrationAccountOAuthAuthResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'DatabricksIntegrationAccountOAuthAuthResponse'", + e); + } + + // deserialize IntegrationAccountPrivateActionRunnerAuthResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Integer.class) + || IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Long.class) + || IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Float.class) + || IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Double.class) + || IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Boolean.class) + || IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Integer.class) + || IntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Float.class) + || IntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IntegrationAccountPrivateActionRunnerAuthResponse.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(IntegrationAccountPrivateActionRunnerAuthResponse.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IntegrationAccountPrivateActionRunnerAuthResponse) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'IntegrationAccountPrivateActionRunnerAuthResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'IntegrationAccountPrivateActionRunnerAuthResponse'", + e); + } + + // deserialize DatabricksIntegrationAccountPatAuthResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountPatAuthResponse.class.equals(Integer.class) + || DatabricksIntegrationAccountPatAuthResponse.class.equals(Long.class) + || DatabricksIntegrationAccountPatAuthResponse.class.equals(Float.class) + || DatabricksIntegrationAccountPatAuthResponse.class.equals(Double.class) + || DatabricksIntegrationAccountPatAuthResponse.class.equals(Boolean.class) + || DatabricksIntegrationAccountPatAuthResponse.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountPatAuthResponse.class.equals(Integer.class) + || DatabricksIntegrationAccountPatAuthResponse.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountPatAuthResponse.class.equals(Float.class) + || DatabricksIntegrationAccountPatAuthResponse.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountPatAuthResponse.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountPatAuthResponse.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountPatAuthResponse.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((DatabricksIntegrationAccountPatAuthResponse) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'DatabricksIntegrationAccountPatAuthResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'DatabricksIntegrationAccountPatAuthResponse'", + e); + } + + DatabricksIntegrationAccountAuthenticationResponse ret = + new DatabricksIntegrationAccountAuthenticationResponse(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public DatabricksIntegrationAccountAuthenticationResponse getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "DatabricksIntegrationAccountAuthenticationResponse cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public DatabricksIntegrationAccountAuthenticationResponse() { + super("oneOf", Boolean.FALSE); + } + + public DatabricksIntegrationAccountAuthenticationResponse( + DatabricksIntegrationAccountOAuthAuthResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DatabricksIntegrationAccountAuthenticationResponse( + IntegrationAccountPrivateActionRunnerAuthResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DatabricksIntegrationAccountAuthenticationResponse( + DatabricksIntegrationAccountPatAuthResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "DatabricksIntegrationAccountOAuthAuthResponse", + new GenericType() {}); + schemas.put( + "IntegrationAccountPrivateActionRunnerAuthResponse", + new GenericType() {}); + schemas.put( + "DatabricksIntegrationAccountPatAuthResponse", + new GenericType() {}); + JSON.registerDescendants( + DatabricksIntegrationAccountAuthenticationResponse.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return DatabricksIntegrationAccountAuthenticationResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: DatabricksIntegrationAccountOAuthAuthResponse, + * IntegrationAccountPrivateActionRunnerAuthResponse, DatabricksIntegrationAccountPatAuthResponse + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + DatabricksIntegrationAccountOAuthAuthResponse.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + IntegrationAccountPrivateActionRunnerAuthResponse.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + DatabricksIntegrationAccountPatAuthResponse.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be DatabricksIntegrationAccountOAuthAuthResponse," + + " IntegrationAccountPrivateActionRunnerAuthResponse," + + " DatabricksIntegrationAccountPatAuthResponse"); + } + + /** + * Get the actual instance, which can be the following: + * DatabricksIntegrationAccountOAuthAuthResponse, + * IntegrationAccountPrivateActionRunnerAuthResponse, DatabricksIntegrationAccountPatAuthResponse + * + * @return The actual instance (DatabricksIntegrationAccountOAuthAuthResponse, + * IntegrationAccountPrivateActionRunnerAuthResponse, + * DatabricksIntegrationAccountPatAuthResponse) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `DatabricksIntegrationAccountOAuthAuthResponse`. If the actual + * instance is not `DatabricksIntegrationAccountOAuthAuthResponse`, the ClassCastException will be + * thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountOAuthAuthResponse` + * @throws ClassCastException if the instance is not + * `DatabricksIntegrationAccountOAuthAuthResponse` + */ + public DatabricksIntegrationAccountOAuthAuthResponse + getDatabricksIntegrationAccountOAuthAuthResponse() throws ClassCastException { + return (DatabricksIntegrationAccountOAuthAuthResponse) super.getActualInstance(); + } + + /** + * Get the actual instance of `IntegrationAccountPrivateActionRunnerAuthResponse`. If the actual + * instance is not `IntegrationAccountPrivateActionRunnerAuthResponse`, the ClassCastException + * will be thrown. + * + * @return The actual instance of `IntegrationAccountPrivateActionRunnerAuthResponse` + * @throws ClassCastException if the instance is not + * `IntegrationAccountPrivateActionRunnerAuthResponse` + */ + public IntegrationAccountPrivateActionRunnerAuthResponse + getIntegrationAccountPrivateActionRunnerAuthResponse() throws ClassCastException { + return (IntegrationAccountPrivateActionRunnerAuthResponse) super.getActualInstance(); + } + + /** + * Get the actual instance of `DatabricksIntegrationAccountPatAuthResponse`. If the actual + * instance is not `DatabricksIntegrationAccountPatAuthResponse`, the ClassCastException will be + * thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountPatAuthResponse` + * @throws ClassCastException if the instance is not `DatabricksIntegrationAccountPatAuthResponse` + */ + public DatabricksIntegrationAccountPatAuthResponse + getDatabricksIntegrationAccountPatAuthResponse() throws ClassCastException { + return (DatabricksIntegrationAccountPatAuthResponse) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationUpdate.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationUpdate.java new file mode 100644 index 00000000000..c7d1b9dd001 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationUpdate.java @@ -0,0 +1,409 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = + DatabricksIntegrationAccountAuthenticationUpdate + .DatabricksIntegrationAccountAuthenticationUpdateDeserializer.class) +@JsonSerialize( + using = + DatabricksIntegrationAccountAuthenticationUpdate + .DatabricksIntegrationAccountAuthenticationUpdateSerializer.class) +public class DatabricksIntegrationAccountAuthenticationUpdate extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(DatabricksIntegrationAccountAuthenticationUpdate.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class DatabricksIntegrationAccountAuthenticationUpdateSerializer + extends StdSerializer { + public DatabricksIntegrationAccountAuthenticationUpdateSerializer( + Class t) { + super(t); + } + + public DatabricksIntegrationAccountAuthenticationUpdateSerializer() { + this(null); + } + + @Override + public void serialize( + DatabricksIntegrationAccountAuthenticationUpdate value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class DatabricksIntegrationAccountAuthenticationUpdateDeserializer + extends StdDeserializer { + public DatabricksIntegrationAccountAuthenticationUpdateDeserializer() { + this(DatabricksIntegrationAccountAuthenticationUpdate.class); + } + + public DatabricksIntegrationAccountAuthenticationUpdateDeserializer(Class vc) { + super(vc); + } + + @Override + public DatabricksIntegrationAccountAuthenticationUpdate deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize DatabricksIntegrationAccountOAuthAuthUpdate + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Integer.class) + || DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Long.class) + || DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Float.class) + || DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Double.class) + || DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Boolean.class) + || DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Integer.class) + || DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Float.class) + || DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountOAuthAuthUpdate.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountOAuthAuthUpdate.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((DatabricksIntegrationAccountOAuthAuthUpdate) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'DatabricksIntegrationAccountOAuthAuthUpdate'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'DatabricksIntegrationAccountOAuthAuthUpdate'", + e); + } + + // deserialize IntegrationAccountPrivateActionRunnerAuthRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Integer.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Long.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Float.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Double.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Boolean.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Integer.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Float.class) + || IntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IntegrationAccountPrivateActionRunnerAuthRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(IntegrationAccountPrivateActionRunnerAuthRequest.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IntegrationAccountPrivateActionRunnerAuthRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'IntegrationAccountPrivateActionRunnerAuthRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'IntegrationAccountPrivateActionRunnerAuthRequest'", + e); + } + + // deserialize DatabricksIntegrationAccountPatAuthUpdate + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountPatAuthUpdate.class.equals(Integer.class) + || DatabricksIntegrationAccountPatAuthUpdate.class.equals(Long.class) + || DatabricksIntegrationAccountPatAuthUpdate.class.equals(Float.class) + || DatabricksIntegrationAccountPatAuthUpdate.class.equals(Double.class) + || DatabricksIntegrationAccountPatAuthUpdate.class.equals(Boolean.class) + || DatabricksIntegrationAccountPatAuthUpdate.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountPatAuthUpdate.class.equals(Integer.class) + || DatabricksIntegrationAccountPatAuthUpdate.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountPatAuthUpdate.class.equals(Float.class) + || DatabricksIntegrationAccountPatAuthUpdate.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountPatAuthUpdate.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountPatAuthUpdate.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountPatAuthUpdate.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((DatabricksIntegrationAccountPatAuthUpdate) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, "Input data matches schema 'DatabricksIntegrationAccountPatAuthUpdate'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'DatabricksIntegrationAccountPatAuthUpdate'", + e); + } + + DatabricksIntegrationAccountAuthenticationUpdate ret = + new DatabricksIntegrationAccountAuthenticationUpdate(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public DatabricksIntegrationAccountAuthenticationUpdate getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "DatabricksIntegrationAccountAuthenticationUpdate cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public DatabricksIntegrationAccountAuthenticationUpdate() { + super("oneOf", Boolean.FALSE); + } + + public DatabricksIntegrationAccountAuthenticationUpdate( + DatabricksIntegrationAccountOAuthAuthUpdate o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DatabricksIntegrationAccountAuthenticationUpdate( + IntegrationAccountPrivateActionRunnerAuthRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DatabricksIntegrationAccountAuthenticationUpdate( + DatabricksIntegrationAccountPatAuthUpdate o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "DatabricksIntegrationAccountOAuthAuthUpdate", + new GenericType() {}); + schemas.put( + "IntegrationAccountPrivateActionRunnerAuthRequest", + new GenericType() {}); + schemas.put( + "DatabricksIntegrationAccountPatAuthUpdate", + new GenericType() {}); + JSON.registerDescendants( + DatabricksIntegrationAccountAuthenticationUpdate.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return DatabricksIntegrationAccountAuthenticationUpdate.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: DatabricksIntegrationAccountOAuthAuthUpdate, + * IntegrationAccountPrivateActionRunnerAuthRequest, DatabricksIntegrationAccountPatAuthUpdate + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + DatabricksIntegrationAccountOAuthAuthUpdate.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + IntegrationAccountPrivateActionRunnerAuthRequest.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + DatabricksIntegrationAccountPatAuthUpdate.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be DatabricksIntegrationAccountOAuthAuthUpdate," + + " IntegrationAccountPrivateActionRunnerAuthRequest," + + " DatabricksIntegrationAccountPatAuthUpdate"); + } + + /** + * Get the actual instance, which can be the following: + * DatabricksIntegrationAccountOAuthAuthUpdate, IntegrationAccountPrivateActionRunnerAuthRequest, + * DatabricksIntegrationAccountPatAuthUpdate + * + * @return The actual instance (DatabricksIntegrationAccountOAuthAuthUpdate, + * IntegrationAccountPrivateActionRunnerAuthRequest, + * DatabricksIntegrationAccountPatAuthUpdate) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `DatabricksIntegrationAccountOAuthAuthUpdate`. If the actual + * instance is not `DatabricksIntegrationAccountOAuthAuthUpdate`, the ClassCastException will be + * thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountOAuthAuthUpdate` + * @throws ClassCastException if the instance is not `DatabricksIntegrationAccountOAuthAuthUpdate` + */ + public DatabricksIntegrationAccountOAuthAuthUpdate + getDatabricksIntegrationAccountOAuthAuthUpdate() throws ClassCastException { + return (DatabricksIntegrationAccountOAuthAuthUpdate) super.getActualInstance(); + } + + /** + * Get the actual instance of `IntegrationAccountPrivateActionRunnerAuthRequest`. If the actual + * instance is not `IntegrationAccountPrivateActionRunnerAuthRequest`, the ClassCastException will + * be thrown. + * + * @return The actual instance of `IntegrationAccountPrivateActionRunnerAuthRequest` + * @throws ClassCastException if the instance is not + * `IntegrationAccountPrivateActionRunnerAuthRequest` + */ + public IntegrationAccountPrivateActionRunnerAuthRequest + getIntegrationAccountPrivateActionRunnerAuthRequest() throws ClassCastException { + return (IntegrationAccountPrivateActionRunnerAuthRequest) super.getActualInstance(); + } + + /** + * Get the actual instance of `DatabricksIntegrationAccountPatAuthUpdate`. If the actual instance + * is not `DatabricksIntegrationAccountPatAuthUpdate`, the ClassCastException will be thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountPatAuthUpdate` + * @throws ClassCastException if the instance is not `DatabricksIntegrationAccountPatAuthUpdate` + */ + public DatabricksIntegrationAccountPatAuthUpdate getDatabricksIntegrationAccountPatAuthUpdate() + throws ClassCastException { + return (DatabricksIntegrationAccountPatAuthUpdate) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateAttributes.java new file mode 100644 index 00000000000..ed1da4815d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateAttributes.java @@ -0,0 +1,256 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Writable attributes used to create a Databricks integration account. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountCreateAttributes.JSON_PROPERTY_AUTHENTICATION, + DatabricksIntegrationAccountCreateAttributes.JSON_PROPERTY_DATAFLOWS, + DatabricksIntegrationAccountCreateAttributes.JSON_PROPERTY_NAME, + DatabricksIntegrationAccountCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private DatabricksIntegrationAccountAuthenticationRequest authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private DatabricksIntegrationDataflowsRequest dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksIntegrationAccountSettingsRequest settings; + + public DatabricksIntegrationAccountCreateAttributes() {} + + @JsonCreator + public DatabricksIntegrationAccountCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTHENTICATION) + DatabricksIntegrationAccountAuthenticationRequest authentication, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) + DatabricksIntegrationAccountSettingsRequest settings) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + this.name = name; + this.settings = settings; + this.unparsed |= settings.unparsed; + } + + public DatabricksIntegrationAccountCreateAttributes authentication( + DatabricksIntegrationAccountAuthenticationRequest authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for creating the Databricks integration account. Exactly one method is set. + * Choosing private-action-runner leaves the databricks-model-serving-metrics + * dataflow unable to collect data. + * + * @return authentication + */ + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountAuthenticationRequest getAuthentication() { + return authentication; + } + + public void setAuthentication(DatabricksIntegrationAccountAuthenticationRequest authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public DatabricksIntegrationAccountCreateAttributes dataflows( + DatabricksIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Dataflows to configure on the Databricks integration account, keyed by dataflow id. Some + * dataflows and settings have prerequisites, noted on each. Those prerequisites are not checked + * when the request is made, so anything left enabled without them is stored but collects no data. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksIntegrationDataflowsRequest getDataflows() { + return dataflows; + } + + public void setDataflows(DatabricksIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public DatabricksIntegrationAccountCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the Databricks integration account. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public DatabricksIntegrationAccountCreateAttributes settings( + DatabricksIntegrationAccountSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for creating the Databricks integration account. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountSettingsRequest getSettings() { + return settings; + } + + public void setSettings(DatabricksIntegrationAccountSettingsRequest settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountCreateAttributes + */ + @JsonAnySetter + public DatabricksIntegrationAccountCreateAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountCreateAttributes databricksIntegrationAccountCreateAttributes = + (DatabricksIntegrationAccountCreateAttributes) o; + return Objects.equals( + this.authentication, databricksIntegrationAccountCreateAttributes.authentication) + && Objects.equals(this.dataflows, databricksIntegrationAccountCreateAttributes.dataflows) + && Objects.equals(this.name, databricksIntegrationAccountCreateAttributes.name) + && Objects.equals(this.settings, databricksIntegrationAccountCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountCreateAttributes {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" dataflows: ").append(toIndentedString(dataflows)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateData.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateData.java new file mode 100644 index 00000000000..9a51120152f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateData.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope for creating a Databricks integration account. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountCreateData.JSON_PROPERTY_ATTRIBUTES, + DatabricksIntegrationAccountCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DatabricksIntegrationAccountCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public DatabricksIntegrationAccountCreateData() {} + + @JsonCreator + public DatabricksIntegrationAccountCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DatabricksIntegrationAccountCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DatabricksIntegrationAccountCreateData attributes( + DatabricksIntegrationAccountCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Writable attributes used to create a Databricks integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DatabricksIntegrationAccountCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DatabricksIntegrationAccountCreateData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountCreateData + */ + @JsonAnySetter + public DatabricksIntegrationAccountCreateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountCreateData databricksIntegrationAccountCreateData = + (DatabricksIntegrationAccountCreateData) o; + return Objects.equals(this.attributes, databricksIntegrationAccountCreateData.attributes) + && Objects.equals(this.type, databricksIntegrationAccountCreateData.type) + && Objects.equals( + this.additionalProperties, databricksIntegrationAccountCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateRequest.java new file mode 100644 index 00000000000..2d402d9ee6c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateRequest.java @@ -0,0 +1,153 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload to create a Databricks integration account. */ +@JsonPropertyOrder({DatabricksIntegrationAccountCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DatabricksIntegrationAccountCreateData data; + + public DatabricksIntegrationAccountCreateRequest() {} + + @JsonCreator + public DatabricksIntegrationAccountCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + DatabricksIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DatabricksIntegrationAccountCreateRequest data( + DatabricksIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for creating a Databricks integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountCreateData getData() { + return data; + } + + public void setData(DatabricksIntegrationAccountCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountCreateRequest + */ + @JsonAnySetter + public DatabricksIntegrationAccountCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountCreateRequest databricksIntegrationAccountCreateRequest = + (DatabricksIntegrationAccountCreateRequest) o; + return Objects.equals(this.data, databricksIntegrationAccountCreateRequest.data) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthRequest.java new file mode 100644 index 00000000000..3fa7fe7e574 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthRequest.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** Databricks OAuth machine-to-machine authentication using a service principal. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountOAuthAuthRequest.JSON_PROPERTY_AUTH_TYPE, + DatabricksIntegrationAccountOAuthAuthRequest.JSON_PROPERTY_AZURE_TENANT_ID, + DatabricksIntegrationAccountOAuthAuthRequest.JSON_PROPERTY_CLIENT_ID, + DatabricksIntegrationAccountOAuthAuthRequest.JSON_PROPERTY_CLIENT_SECRET +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountOAuthAuthRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountOAuthAuthType authType = + DatabricksIntegrationAccountOAuthAuthType.DATABRICKS_OAUTH; + + public static final String JSON_PROPERTY_AZURE_TENANT_ID = "azure_tenant_id"; + private String azureTenantId; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private String clientId; + + public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + private String clientSecret; + + public DatabricksIntegrationAccountOAuthAuthRequest() {} + + @JsonCreator + public DatabricksIntegrationAccountOAuthAuthRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountOAuthAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_ID) String clientId, + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_SECRET) String clientSecret) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.clientId = clientId; + this.clientSecret = clientSecret; + } + + public DatabricksIntegrationAccountOAuthAuthRequest authType( + DatabricksIntegrationAccountOAuthAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + return this; + } + + /** + * The authentication method type. + * + * @return authType + */ + @JsonProperty(JSON_PROPERTY_AUTH_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountOAuthAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountOAuthAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public DatabricksIntegrationAccountOAuthAuthRequest azureTenantId(String azureTenantId) { + this.azureTenantId = azureTenantId; + return this; + } + + /** + * Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + * + * @return azureTenantId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AZURE_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAzureTenantId() { + return azureTenantId; + } + + public void setAzureTenantId(String azureTenantId) { + this.azureTenantId = azureTenantId; + } + + public DatabricksIntegrationAccountOAuthAuthRequest clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client ID of the Databricks service principal. + * + * @return clientId + */ + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public DatabricksIntegrationAccountOAuthAuthRequest clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Secret of the Databricks service principal. + * + * @return clientSecret + */ + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientSecret() { + return clientSecret; + } + + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + + /** Return true if this DatabricksIntegrationAccountOAuthAuthRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountOAuthAuthRequest databricksIntegrationAccountOAuthAuthRequest = + (DatabricksIntegrationAccountOAuthAuthRequest) o; + return Objects.equals(this.authType, databricksIntegrationAccountOAuthAuthRequest.authType) + && Objects.equals( + this.azureTenantId, databricksIntegrationAccountOAuthAuthRequest.azureTenantId) + && Objects.equals(this.clientId, databricksIntegrationAccountOAuthAuthRequest.clientId) + && Objects.equals( + this.clientSecret, databricksIntegrationAccountOAuthAuthRequest.clientSecret); + } + + @Override + public int hashCode() { + return Objects.hash(authType, azureTenantId, clientId, clientSecret); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountOAuthAuthRequest {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" azureTenantId: ").append(toIndentedString(azureTenantId)).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 "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthResponse.java new file mode 100644 index 00000000000..39f66b326b9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthResponse.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks OAuth authentication method and service principal configured on the account. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountOAuthAuthResponse.JSON_PROPERTY_AUTH_TYPE, + DatabricksIntegrationAccountOAuthAuthResponse.JSON_PROPERTY_AZURE_TENANT_ID, + DatabricksIntegrationAccountOAuthAuthResponse.JSON_PROPERTY_CLIENT_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountOAuthAuthResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountOAuthAuthType authType = + DatabricksIntegrationAccountOAuthAuthType.DATABRICKS_OAUTH; + + public static final String JSON_PROPERTY_AZURE_TENANT_ID = "azure_tenant_id"; + private String azureTenantId; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private String clientId; + + public DatabricksIntegrationAccountOAuthAuthResponse() {} + + @JsonCreator + public DatabricksIntegrationAccountOAuthAuthResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountOAuthAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_ID) String clientId) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.clientId = clientId; + } + + public DatabricksIntegrationAccountOAuthAuthResponse authType( + DatabricksIntegrationAccountOAuthAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + return this; + } + + /** + * The authentication method type. + * + * @return authType + */ + @JsonProperty(JSON_PROPERTY_AUTH_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountOAuthAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountOAuthAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public DatabricksIntegrationAccountOAuthAuthResponse azureTenantId(String azureTenantId) { + this.azureTenantId = azureTenantId; + return this; + } + + /** + * Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + * + * @return azureTenantId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AZURE_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAzureTenantId() { + return azureTenantId; + } + + public void setAzureTenantId(String azureTenantId) { + this.azureTenantId = azureTenantId; + } + + public DatabricksIntegrationAccountOAuthAuthResponse clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client ID of the Databricks service principal. + * + * @return clientId + */ + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountOAuthAuthResponse + */ + @JsonAnySetter + public DatabricksIntegrationAccountOAuthAuthResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountOAuthAuthResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountOAuthAuthResponse databricksIntegrationAccountOAuthAuthResponse = + (DatabricksIntegrationAccountOAuthAuthResponse) o; + return Objects.equals(this.authType, databricksIntegrationAccountOAuthAuthResponse.authType) + && Objects.equals( + this.azureTenantId, databricksIntegrationAccountOAuthAuthResponse.azureTenantId) + && Objects.equals(this.clientId, databricksIntegrationAccountOAuthAuthResponse.clientId) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountOAuthAuthResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, azureTenantId, clientId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountOAuthAuthResponse {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" azureTenantId: ").append(toIndentedString(azureTenantId)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthType.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthType.java new file mode 100644 index 00000000000..b26e14d033d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthType.java @@ -0,0 +1,63 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The authentication method type. */ +@JsonSerialize( + using = + DatabricksIntegrationAccountOAuthAuthType + .DatabricksIntegrationAccountOAuthAuthTypeSerializer.class) +public class DatabricksIntegrationAccountOAuthAuthType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("databricks-oauth")); + + public static final DatabricksIntegrationAccountOAuthAuthType DATABRICKS_OAUTH = + new DatabricksIntegrationAccountOAuthAuthType("databricks-oauth"); + + DatabricksIntegrationAccountOAuthAuthType(String value) { + super(value, allowedValues); + } + + public static class DatabricksIntegrationAccountOAuthAuthTypeSerializer + extends StdSerializer { + public DatabricksIntegrationAccountOAuthAuthTypeSerializer( + Class t) { + super(t); + } + + public DatabricksIntegrationAccountOAuthAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DatabricksIntegrationAccountOAuthAuthType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DatabricksIntegrationAccountOAuthAuthType fromValue(String value) { + return new DatabricksIntegrationAccountOAuthAuthType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthUpdate.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthUpdate.java new file mode 100644 index 00000000000..913a250783e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthUpdate.java @@ -0,0 +1,188 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Databricks OAuth machine-to-machine authentication using a service principal. Omit + * client_secret to keep the stored one; client_id must be provided on every + * submission. Omitting azure_tenant_id clears it. + */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountOAuthAuthUpdate.JSON_PROPERTY_AUTH_TYPE, + DatabricksIntegrationAccountOAuthAuthUpdate.JSON_PROPERTY_AZURE_TENANT_ID, + DatabricksIntegrationAccountOAuthAuthUpdate.JSON_PROPERTY_CLIENT_ID, + DatabricksIntegrationAccountOAuthAuthUpdate.JSON_PROPERTY_CLIENT_SECRET +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountOAuthAuthUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountOAuthAuthType authType = + DatabricksIntegrationAccountOAuthAuthType.DATABRICKS_OAUTH; + + public static final String JSON_PROPERTY_AZURE_TENANT_ID = "azure_tenant_id"; + private String azureTenantId; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private String clientId; + + public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; + private String clientSecret; + + public DatabricksIntegrationAccountOAuthAuthUpdate() {} + + @JsonCreator + public DatabricksIntegrationAccountOAuthAuthUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountOAuthAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_ID) String clientId) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.clientId = clientId; + } + + public DatabricksIntegrationAccountOAuthAuthUpdate authType( + DatabricksIntegrationAccountOAuthAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + return this; + } + + /** + * The authentication method type. + * + * @return authType + */ + @JsonProperty(JSON_PROPERTY_AUTH_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountOAuthAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountOAuthAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public DatabricksIntegrationAccountOAuthAuthUpdate azureTenantId(String azureTenantId) { + this.azureTenantId = azureTenantId; + return this; + } + + /** + * Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + * + * @return azureTenantId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AZURE_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAzureTenantId() { + return azureTenantId; + } + + public void setAzureTenantId(String azureTenantId) { + this.azureTenantId = azureTenantId; + } + + public DatabricksIntegrationAccountOAuthAuthUpdate clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client ID of the Databricks service principal. + * + * @return clientId + */ + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public DatabricksIntegrationAccountOAuthAuthUpdate clientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Secret of the Databricks service principal. + * + * @return clientSecret + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientSecret() { + return clientSecret; + } + + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + + /** Return true if this DatabricksIntegrationAccountOAuthAuthUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountOAuthAuthUpdate databricksIntegrationAccountOAuthAuthUpdate = + (DatabricksIntegrationAccountOAuthAuthUpdate) o; + return Objects.equals(this.authType, databricksIntegrationAccountOAuthAuthUpdate.authType) + && Objects.equals( + this.azureTenantId, databricksIntegrationAccountOAuthAuthUpdate.azureTenantId) + && Objects.equals(this.clientId, databricksIntegrationAccountOAuthAuthUpdate.clientId) + && Objects.equals( + this.clientSecret, databricksIntegrationAccountOAuthAuthUpdate.clientSecret); + } + + @Override + public int hashCode() { + return Objects.hash(authType, azureTenantId, clientId, clientSecret); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountOAuthAuthUpdate {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" azureTenantId: ").append(toIndentedString(azureTenantId)).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 "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthResponse.java new file mode 100644 index 00000000000..213dacf35c8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthResponse.java @@ -0,0 +1,161 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The Databricks personal access token authentication method configured on the account. Deprecated: + * migrate these accounts to databricks-oauth or private-action-runner. + * + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({DatabricksIntegrationAccountPatAuthResponse.JSON_PROPERTY_AUTH_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountPatAuthResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountPatAuthType authType = + DatabricksIntegrationAccountPatAuthType.PAT; + + public DatabricksIntegrationAccountPatAuthResponse() {} + + @JsonCreator + public DatabricksIntegrationAccountPatAuthResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountPatAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public DatabricksIntegrationAccountPatAuthResponse authType( + DatabricksIntegrationAccountPatAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + return this; + } + + /** + * The authentication method type. + * + * @return authType + */ + @JsonProperty(JSON_PROPERTY_AUTH_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountPatAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountPatAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountPatAuthResponse + */ + @JsonAnySetter + public DatabricksIntegrationAccountPatAuthResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountPatAuthResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountPatAuthResponse databricksIntegrationAccountPatAuthResponse = + (DatabricksIntegrationAccountPatAuthResponse) o; + return Objects.equals(this.authType, databricksIntegrationAccountPatAuthResponse.authType) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountPatAuthResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountPatAuthResponse {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthType.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthType.java new file mode 100644 index 00000000000..1e38f8b3a15 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthType.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The authentication method type. */ +@JsonSerialize( + using = + DatabricksIntegrationAccountPatAuthType.DatabricksIntegrationAccountPatAuthTypeSerializer + .class) +public class DatabricksIntegrationAccountPatAuthType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("pat")); + + public static final DatabricksIntegrationAccountPatAuthType PAT = + new DatabricksIntegrationAccountPatAuthType("pat"); + + DatabricksIntegrationAccountPatAuthType(String value) { + super(value, allowedValues); + } + + public static class DatabricksIntegrationAccountPatAuthTypeSerializer + extends StdSerializer { + public DatabricksIntegrationAccountPatAuthTypeSerializer( + Class t) { + super(t); + } + + public DatabricksIntegrationAccountPatAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DatabricksIntegrationAccountPatAuthType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DatabricksIntegrationAccountPatAuthType fromValue(String value) { + return new DatabricksIntegrationAccountPatAuthType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthUpdate.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthUpdate.java new file mode 100644 index 00000000000..a388d97ad61 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPatAuthUpdate.java @@ -0,0 +1,134 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Databricks personal access token authentication. Deprecated: accepted only on accounts that + * already use it, and never on creation. Use databricks-oauth or + * private-action-runner instead. Omit token to keep the stored one. + * + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DatabricksIntegrationAccountPatAuthUpdate.JSON_PROPERTY_AUTH_TYPE, + DatabricksIntegrationAccountPatAuthUpdate.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountPatAuthUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountPatAuthType authType = + DatabricksIntegrationAccountPatAuthType.PAT; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public DatabricksIntegrationAccountPatAuthUpdate() {} + + @JsonCreator + public DatabricksIntegrationAccountPatAuthUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountPatAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public DatabricksIntegrationAccountPatAuthUpdate authType( + DatabricksIntegrationAccountPatAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + return this; + } + + /** + * The authentication method type. + * + * @return authType + */ + @JsonProperty(JSON_PROPERTY_AUTH_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountPatAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountPatAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public DatabricksIntegrationAccountPatAuthUpdate token(String token) { + this.token = token; + return this; + } + + /** + * Secret Databricks personal access token. + * + * @return token + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token; + } + + /** Return true if this DatabricksIntegrationAccountPatAuthUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountPatAuthUpdate databricksIntegrationAccountPatAuthUpdate = + (DatabricksIntegrationAccountPatAuthUpdate) o; + return Objects.equals(this.authType, databricksIntegrationAccountPatAuthUpdate.authType) + && Objects.equals(this.token, databricksIntegrationAccountPatAuthUpdate.token); + } + + @Override + public int hashCode() { + return Objects.hash(authType, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountPatAuthUpdate {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).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"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponse.java new file mode 100644 index 00000000000..8001d7b8ea2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponse.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response payload for a single Databricks integration account. */ +@JsonPropertyOrder({DatabricksIntegrationAccountResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DatabricksIntegrationAccountResponseData data; + + public DatabricksIntegrationAccountResponse() {} + + @JsonCreator + public DatabricksIntegrationAccountResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + DatabricksIntegrationAccountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DatabricksIntegrationAccountResponse data(DatabricksIntegrationAccountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope of a Databricks integration account, including server-assigned identity. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountResponseData getData() { + return data; + } + + public void setData(DatabricksIntegrationAccountResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountResponse + */ + @JsonAnySetter + public DatabricksIntegrationAccountResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountResponse databricksIntegrationAccountResponse = + (DatabricksIntegrationAccountResponse) o; + return Objects.equals(this.data, databricksIntegrationAccountResponse.data) + && Objects.equals( + this.additionalProperties, databricksIntegrationAccountResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponseAttributes.java new file mode 100644 index 00000000000..ab63d68e202 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponseAttributes.java @@ -0,0 +1,249 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Databricks integration account returned in responses. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountResponseAttributes.JSON_PROPERTY_AUTHENTICATION, + DatabricksIntegrationAccountResponseAttributes.JSON_PROPERTY_DATAFLOWS, + DatabricksIntegrationAccountResponseAttributes.JSON_PROPERTY_NAME, + DatabricksIntegrationAccountResponseAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private DatabricksIntegrationAccountAuthenticationResponse authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private DatabricksIntegrationDataflowsResponse dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksIntegrationAccountSettingsResponse settings; + + public DatabricksIntegrationAccountResponseAttributes() {} + + @JsonCreator + public DatabricksIntegrationAccountResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) + DatabricksIntegrationAccountSettingsResponse settings) { + this.name = name; + this.settings = settings; + this.unparsed |= settings.unparsed; + } + + public DatabricksIntegrationAccountResponseAttributes authentication( + DatabricksIntegrationAccountAuthenticationResponse authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication configured on the Databricks integration account. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksIntegrationAccountAuthenticationResponse getAuthentication() { + return authentication; + } + + public void setAuthentication(DatabricksIntegrationAccountAuthenticationResponse authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public DatabricksIntegrationAccountResponseAttributes dataflows( + DatabricksIntegrationDataflowsResponse dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Dataflows configured on the Databricks integration account, keyed by dataflow id. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksIntegrationDataflowsResponse getDataflows() { + return dataflows; + } + + public void setDataflows(DatabricksIntegrationDataflowsResponse dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public DatabricksIntegrationAccountResponseAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the Databricks integration account. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public DatabricksIntegrationAccountResponseAttributes settings( + DatabricksIntegrationAccountSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings configured on the Databricks integration account. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountSettingsResponse getSettings() { + return settings; + } + + public void setSettings(DatabricksIntegrationAccountSettingsResponse settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountResponseAttributes + */ + @JsonAnySetter + public DatabricksIntegrationAccountResponseAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountResponseAttributes databricksIntegrationAccountResponseAttributes = + (DatabricksIntegrationAccountResponseAttributes) o; + return Objects.equals( + this.authentication, databricksIntegrationAccountResponseAttributes.authentication) + && Objects.equals(this.dataflows, databricksIntegrationAccountResponseAttributes.dataflows) + && Objects.equals(this.name, databricksIntegrationAccountResponseAttributes.name) + && Objects.equals(this.settings, databricksIntegrationAccountResponseAttributes.settings) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountResponseAttributes {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" dataflows: ").append(toIndentedString(dataflows)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponseData.java new file mode 100644 index 00000000000..48c429ceb49 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponseData.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope of a Databricks integration account, including server-assigned identity. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountResponseData.JSON_PROPERTY_ATTRIBUTES, + DatabricksIntegrationAccountResponseData.JSON_PROPERTY_ID, + DatabricksIntegrationAccountResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DatabricksIntegrationAccountResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public DatabricksIntegrationAccountResponseData() {} + + @JsonCreator + public DatabricksIntegrationAccountResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DatabricksIntegrationAccountResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DatabricksIntegrationAccountResponseData attributes( + DatabricksIntegrationAccountResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Databricks integration account returned in responses. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DatabricksIntegrationAccountResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + /** + * Server-generated unique identifier of the Databricks integration account. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public DatabricksIntegrationAccountResponseData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountResponseData + */ + @JsonAnySetter + public DatabricksIntegrationAccountResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountResponseData databricksIntegrationAccountResponseData = + (DatabricksIntegrationAccountResponseData) o; + return Objects.equals(this.attributes, databricksIntegrationAccountResponseData.attributes) + && Objects.equals(this.id, databricksIntegrationAccountResponseData.id) + && Objects.equals(this.type, databricksIntegrationAccountResponseData.type) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsRequest.java new file mode 100644 index 00000000000..19090bea502 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsRequest.java @@ -0,0 +1,126 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** Settings for creating the Databricks integration account. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountSettingsRequest.JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID, + DatabricksIntegrationAccountSettingsRequest.JSON_PROPERTY_WORKSPACE_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountSettingsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID = + "system_tables_sql_warehouse_id"; + private String systemTablesSqlWarehouseId; + + public static final String JSON_PROPERTY_WORKSPACE_URL = "workspace_url"; + private String workspaceUrl; + + public DatabricksIntegrationAccountSettingsRequest() {} + + @JsonCreator + public DatabricksIntegrationAccountSettingsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_WORKSPACE_URL) String workspaceUrl) { + this.workspaceUrl = workspaceUrl; + } + + public DatabricksIntegrationAccountSettingsRequest systemTablesSqlWarehouseId( + String systemTablesSqlWarehouseId) { + this.systemTablesSqlWarehouseId = systemTablesSqlWarehouseId; + return this; + } + + /** + * ID of the SQL warehouse used to query the Databricks system tables. + * + * @return systemTablesSqlWarehouseId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSystemTablesSqlWarehouseId() { + return systemTablesSqlWarehouseId; + } + + public void setSystemTablesSqlWarehouseId(String systemTablesSqlWarehouseId) { + this.systemTablesSqlWarehouseId = systemTablesSqlWarehouseId; + } + + public DatabricksIntegrationAccountSettingsRequest workspaceUrl(String workspaceUrl) { + this.workspaceUrl = workspaceUrl; + return this; + } + + /** + * URL of the Databricks workspace. + * + * @return workspaceUrl + */ + @JsonProperty(JSON_PROPERTY_WORKSPACE_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getWorkspaceUrl() { + return workspaceUrl; + } + + public void setWorkspaceUrl(String workspaceUrl) { + this.workspaceUrl = workspaceUrl; + } + + /** Return true if this DatabricksIntegrationAccountSettingsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountSettingsRequest databricksIntegrationAccountSettingsRequest = + (DatabricksIntegrationAccountSettingsRequest) o; + return Objects.equals( + this.systemTablesSqlWarehouseId, + databricksIntegrationAccountSettingsRequest.systemTablesSqlWarehouseId) + && Objects.equals( + this.workspaceUrl, databricksIntegrationAccountSettingsRequest.workspaceUrl); + } + + @Override + public int hashCode() { + return Objects.hash(systemTablesSqlWarehouseId, workspaceUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountSettingsRequest {\n"); + sb.append(" systemTablesSqlWarehouseId: ") + .append(toIndentedString(systemTablesSqlWarehouseId)) + .append("\n"); + sb.append(" workspaceUrl: ").append(toIndentedString(workspaceUrl)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsResponse.java new file mode 100644 index 00000000000..572be600fb2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsResponse.java @@ -0,0 +1,183 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Settings configured on the Databricks integration account. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountSettingsResponse.JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID, + DatabricksIntegrationAccountSettingsResponse.JSON_PROPERTY_WORKSPACE_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountSettingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID = + "system_tables_sql_warehouse_id"; + private String systemTablesSqlWarehouseId; + + public static final String JSON_PROPERTY_WORKSPACE_URL = "workspace_url"; + private String workspaceUrl; + + public DatabricksIntegrationAccountSettingsResponse() {} + + @JsonCreator + public DatabricksIntegrationAccountSettingsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_WORKSPACE_URL) String workspaceUrl) { + this.workspaceUrl = workspaceUrl; + } + + public DatabricksIntegrationAccountSettingsResponse systemTablesSqlWarehouseId( + String systemTablesSqlWarehouseId) { + this.systemTablesSqlWarehouseId = systemTablesSqlWarehouseId; + return this; + } + + /** + * ID of the SQL warehouse used to query the Databricks system tables. + * + * @return systemTablesSqlWarehouseId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSystemTablesSqlWarehouseId() { + return systemTablesSqlWarehouseId; + } + + public void setSystemTablesSqlWarehouseId(String systemTablesSqlWarehouseId) { + this.systemTablesSqlWarehouseId = systemTablesSqlWarehouseId; + } + + public DatabricksIntegrationAccountSettingsResponse workspaceUrl(String workspaceUrl) { + this.workspaceUrl = workspaceUrl; + return this; + } + + /** + * URL of the Databricks workspace. + * + * @return workspaceUrl + */ + @JsonProperty(JSON_PROPERTY_WORKSPACE_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getWorkspaceUrl() { + return workspaceUrl; + } + + public void setWorkspaceUrl(String workspaceUrl) { + this.workspaceUrl = workspaceUrl; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountSettingsResponse + */ + @JsonAnySetter + public DatabricksIntegrationAccountSettingsResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountSettingsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountSettingsResponse databricksIntegrationAccountSettingsResponse = + (DatabricksIntegrationAccountSettingsResponse) o; + return Objects.equals( + this.systemTablesSqlWarehouseId, + databricksIntegrationAccountSettingsResponse.systemTablesSqlWarehouseId) + && Objects.equals( + this.workspaceUrl, databricksIntegrationAccountSettingsResponse.workspaceUrl) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountSettingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(systemTablesSqlWarehouseId, workspaceUrl, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountSettingsResponse {\n"); + sb.append(" systemTablesSqlWarehouseId: ") + .append(toIndentedString(systemTablesSqlWarehouseId)) + .append("\n"); + sb.append(" workspaceUrl: ").append(toIndentedString(workspaceUrl)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsUpdate.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsUpdate.java new file mode 100644 index 00000000000..2d9d7a60744 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsUpdate.java @@ -0,0 +1,120 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Settings for updating the Databricks integration account. Only the fields provided are changed. + */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountSettingsUpdate.JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID, + DatabricksIntegrationAccountSettingsUpdate.JSON_PROPERTY_WORKSPACE_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountSettingsUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID = + "system_tables_sql_warehouse_id"; + private String systemTablesSqlWarehouseId; + + public static final String JSON_PROPERTY_WORKSPACE_URL = "workspace_url"; + private String workspaceUrl; + + public DatabricksIntegrationAccountSettingsUpdate systemTablesSqlWarehouseId( + String systemTablesSqlWarehouseId) { + this.systemTablesSqlWarehouseId = systemTablesSqlWarehouseId; + return this; + } + + /** + * ID of the SQL warehouse used to query the Databricks system tables. + * + * @return systemTablesSqlWarehouseId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYSTEM_TABLES_SQL_WAREHOUSE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSystemTablesSqlWarehouseId() { + return systemTablesSqlWarehouseId; + } + + public void setSystemTablesSqlWarehouseId(String systemTablesSqlWarehouseId) { + this.systemTablesSqlWarehouseId = systemTablesSqlWarehouseId; + } + + public DatabricksIntegrationAccountSettingsUpdate workspaceUrl(String workspaceUrl) { + this.workspaceUrl = workspaceUrl; + return this; + } + + /** + * URL of the Databricks workspace. + * + * @return workspaceUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKSPACE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWorkspaceUrl() { + return workspaceUrl; + } + + public void setWorkspaceUrl(String workspaceUrl) { + this.workspaceUrl = workspaceUrl; + } + + /** Return true if this DatabricksIntegrationAccountSettingsUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountSettingsUpdate databricksIntegrationAccountSettingsUpdate = + (DatabricksIntegrationAccountSettingsUpdate) o; + return Objects.equals( + this.systemTablesSqlWarehouseId, + databricksIntegrationAccountSettingsUpdate.systemTablesSqlWarehouseId) + && Objects.equals( + this.workspaceUrl, databricksIntegrationAccountSettingsUpdate.workspaceUrl); + } + + @Override + public int hashCode() { + return Objects.hash(systemTablesSqlWarehouseId, workspaceUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountSettingsUpdate {\n"); + sb.append(" systemTablesSqlWarehouseId: ") + .append(toIndentedString(systemTablesSqlWarehouseId)) + .append("\n"); + sb.append(" workspaceUrl: ").append(toIndentedString(workspaceUrl)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateAttributes.java new file mode 100644 index 00000000000..1e12befc06c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateAttributes.java @@ -0,0 +1,249 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Writable attributes used to update a Databricks integration account. Every field is optional; + * only the fields provided are changed. When dataflows is provided, only the dataflow + * ids included in the request are modified; dataflows omitted from the map keep their current + * configuration, as do the settings of an included dataflow that provides only enabled + * . + */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountUpdateAttributes.JSON_PROPERTY_AUTHENTICATION, + DatabricksIntegrationAccountUpdateAttributes.JSON_PROPERTY_DATAFLOWS, + DatabricksIntegrationAccountUpdateAttributes.JSON_PROPERTY_NAME, + DatabricksIntegrationAccountUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private DatabricksIntegrationAccountAuthenticationUpdate authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private DatabricksIntegrationDataflowsRequest dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private DatabricksIntegrationAccountSettingsUpdate settings; + + public DatabricksIntegrationAccountUpdateAttributes authentication( + DatabricksIntegrationAccountAuthenticationUpdate authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for updating the Databricks integration account. Exactly one method is set. + * Choosing private-action-runner leaves the databricks-model-serving-metrics + * dataflow unable to collect data. pat is accepted only on accounts that + * already use it, so it cannot move an account onto personal access token authentication. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksIntegrationAccountAuthenticationUpdate getAuthentication() { + return authentication; + } + + public void setAuthentication(DatabricksIntegrationAccountAuthenticationUpdate authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public DatabricksIntegrationAccountUpdateAttributes dataflows( + DatabricksIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Dataflows to configure on the Databricks integration account, keyed by dataflow id. Some + * dataflows and settings have prerequisites, noted on each. Those prerequisites are not checked + * when the request is made, so anything left enabled without them is stored but collects no data. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksIntegrationDataflowsRequest getDataflows() { + return dataflows; + } + + public void setDataflows(DatabricksIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public DatabricksIntegrationAccountUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the Databricks integration account. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public DatabricksIntegrationAccountUpdateAttributes settings( + DatabricksIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for updating the Databricks integration account. Only the fields provided are changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksIntegrationAccountSettingsUpdate getSettings() { + return settings; + } + + public void setSettings(DatabricksIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountUpdateAttributes + */ + @JsonAnySetter + public DatabricksIntegrationAccountUpdateAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountUpdateAttributes databricksIntegrationAccountUpdateAttributes = + (DatabricksIntegrationAccountUpdateAttributes) o; + return Objects.equals( + this.authentication, databricksIntegrationAccountUpdateAttributes.authentication) + && Objects.equals(this.dataflows, databricksIntegrationAccountUpdateAttributes.dataflows) + && Objects.equals(this.name, databricksIntegrationAccountUpdateAttributes.name) + && Objects.equals(this.settings, databricksIntegrationAccountUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountUpdateAttributes {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" dataflows: ").append(toIndentedString(dataflows)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateData.java new file mode 100644 index 00000000000..84635f1b8de --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateData.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope for updating a Databricks integration account. */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountUpdateData.JSON_PROPERTY_ATTRIBUTES, + DatabricksIntegrationAccountUpdateData.JSON_PROPERTY_ID, + DatabricksIntegrationAccountUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DatabricksIntegrationAccountUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public DatabricksIntegrationAccountUpdateData() {} + + @JsonCreator + public DatabricksIntegrationAccountUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DatabricksIntegrationAccountUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DatabricksIntegrationAccountUpdateData attributes( + DatabricksIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Writable attributes used to update a Databricks integration account. Every field is optional; + * only the fields provided are changed. When dataflows is provided, only the + * dataflow ids included in the request are modified; dataflows omitted from the map keep their + * current configuration, as do the settings of an included dataflow that provides only + * enabled. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DatabricksIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DatabricksIntegrationAccountUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the Databricks integration account to update. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DatabricksIntegrationAccountUpdateData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountUpdateData + */ + @JsonAnySetter + public DatabricksIntegrationAccountUpdateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountUpdateData databricksIntegrationAccountUpdateData = + (DatabricksIntegrationAccountUpdateData) o; + return Objects.equals(this.attributes, databricksIntegrationAccountUpdateData.attributes) + && Objects.equals(this.id, databricksIntegrationAccountUpdateData.id) + && Objects.equals(this.type, databricksIntegrationAccountUpdateData.type) + && Objects.equals( + this.additionalProperties, databricksIntegrationAccountUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateRequest.java new file mode 100644 index 00000000000..e4d01e41b66 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateRequest.java @@ -0,0 +1,153 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload to update a Databricks integration account. */ +@JsonPropertyOrder({DatabricksIntegrationAccountUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DatabricksIntegrationAccountUpdateData data; + + public DatabricksIntegrationAccountUpdateRequest() {} + + @JsonCreator + public DatabricksIntegrationAccountUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + DatabricksIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DatabricksIntegrationAccountUpdateRequest data( + DatabricksIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for updating a Databricks integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DatabricksIntegrationAccountUpdateData getData() { + return data; + } + + public void setData(DatabricksIntegrationAccountUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountUpdateRequest + */ + @JsonAnySetter + public DatabricksIntegrationAccountUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountUpdateRequest databricksIntegrationAccountUpdateRequest = + (DatabricksIntegrationAccountUpdateRequest) o; + return Objects.equals(this.data, databricksIntegrationAccountUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountsResponse.java new file mode 100644 index 00000000000..74fcf48d012 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountsResponse.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response payload for a list of Databricks integration accounts. */ +@JsonPropertyOrder({DatabricksIntegrationAccountsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public DatabricksIntegrationAccountsResponse() {} + + @JsonCreator + public DatabricksIntegrationAccountsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (DatabricksIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + + public DatabricksIntegrationAccountsResponse data( + List data) { + this.data = data; + for (DatabricksIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DatabricksIntegrationAccountsResponse addDataItem( + DatabricksIntegrationAccountResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of Databricks integration accounts. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (DatabricksIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationAccountsResponse + */ + @JsonAnySetter + public DatabricksIntegrationAccountsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationAccountsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountsResponse databricksIntegrationAccountsResponse = + (DatabricksIntegrationAccountsResponse) o; + return Objects.equals(this.data, databricksIntegrationAccountsResponse.data) + && Objects.equals( + this.additionalProperties, databricksIntegrationAccountsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationDataflowsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationDataflowsRequest.java new file mode 100644 index 00000000000..4efdcad91d5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationDataflowsRequest.java @@ -0,0 +1,259 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Dataflows to configure on the Databricks integration account, keyed by dataflow id. Some + * dataflows and settings have prerequisites, noted on each. Those prerequisites are not checked + * when the request is made, so anything left enabled without them is stored but collects no data. + */ +@JsonPropertyOrder({ + DatabricksIntegrationDataflowsRequest.JSON_PROPERTY_DATABRICKS_CLOUD_COST_METRICS, + DatabricksIntegrationDataflowsRequest.JSON_PROPERTY_DATABRICKS_DATA_JOB_MONITORING, + DatabricksIntegrationDataflowsRequest.JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY, + DatabricksIntegrationDataflowsRequest.JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS, + DatabricksIntegrationDataflowsRequest.JSON_PROPERTY_DATABRICKS_SERVERLESS_JOBS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationDataflowsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATABRICKS_CLOUD_COST_METRICS = + "databricks-cloud-cost-metrics"; + private DatabricksCloudCostMetricsIntegrationDataflowRequest databricksCloudCostMetrics; + + public static final String JSON_PROPERTY_DATABRICKS_DATA_JOB_MONITORING = + "databricks-data-job-monitoring"; + private DatabricksDataJobMonitoringIntegrationDataflowRequest databricksDataJobMonitoring; + + public static final String JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY = + "databricks-data-observability"; + private DatabricksDataObservabilityIntegrationDataflowRequest databricksDataObservability; + + public static final String JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS = + "databricks-model-serving-metrics"; + private DatabricksModelServingMetricsIntegrationDataflowRequest databricksModelServingMetrics; + + public static final String JSON_PROPERTY_DATABRICKS_SERVERLESS_JOBS = + "databricks-serverless-jobs"; + private DatabricksServerlessJobsIntegrationDataflowRequest databricksServerlessJobs; + + public DatabricksIntegrationDataflowsRequest databricksCloudCostMetrics( + DatabricksCloudCostMetricsIntegrationDataflowRequest databricksCloudCostMetrics) { + this.databricksCloudCostMetrics = databricksCloudCostMetrics; + this.unparsed |= databricksCloudCostMetrics.unparsed; + return this; + } + + /** + * The Databricks cloud cost metrics dataflow. + * + * @return databricksCloudCostMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_CLOUD_COST_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksCloudCostMetricsIntegrationDataflowRequest getDatabricksCloudCostMetrics() { + return databricksCloudCostMetrics; + } + + public void setDatabricksCloudCostMetrics( + DatabricksCloudCostMetricsIntegrationDataflowRequest databricksCloudCostMetrics) { + this.databricksCloudCostMetrics = databricksCloudCostMetrics; + if (databricksCloudCostMetrics != null) { + this.unparsed |= databricksCloudCostMetrics.unparsed; + } + } + + public DatabricksIntegrationDataflowsRequest databricksDataJobMonitoring( + DatabricksDataJobMonitoringIntegrationDataflowRequest databricksDataJobMonitoring) { + this.databricksDataJobMonitoring = databricksDataJobMonitoring; + this.unparsed |= databricksDataJobMonitoring.unparsed; + return this; + } + + /** + * The Databricks Data Jobs Monitoring dataflow. + * + * @return databricksDataJobMonitoring + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_DATA_JOB_MONITORING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataJobMonitoringIntegrationDataflowRequest getDatabricksDataJobMonitoring() { + return databricksDataJobMonitoring; + } + + public void setDatabricksDataJobMonitoring( + DatabricksDataJobMonitoringIntegrationDataflowRequest databricksDataJobMonitoring) { + this.databricksDataJobMonitoring = databricksDataJobMonitoring; + if (databricksDataJobMonitoring != null) { + this.unparsed |= databricksDataJobMonitoring.unparsed; + } + } + + public DatabricksIntegrationDataflowsRequest databricksDataObservability( + DatabricksDataObservabilityIntegrationDataflowRequest databricksDataObservability) { + this.databricksDataObservability = databricksDataObservability; + this.unparsed |= databricksDataObservability.unparsed; + return this; + } + + /** + * The Databricks data observability dataflow. + * + * @return databricksDataObservability + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityIntegrationDataflowRequest getDatabricksDataObservability() { + return databricksDataObservability; + } + + public void setDatabricksDataObservability( + DatabricksDataObservabilityIntegrationDataflowRequest databricksDataObservability) { + this.databricksDataObservability = databricksDataObservability; + if (databricksDataObservability != null) { + this.unparsed |= databricksDataObservability.unparsed; + } + } + + public DatabricksIntegrationDataflowsRequest databricksModelServingMetrics( + DatabricksModelServingMetricsIntegrationDataflowRequest databricksModelServingMetrics) { + this.databricksModelServingMetrics = databricksModelServingMetrics; + this.unparsed |= databricksModelServingMetrics.unparsed; + return this; + } + + /** + * The Databricks model serving metrics dataflow. Not supported on accounts that authenticate with + * private-action-runner; on those accounts this dataflow collects no data even when + * enabled. + * + * @return databricksModelServingMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksModelServingMetricsIntegrationDataflowRequest + getDatabricksModelServingMetrics() { + return databricksModelServingMetrics; + } + + public void setDatabricksModelServingMetrics( + DatabricksModelServingMetricsIntegrationDataflowRequest databricksModelServingMetrics) { + this.databricksModelServingMetrics = databricksModelServingMetrics; + if (databricksModelServingMetrics != null) { + this.unparsed |= databricksModelServingMetrics.unparsed; + } + } + + public DatabricksIntegrationDataflowsRequest databricksServerlessJobs( + DatabricksServerlessJobsIntegrationDataflowRequest databricksServerlessJobs) { + this.databricksServerlessJobs = databricksServerlessJobs; + this.unparsed |= databricksServerlessJobs.unparsed; + return this; + } + + /** + * The Databricks serverless jobs dataflow. + * + * @return databricksServerlessJobs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_SERVERLESS_JOBS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksServerlessJobsIntegrationDataflowRequest getDatabricksServerlessJobs() { + return databricksServerlessJobs; + } + + public void setDatabricksServerlessJobs( + DatabricksServerlessJobsIntegrationDataflowRequest databricksServerlessJobs) { + this.databricksServerlessJobs = databricksServerlessJobs; + if (databricksServerlessJobs != null) { + this.unparsed |= databricksServerlessJobs.unparsed; + } + } + + /** Return true if this DatabricksIntegrationDataflowsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationDataflowsRequest databricksIntegrationDataflowsRequest = + (DatabricksIntegrationDataflowsRequest) o; + return Objects.equals( + this.databricksCloudCostMetrics, + databricksIntegrationDataflowsRequest.databricksCloudCostMetrics) + && Objects.equals( + this.databricksDataJobMonitoring, + databricksIntegrationDataflowsRequest.databricksDataJobMonitoring) + && Objects.equals( + this.databricksDataObservability, + databricksIntegrationDataflowsRequest.databricksDataObservability) + && Objects.equals( + this.databricksModelServingMetrics, + databricksIntegrationDataflowsRequest.databricksModelServingMetrics) + && Objects.equals( + this.databricksServerlessJobs, + databricksIntegrationDataflowsRequest.databricksServerlessJobs); + } + + @Override + public int hashCode() { + return Objects.hash( + databricksCloudCostMetrics, + databricksDataJobMonitoring, + databricksDataObservability, + databricksModelServingMetrics, + databricksServerlessJobs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationDataflowsRequest {\n"); + sb.append(" databricksCloudCostMetrics: ") + .append(toIndentedString(databricksCloudCostMetrics)) + .append("\n"); + sb.append(" databricksDataJobMonitoring: ") + .append(toIndentedString(databricksDataJobMonitoring)) + .append("\n"); + sb.append(" databricksDataObservability: ") + .append(toIndentedString(databricksDataObservability)) + .append("\n"); + sb.append(" databricksModelServingMetrics: ") + .append(toIndentedString(databricksModelServingMetrics)) + .append("\n"); + sb.append(" databricksServerlessJobs: ") + .append(toIndentedString(databricksServerlessJobs)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationDataflowsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationDataflowsResponse.java new file mode 100644 index 00000000000..b79713aa9f7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationDataflowsResponse.java @@ -0,0 +1,311 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Dataflows configured on the Databricks integration account, keyed by dataflow id. */ +@JsonPropertyOrder({ + DatabricksIntegrationDataflowsResponse.JSON_PROPERTY_DATABRICKS_CLOUD_COST_METRICS, + DatabricksIntegrationDataflowsResponse.JSON_PROPERTY_DATABRICKS_DATA_JOB_MONITORING, + DatabricksIntegrationDataflowsResponse.JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY, + DatabricksIntegrationDataflowsResponse.JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS, + DatabricksIntegrationDataflowsResponse.JSON_PROPERTY_DATABRICKS_SERVERLESS_JOBS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationDataflowsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATABRICKS_CLOUD_COST_METRICS = + "databricks-cloud-cost-metrics"; + private DatabricksCloudCostMetricsIntegrationDataflowResponse databricksCloudCostMetrics; + + public static final String JSON_PROPERTY_DATABRICKS_DATA_JOB_MONITORING = + "databricks-data-job-monitoring"; + private DatabricksDataJobMonitoringIntegrationDataflowResponse databricksDataJobMonitoring; + + public static final String JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY = + "databricks-data-observability"; + private DatabricksDataObservabilityIntegrationDataflowResponse databricksDataObservability; + + public static final String JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS = + "databricks-model-serving-metrics"; + private DatabricksModelServingMetricsIntegrationDataflowResponse databricksModelServingMetrics; + + public static final String JSON_PROPERTY_DATABRICKS_SERVERLESS_JOBS = + "databricks-serverless-jobs"; + private DatabricksServerlessJobsIntegrationDataflowResponse databricksServerlessJobs; + + public DatabricksIntegrationDataflowsResponse databricksCloudCostMetrics( + DatabricksCloudCostMetricsIntegrationDataflowResponse databricksCloudCostMetrics) { + this.databricksCloudCostMetrics = databricksCloudCostMetrics; + this.unparsed |= databricksCloudCostMetrics.unparsed; + return this; + } + + /** + * The Databricks cloud cost metrics dataflow. + * + * @return databricksCloudCostMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_CLOUD_COST_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksCloudCostMetricsIntegrationDataflowResponse getDatabricksCloudCostMetrics() { + return databricksCloudCostMetrics; + } + + public void setDatabricksCloudCostMetrics( + DatabricksCloudCostMetricsIntegrationDataflowResponse databricksCloudCostMetrics) { + this.databricksCloudCostMetrics = databricksCloudCostMetrics; + if (databricksCloudCostMetrics != null) { + this.unparsed |= databricksCloudCostMetrics.unparsed; + } + } + + public DatabricksIntegrationDataflowsResponse databricksDataJobMonitoring( + DatabricksDataJobMonitoringIntegrationDataflowResponse databricksDataJobMonitoring) { + this.databricksDataJobMonitoring = databricksDataJobMonitoring; + this.unparsed |= databricksDataJobMonitoring.unparsed; + return this; + } + + /** + * The Databricks Data Jobs Monitoring dataflow. + * + * @return databricksDataJobMonitoring + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_DATA_JOB_MONITORING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataJobMonitoringIntegrationDataflowResponse getDatabricksDataJobMonitoring() { + return databricksDataJobMonitoring; + } + + public void setDatabricksDataJobMonitoring( + DatabricksDataJobMonitoringIntegrationDataflowResponse databricksDataJobMonitoring) { + this.databricksDataJobMonitoring = databricksDataJobMonitoring; + if (databricksDataJobMonitoring != null) { + this.unparsed |= databricksDataJobMonitoring.unparsed; + } + } + + public DatabricksIntegrationDataflowsResponse databricksDataObservability( + DatabricksDataObservabilityIntegrationDataflowResponse databricksDataObservability) { + this.databricksDataObservability = databricksDataObservability; + this.unparsed |= databricksDataObservability.unparsed; + return this; + } + + /** + * The Databricks data observability dataflow. + * + * @return databricksDataObservability + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityIntegrationDataflowResponse getDatabricksDataObservability() { + return databricksDataObservability; + } + + public void setDatabricksDataObservability( + DatabricksDataObservabilityIntegrationDataflowResponse databricksDataObservability) { + this.databricksDataObservability = databricksDataObservability; + if (databricksDataObservability != null) { + this.unparsed |= databricksDataObservability.unparsed; + } + } + + public DatabricksIntegrationDataflowsResponse databricksModelServingMetrics( + DatabricksModelServingMetricsIntegrationDataflowResponse databricksModelServingMetrics) { + this.databricksModelServingMetrics = databricksModelServingMetrics; + this.unparsed |= databricksModelServingMetrics.unparsed; + return this; + } + + /** + * The Databricks model serving metrics dataflow. Not supported on accounts that authenticate with + * private-action-runner; on those accounts this dataflow collects no data even when + * enabled. + * + * @return databricksModelServingMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksModelServingMetricsIntegrationDataflowResponse + getDatabricksModelServingMetrics() { + return databricksModelServingMetrics; + } + + public void setDatabricksModelServingMetrics( + DatabricksModelServingMetricsIntegrationDataflowResponse databricksModelServingMetrics) { + this.databricksModelServingMetrics = databricksModelServingMetrics; + if (databricksModelServingMetrics != null) { + this.unparsed |= databricksModelServingMetrics.unparsed; + } + } + + public DatabricksIntegrationDataflowsResponse databricksServerlessJobs( + DatabricksServerlessJobsIntegrationDataflowResponse databricksServerlessJobs) { + this.databricksServerlessJobs = databricksServerlessJobs; + this.unparsed |= databricksServerlessJobs.unparsed; + return this; + } + + /** + * The Databricks serverless jobs dataflow. + * + * @return databricksServerlessJobs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_SERVERLESS_JOBS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksServerlessJobsIntegrationDataflowResponse getDatabricksServerlessJobs() { + return databricksServerlessJobs; + } + + public void setDatabricksServerlessJobs( + DatabricksServerlessJobsIntegrationDataflowResponse databricksServerlessJobs) { + this.databricksServerlessJobs = databricksServerlessJobs; + if (databricksServerlessJobs != null) { + this.unparsed |= databricksServerlessJobs.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksIntegrationDataflowsResponse + */ + @JsonAnySetter + public DatabricksIntegrationDataflowsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DatabricksIntegrationDataflowsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationDataflowsResponse databricksIntegrationDataflowsResponse = + (DatabricksIntegrationDataflowsResponse) o; + return Objects.equals( + this.databricksCloudCostMetrics, + databricksIntegrationDataflowsResponse.databricksCloudCostMetrics) + && Objects.equals( + this.databricksDataJobMonitoring, + databricksIntegrationDataflowsResponse.databricksDataJobMonitoring) + && Objects.equals( + this.databricksDataObservability, + databricksIntegrationDataflowsResponse.databricksDataObservability) + && Objects.equals( + this.databricksModelServingMetrics, + databricksIntegrationDataflowsResponse.databricksModelServingMetrics) + && Objects.equals( + this.databricksServerlessJobs, + databricksIntegrationDataflowsResponse.databricksServerlessJobs) + && Objects.equals( + this.additionalProperties, databricksIntegrationDataflowsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + databricksCloudCostMetrics, + databricksDataJobMonitoring, + databricksDataObservability, + databricksModelServingMetrics, + databricksServerlessJobs, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationDataflowsResponse {\n"); + sb.append(" databricksCloudCostMetrics: ") + .append(toIndentedString(databricksCloudCostMetrics)) + .append("\n"); + sb.append(" databricksDataJobMonitoring: ") + .append(toIndentedString(databricksDataJobMonitoring)) + .append("\n"); + sb.append(" databricksDataObservability: ") + .append(toIndentedString(databricksDataObservability)) + .append("\n"); + sb.append(" databricksModelServingMetrics: ") + .append(toIndentedString(databricksModelServingMetrics)) + .append("\n"); + sb.append(" databricksServerlessJobs: ") + .append(toIndentedString(databricksServerlessJobs)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksModelServingMetricsIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksModelServingMetricsIntegrationDataflowRequest.java new file mode 100644 index 00000000000..d3362894bba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksModelServingMetricsIntegrationDataflowRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The Databricks model serving metrics dataflow. Not supported on accounts that authenticate with + * private-action-runner; on those accounts this dataflow collects no data even when + * enabled. + */ +@JsonPropertyOrder({DatabricksModelServingMetricsIntegrationDataflowRequest.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksModelServingMetricsIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public DatabricksModelServingMetricsIntegrationDataflowRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksModelServingMetricsIntegrationDataflowRequest + */ + @JsonAnySetter + public DatabricksModelServingMetricsIntegrationDataflowRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksModelServingMetricsIntegrationDataflowRequest object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksModelServingMetricsIntegrationDataflowRequest + databricksModelServingMetricsIntegrationDataflowRequest = + (DatabricksModelServingMetricsIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, databricksModelServingMetricsIntegrationDataflowRequest.enabled) + && Objects.equals( + this.additionalProperties, + databricksModelServingMetricsIntegrationDataflowRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksModelServingMetricsIntegrationDataflowRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksModelServingMetricsIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksModelServingMetricsIntegrationDataflowResponse.java new file mode 100644 index 00000000000..569724d59bb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksModelServingMetricsIntegrationDataflowResponse.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The Databricks model serving metrics dataflow. Not supported on accounts that authenticate with + * private-action-runner; on those accounts this dataflow collects no data even when + * enabled. + */ +@JsonPropertyOrder({DatabricksModelServingMetricsIntegrationDataflowResponse.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksModelServingMetricsIntegrationDataflowResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public DatabricksModelServingMetricsIntegrationDataflowResponse enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksModelServingMetricsIntegrationDataflowResponse + */ + @JsonAnySetter + public DatabricksModelServingMetricsIntegrationDataflowResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksModelServingMetricsIntegrationDataflowResponse object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksModelServingMetricsIntegrationDataflowResponse + databricksModelServingMetricsIntegrationDataflowResponse = + (DatabricksModelServingMetricsIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, databricksModelServingMetricsIntegrationDataflowResponse.enabled) + && Objects.equals( + this.additionalProperties, + databricksModelServingMetricsIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksModelServingMetricsIntegrationDataflowResponse {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksServerlessJobsIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksServerlessJobsIntegrationDataflowRequest.java new file mode 100644 index 00000000000..9c3ea3e51c1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksServerlessJobsIntegrationDataflowRequest.java @@ -0,0 +1,142 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks serverless jobs dataflow. */ +@JsonPropertyOrder({DatabricksServerlessJobsIntegrationDataflowRequest.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksServerlessJobsIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public DatabricksServerlessJobsIntegrationDataflowRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksServerlessJobsIntegrationDataflowRequest + */ + @JsonAnySetter + public DatabricksServerlessJobsIntegrationDataflowRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksServerlessJobsIntegrationDataflowRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksServerlessJobsIntegrationDataflowRequest + databricksServerlessJobsIntegrationDataflowRequest = + (DatabricksServerlessJobsIntegrationDataflowRequest) o; + return Objects.equals(this.enabled, databricksServerlessJobsIntegrationDataflowRequest.enabled) + && Objects.equals( + this.additionalProperties, + databricksServerlessJobsIntegrationDataflowRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksServerlessJobsIntegrationDataflowRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksServerlessJobsIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksServerlessJobsIntegrationDataflowResponse.java new file mode 100644 index 00000000000..75be57fed6e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksServerlessJobsIntegrationDataflowResponse.java @@ -0,0 +1,142 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Databricks serverless jobs dataflow. */ +@JsonPropertyOrder({DatabricksServerlessJobsIntegrationDataflowResponse.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksServerlessJobsIntegrationDataflowResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public DatabricksServerlessJobsIntegrationDataflowResponse enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the Databricks dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DatabricksServerlessJobsIntegrationDataflowResponse + */ + @JsonAnySetter + public DatabricksServerlessJobsIntegrationDataflowResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this DatabricksServerlessJobsIntegrationDataflowResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksServerlessJobsIntegrationDataflowResponse + databricksServerlessJobsIntegrationDataflowResponse = + (DatabricksServerlessJobsIntegrationDataflowResponse) o; + return Objects.equals(this.enabled, databricksServerlessJobsIntegrationDataflowResponse.enabled) + && Objects.equals( + this.additionalProperties, + databricksServerlessJobsIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksServerlessJobsIntegrationDataflowResponse {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthRequest.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthRequest.java new file mode 100644 index 00000000000..43be5e2a0f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthRequest.java @@ -0,0 +1,190 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Private Action Runner authentication. The runner holds the credentials, so this method carries no + * secrets; connection_id and user_uuid must be provided on every + * submission. + */ +@JsonPropertyOrder({ + IntegrationAccountPrivateActionRunnerAuthRequest.JSON_PROPERTY_AUTH_TYPE, + IntegrationAccountPrivateActionRunnerAuthRequest.JSON_PROPERTY_CONNECTION_ID, + IntegrationAccountPrivateActionRunnerAuthRequest.JSON_PROPERTY_SECRET_PATH, + IntegrationAccountPrivateActionRunnerAuthRequest.JSON_PROPERTY_USER_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IntegrationAccountPrivateActionRunnerAuthRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private IntegrationAccountPrivateActionRunnerAuthType authType = + IntegrationAccountPrivateActionRunnerAuthType.PRIVATE_ACTION_RUNNER; + + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_SECRET_PATH = "secret_path"; + private String secretPath; + + public static final String JSON_PROPERTY_USER_UUID = "user_uuid"; + private String userUuid; + + public IntegrationAccountPrivateActionRunnerAuthRequest() {} + + @JsonCreator + public IntegrationAccountPrivateActionRunnerAuthRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + IntegrationAccountPrivateActionRunnerAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_CONNECTION_ID) String connectionId, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_UUID) String userUuid) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.connectionId = connectionId; + this.userUuid = userUuid; + } + + public IntegrationAccountPrivateActionRunnerAuthRequest authType( + IntegrationAccountPrivateActionRunnerAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + return this; + } + + /** + * The authentication method type. + * + * @return authType + */ + @JsonProperty(JSON_PROPERTY_AUTH_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountPrivateActionRunnerAuthType getAuthType() { + return authType; + } + + public void setAuthType(IntegrationAccountPrivateActionRunnerAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public IntegrationAccountPrivateActionRunnerAuthRequest connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Unique identifier of the Private Action Runner connection holding the credentials. + * + * @return connectionId + */ + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConnectionId() { + return connectionId; + } + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + public IntegrationAccountPrivateActionRunnerAuthRequest secretPath(String secretPath) { + this.secretPath = secretPath; + return this; + } + + /** + * Path of the credential inside the secret backend configured on the runner. + * + * @return secretPath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECRET_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSecretPath() { + return secretPath; + } + + public void setSecretPath(String secretPath) { + this.secretPath = secretPath; + } + + public IntegrationAccountPrivateActionRunnerAuthRequest userUuid(String userUuid) { + this.userUuid = userUuid; + return this; + } + + /** + * Unique identifier of the user the Private Action Runner connection belongs to. + * + * @return userUuid + */ + @JsonProperty(JSON_PROPERTY_USER_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserUuid() { + return userUuid; + } + + public void setUserUuid(String userUuid) { + this.userUuid = userUuid; + } + + /** Return true if this IntegrationAccountPrivateActionRunnerAuthRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationAccountPrivateActionRunnerAuthRequest + integrationAccountPrivateActionRunnerAuthRequest = + (IntegrationAccountPrivateActionRunnerAuthRequest) o; + return Objects.equals(this.authType, integrationAccountPrivateActionRunnerAuthRequest.authType) + && Objects.equals( + this.connectionId, integrationAccountPrivateActionRunnerAuthRequest.connectionId) + && Objects.equals( + this.secretPath, integrationAccountPrivateActionRunnerAuthRequest.secretPath) + && Objects.equals(this.userUuid, integrationAccountPrivateActionRunnerAuthRequest.userUuid); + } + + @Override + public int hashCode() { + return Objects.hash(authType, connectionId, secretPath, userUuid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationAccountPrivateActionRunnerAuthRequest {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" secretPath: ").append(toIndentedString(secretPath)).append("\n"); + sb.append(" userUuid: ").append(toIndentedString(userUuid)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthResponse.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthResponse.java new file mode 100644 index 00000000000..6390f9fdaee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthResponse.java @@ -0,0 +1,243 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The Private Action Runner authentication method configured on the account. */ +@JsonPropertyOrder({ + IntegrationAccountPrivateActionRunnerAuthResponse.JSON_PROPERTY_AUTH_TYPE, + IntegrationAccountPrivateActionRunnerAuthResponse.JSON_PROPERTY_CONNECTION_ID, + IntegrationAccountPrivateActionRunnerAuthResponse.JSON_PROPERTY_SECRET_PATH, + IntegrationAccountPrivateActionRunnerAuthResponse.JSON_PROPERTY_USER_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IntegrationAccountPrivateActionRunnerAuthResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private IntegrationAccountPrivateActionRunnerAuthType authType = + IntegrationAccountPrivateActionRunnerAuthType.PRIVATE_ACTION_RUNNER; + + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private String connectionId; + + public static final String JSON_PROPERTY_SECRET_PATH = "secret_path"; + private String secretPath; + + public static final String JSON_PROPERTY_USER_UUID = "user_uuid"; + private String userUuid; + + public IntegrationAccountPrivateActionRunnerAuthResponse() {} + + @JsonCreator + public IntegrationAccountPrivateActionRunnerAuthResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + IntegrationAccountPrivateActionRunnerAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_CONNECTION_ID) String connectionId, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_UUID) String userUuid) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.connectionId = connectionId; + this.userUuid = userUuid; + } + + public IntegrationAccountPrivateActionRunnerAuthResponse authType( + IntegrationAccountPrivateActionRunnerAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + return this; + } + + /** + * The authentication method type. + * + * @return authType + */ + @JsonProperty(JSON_PROPERTY_AUTH_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountPrivateActionRunnerAuthType getAuthType() { + return authType; + } + + public void setAuthType(IntegrationAccountPrivateActionRunnerAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public IntegrationAccountPrivateActionRunnerAuthResponse connectionId(String connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Unique identifier of the Private Action Runner connection holding the credentials. + * + * @return connectionId + */ + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConnectionId() { + return connectionId; + } + + public void setConnectionId(String connectionId) { + this.connectionId = connectionId; + } + + public IntegrationAccountPrivateActionRunnerAuthResponse secretPath(String secretPath) { + this.secretPath = secretPath; + return this; + } + + /** + * Path of the credential inside the secret backend configured on the runner. + * + * @return secretPath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECRET_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSecretPath() { + return secretPath; + } + + public void setSecretPath(String secretPath) { + this.secretPath = secretPath; + } + + public IntegrationAccountPrivateActionRunnerAuthResponse userUuid(String userUuid) { + this.userUuid = userUuid; + return this; + } + + /** + * Unique identifier of the user the Private Action Runner connection belongs to. + * + * @return userUuid + */ + @JsonProperty(JSON_PROPERTY_USER_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserUuid() { + return userUuid; + } + + public void setUserUuid(String userUuid) { + this.userUuid = userUuid; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IntegrationAccountPrivateActionRunnerAuthResponse + */ + @JsonAnySetter + public IntegrationAccountPrivateActionRunnerAuthResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IntegrationAccountPrivateActionRunnerAuthResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationAccountPrivateActionRunnerAuthResponse + integrationAccountPrivateActionRunnerAuthResponse = + (IntegrationAccountPrivateActionRunnerAuthResponse) o; + return Objects.equals(this.authType, integrationAccountPrivateActionRunnerAuthResponse.authType) + && Objects.equals( + this.connectionId, integrationAccountPrivateActionRunnerAuthResponse.connectionId) + && Objects.equals( + this.secretPath, integrationAccountPrivateActionRunnerAuthResponse.secretPath) + && Objects.equals(this.userUuid, integrationAccountPrivateActionRunnerAuthResponse.userUuid) + && Objects.equals( + this.additionalProperties, + integrationAccountPrivateActionRunnerAuthResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, connectionId, secretPath, userUuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationAccountPrivateActionRunnerAuthResponse {\n"); + sb.append(" authType: ").append(toIndentedString(authType)).append("\n"); + sb.append(" connectionId: ").append(toIndentedString(connectionId)).append("\n"); + sb.append(" secretPath: ").append(toIndentedString(secretPath)).append("\n"); + sb.append(" userUuid: ").append(toIndentedString(userUuid)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthType.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthType.java new file mode 100644 index 00000000000..e86ec028e54 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPrivateActionRunnerAuthType.java @@ -0,0 +1,63 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The authentication method type. */ +@JsonSerialize( + using = + IntegrationAccountPrivateActionRunnerAuthType + .IntegrationAccountPrivateActionRunnerAuthTypeSerializer.class) +public class IntegrationAccountPrivateActionRunnerAuthType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("private-action-runner")); + + public static final IntegrationAccountPrivateActionRunnerAuthType PRIVATE_ACTION_RUNNER = + new IntegrationAccountPrivateActionRunnerAuthType("private-action-runner"); + + IntegrationAccountPrivateActionRunnerAuthType(String value) { + super(value, allowedValues); + } + + public static class IntegrationAccountPrivateActionRunnerAuthTypeSerializer + extends StdSerializer { + public IntegrationAccountPrivateActionRunnerAuthTypeSerializer( + Class t) { + super(t); + } + + public IntegrationAccountPrivateActionRunnerAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IntegrationAccountPrivateActionRunnerAuthType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IntegrationAccountPrivateActionRunnerAuthType fromValue(String value) { + return new IntegrationAccountPrivateActionRunnerAuthType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/databricks_integration_accounts.feature b/src/test/resources/com/datadog/api/client/v2/api/databricks_integration_accounts.feature new file mode 100644 index 00000000000..019e9367ec7 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/databricks_integration_accounts.feature @@ -0,0 +1,152 @@ +@endpoint(databricks-integration-accounts) @endpoint(databricks-integration-accounts-v2) +Feature: Databricks Integration Accounts + Manage your Datadog Databricks integration accounts directly through the + Datadog API. Create, update, and delete accounts, configure authentication + and settings, and enable or disable dataflows such as Data Jobs + Monitoring, serverless jobs, cluster logs, GPU metrics, cloud cost + metrics, data observability, and model serving metrics. See the + [Databricks integration + page](https://docs.datadoghq.com/integrations/databricks/) for more + information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "DatabricksIntegrationAccounts" API + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Databricks integration account returns "Bad Request" response + Given operation "CreateDatabricksIntegrationAccount" enabled + And new "CreateDatabricksIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks-oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "dataflows": {"databricks-cloud-cost-metrics": {"enabled": true, "settings": {"ccm_collect_all_workspaces": true}}, "databricks-data-job-monitoring": {"enabled": true, "settings": {"dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646", "dd_api_key_secret": "your-datadog-api-key", "djm_global_init_script_enabled": true, "script_gpum_enabled": true, "script_logs_enabled": true}}, "databricks-data-observability": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"enabled": true}, "databricks-serverless-jobs": {"enabled": true}}, "name": "My Databricks Workspace", "settings": {"system_tables_sql_warehouse_id": "aba7c023d4172910", "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Databricks integration account returns "Created" response + Given operation "CreateDatabricksIntegrationAccount" enabled + And new "CreateDatabricksIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks-oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "dataflows": {"databricks-cloud-cost-metrics": {"enabled": true, "settings": {"ccm_collect_all_workspaces": true}}, "databricks-data-job-monitoring": {"enabled": true, "settings": {"dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646", "dd_api_key_secret": "your-datadog-api-key", "djm_global_init_script_enabled": true, "script_gpum_enabled": true, "script_logs_enabled": true}}, "databricks-data-observability": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"enabled": true}, "databricks-serverless-jobs": {"enabled": true}}, "name": "My Databricks Workspace", "settings": {"system_tables_sql_warehouse_id": "aba7c023d4172910", "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Databricks integration account returns "Not Found" response + Given operation "CreateDatabricksIntegrationAccount" enabled + And new "CreateDatabricksIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks-oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "dataflows": {"databricks-cloud-cost-metrics": {"enabled": true, "settings": {"ccm_collect_all_workspaces": true}}, "databricks-data-job-monitoring": {"enabled": true, "settings": {"dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646", "dd_api_key_secret": "your-datadog-api-key", "djm_global_init_script_enabled": true, "script_gpum_enabled": true, "script_logs_enabled": true}}, "databricks-data-observability": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"enabled": true}, "databricks-serverless-jobs": {"enabled": true}}, "name": "My Databricks Workspace", "settings": {"system_tables_sql_warehouse_id": "aba7c023d4172910", "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Databricks integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "CreateDatabricksIntegrationAccount" enabled + And new "CreateDatabricksIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks-oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "dataflows": {"databricks-cloud-cost-metrics": {"enabled": true, "settings": {"ccm_collect_all_workspaces": true}}, "databricks-data-job-monitoring": {"enabled": true, "settings": {"dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646", "dd_api_key_secret": "your-datadog-api-key", "djm_global_init_script_enabled": true, "script_gpum_enabled": true, "script_logs_enabled": true}}, "databricks-data-observability": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"enabled": true}, "databricks-serverless-jobs": {"enabled": true}}, "name": "My Databricks Workspace", "settings": {"system_tables_sql_warehouse_id": "aba7c023d4172910", "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Databricks integration account returns "Bad Request" response + Given operation "DeleteDatabricksIntegrationAccount" enabled + And new "DeleteDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Databricks integration account returns "Not Found" response + Given operation "DeleteDatabricksIntegrationAccount" enabled + And new "DeleteDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Databricks integration account returns "OK" response + Given operation "DeleteDatabricksIntegrationAccount" enabled + And new "DeleteDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Databricks integration account returns "Bad Request" response + Given operation "GetDatabricksIntegrationAccount" enabled + And new "GetDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Databricks integration account returns "Not Found" response + Given operation "GetDatabricksIntegrationAccount" enabled + And new "GetDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Databricks integration account returns "OK" response + Given operation "GetDatabricksIntegrationAccount" enabled + And new "GetDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Databricks integration accounts returns "Bad Request" response + Given operation "ListDatabricksIntegrationAccounts" enabled + And new "ListDatabricksIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Databricks integration accounts returns "Not Found" response + Given operation "ListDatabricksIntegrationAccounts" enabled + And new "ListDatabricksIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Databricks integration accounts returns "OK" response + Given operation "ListDatabricksIntegrationAccounts" enabled + And new "ListDatabricksIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Databricks integration account returns "Bad Request" response + Given operation "UpdateDatabricksIntegrationAccount" enabled + And new "UpdateDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks-oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "dataflows": {"databricks-cloud-cost-metrics": {"enabled": true, "settings": {"ccm_collect_all_workspaces": true}}, "databricks-data-job-monitoring": {"enabled": true, "settings": {"dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646", "dd_api_key_secret": "your-datadog-api-key", "djm_global_init_script_enabled": true, "script_gpum_enabled": true, "script_logs_enabled": true}}, "databricks-data-observability": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"enabled": true}, "databricks-serverless-jobs": {"enabled": true}}, "name": "My Databricks Workspace", "settings": {"system_tables_sql_warehouse_id": "aba7c023d4172910", "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"}}, "id": "a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f", "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Databricks integration account returns "Not Found" response + Given operation "UpdateDatabricksIntegrationAccount" enabled + And new "UpdateDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks-oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "dataflows": {"databricks-cloud-cost-metrics": {"enabled": true, "settings": {"ccm_collect_all_workspaces": true}}, "databricks-data-job-monitoring": {"enabled": true, "settings": {"dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646", "dd_api_key_secret": "your-datadog-api-key", "djm_global_init_script_enabled": true, "script_gpum_enabled": true, "script_logs_enabled": true}}, "databricks-data-observability": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"enabled": true}, "databricks-serverless-jobs": {"enabled": true}}, "name": "My Databricks Workspace", "settings": {"system_tables_sql_warehouse_id": "aba7c023d4172910", "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"}}, "id": "a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f", "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Databricks integration account returns "OK" response + Given operation "UpdateDatabricksIntegrationAccount" enabled + And new "UpdateDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks-oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "dataflows": {"databricks-cloud-cost-metrics": {"enabled": true, "settings": {"ccm_collect_all_workspaces": true}}, "databricks-data-job-monitoring": {"enabled": true, "settings": {"dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646", "dd_api_key_secret": "your-datadog-api-key", "djm_global_init_script_enabled": true, "script_gpum_enabled": true, "script_logs_enabled": true}}, "databricks-data-observability": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"enabled": true}, "databricks-serverless-jobs": {"enabled": true}}, "name": "My Databricks Workspace", "settings": {"system_tables_sql_warehouse_id": "aba7c023d4172910", "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"}}, "id": "a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f", "type": "integration-account"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Databricks integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "UpdateDatabricksIntegrationAccount" enabled + And new "UpdateDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks-oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "dataflows": {"databricks-cloud-cost-metrics": {"enabled": true, "settings": {"ccm_collect_all_workspaces": true}}, "databricks-data-job-monitoring": {"enabled": true, "settings": {"dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646", "dd_api_key_secret": "your-datadog-api-key", "djm_global_init_script_enabled": true, "script_gpum_enabled": true, "script_logs_enabled": true}}, "databricks-data-observability": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"enabled": true}, "databricks-serverless-jobs": {"enabled": true}}, "name": "My Databricks Workspace", "settings": {"system_tables_sql_warehouse_id": "aba7c023d4172910", "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"}}, "id": "a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f", "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 383d0fec6e5..5bfa23ce4f4 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -3537,6 +3537,43 @@ "type": "idempotent" } }, + "ListDatabricksIntegrationAccounts": { + "tag": "Databricks Integration Accounts", + "undo": { + "type": "safe" + } + }, + "CreateDatabricksIntegrationAccount": { + "tag": "Databricks Integration Accounts", + "undo": { + "operationId": "DeleteDatabricksIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteDatabricksIntegrationAccount": { + "tag": "Databricks Integration Accounts", + "undo": { + "type": "idempotent" + } + }, + "GetDatabricksIntegrationAccount": { + "tag": "Databricks Integration Accounts", + "undo": { + "type": "safe" + } + }, + "UpdateDatabricksIntegrationAccount": { + "tag": "Databricks Integration Accounts", + "undo": { + "type": "idempotent" + } + }, "ListElasticCloudIntegrationAccounts": { "tag": "Elastic Cloud Integration Accounts", "undo": {