diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index fdafbd6b9d5..ef5e04bbe5d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -32063,6 +32063,618 @@ components: required: - databaseMonitoringTrigger type: object + DatabricksCloudCostMetricsIntegrationDataflowRequest: + additionalProperties: false + description: >- + Cost data collected from your Databricks system tables. [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/) must be enabled for your organization while this dataflow is on; any request that leaves it enabled without that is rejected with a `422` response. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest" + type: object + DatabricksCloudCostMetricsIntegrationDataflowResponse: + description: >- + Cost data collected from your Databricks system tables. Requires [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/) to be set up for your organization. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse" + type: object + DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the Cloud Cost Management 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. This takes effect across the Databricks account: if any one workspace enables it, Datadog collects cost data for all of them regardless of their individual settings, and every covered workspace incurs Cloud Cost Management charges. Defaults to `true`. + example: true + type: boolean + type: object + DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse: + description: Settings of the Cloud Cost Management dataflow. + properties: + ccm_collect_all_workspaces: + description: >- + Whether cost data is collected for every workspace in the Databricks account rather than this workspace only. This takes effect across the Databricks account: if any one workspace enables it, Datadog collects cost data for all of them regardless of their individual settings, and every covered workspace incurs Cloud Cost Management charges. + example: true + type: boolean + type: object + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest: + additionalProperties: false + description: >- + Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `true`; set to `false` to stop collection. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest" + type: object + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse: + description: >- + Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse" + type: object + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the 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 installs and manages the Agent on your Databricks clusters through a global init script. Installation can take up to 15 minutes and requires Databricks Workspace Admin permissions. The script does not apply to clusters in Standard access mode. Leave this `false` to install the Agent yourself. Defaults to `false`. + 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`. Defaults to `false`. + example: true + type: boolean + script_logs_enabled: + description: >- + Whether driver and worker 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`. Defaults to `false`. + example: true + type: boolean + serverless_jobs_enabled: + description: >- + Whether health and cost data is collected for jobs running on Serverless or SQL Warehouse compute. This compute has no clusters for the global init script to target, so collection reads the Databricks system tables and requires `system_tables_sql_warehouse_id`. Defaults to `true`. + example: true + type: boolean + type: object + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse: + description: Settings of the 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 installs and manages the Agent on your Databricks clusters through a global init script. The script does not apply to clusters in Standard access mode. When `false`, the Agent is installed manually. + 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 driver and worker 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 + serverless_jobs_enabled: + description: >- + Whether health and cost data is collected for jobs running on Serverless or SQL Warehouse compute. This compute has no clusters for the global init script to target, so collection reads the Databricks system tables and requires `system_tables_sql_warehouse_id`. + example: true + type: boolean + type: object + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest: + additionalProperties: false + description: >- + Data Observability, which collects lineage and data quality information from your Databricks catalogs so you can explore how data flows and detect, resolve, and prevent quality issues. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest" + type: object + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse: + description: >- + Data Observability, which collects lineage and data quality information from your Databricks catalogs so you can explore how data flows and detect, resolve, and prevent quality issues. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse" + type: object + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the Data Observability dataflow. Only the fields provided are changed. + properties: + do_crawlers_cron: + description: >- + Cron expression setting how often Datadog connects to your Databricks warehouse to collect metadata. Currently, only hourly (`0 * * * *`) and daily (`0 0 * * *`) are supported. Defaults to hourly (`0 * * * *`). + example: "0 * * * *" + type: string + sync_system_catalog: + description: >- + Whether metadata from the Databricks `system` catalog is included in Data Observability alongside your data catalogs. Defaults to `false`. + example: true + type: boolean + type: object + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse: + description: Settings of the Data Observability dataflow. + properties: + do_crawlers_cron: + description: >- + Cron expression setting how often Datadog connects to your Databricks warehouse to collect metadata. Currently, only hourly (`0 * * * *`) and daily (`0 0 * * *`) are supported. + example: "0 * * * *" + type: string + sync_system_catalog: + description: >- + Whether metadata from the Databricks `system` catalog is included in Data Observability 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. `bearer_token` is not available on creation: Databricks accepts it only on accounts that already use it, so it can only appear on read and update. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthRequest" + - $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthRequest" + DatabricksIntegrationAccountAuthenticationResponse: + description: >- + Authentication configured on the Databricks integration account. A `bearer_token` method indicates an account still on token authentication, which Databricks accepts only on accounts that already use it. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthResponse" + - $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthResponse" + - $ref: "#/components/schemas/DatabricksIntegrationAccountBearerTokenAuthResponse" + 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. `bearer_token` is deprecated on Databricks: it is accepted only on accounts that already use it and never on creation, so it cannot move an account onto token authentication. Migrate those accounts to `databricks_oauth` or `private_action_runner`. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthUpdate" + - $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate" + - $ref: "#/components/schemas/DatabricksIntegrationAccountBearerTokenAuthUpdate" + DatabricksIntegrationAccountBearerTokenAuthResponse: + description: The bearer token authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountBearerTokenAuthType" + required: + - auth_type + type: object + DatabricksIntegrationAccountBearerTokenAuthType: + default: bearer_token + description: The authentication method type. + enum: + - bearer_token + example: bearer_token + type: string + x-enum-varnames: + - BEARER_TOKEN + DatabricksIntegrationAccountBearerTokenAuthUpdate: + additionalProperties: false + description: >- + Bearer token authentication. The credential is a single opaque secret, a Databricks personal access token, with no accompanying non-secret identifier. The method is deprecated: Databricks accepts it only on accounts that already use it, and never on creation. Only the fields provided are changed; omit `token` to keep the stored one. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountBearerTokenAuthType" + token: + description: Secret token used to authenticate with Databricks. + example: your-token + type: string + writeOnly: true + required: + - auth_type + type: object + 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. Generate it under User management > Service principals > Credentials & secrets in Databricks. + 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. Only the fields provided are changed; omit `client_secret` to keep the stored one. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthType" + azure_tenant_id: + description: >- + Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. Omit it to keep the stored tenant, send `null` or an empty string to remove it, or send a value to replace it. + example: 4d3bac44-0230-4732-9e70-cc00736f0a97 + nullable: true + 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. Generate it under User management > Service principals > Credentials & secrets in Databricks. + example: your-client-secret + type: string + writeOnly: true + required: + - auth_type + type: object + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest: + additionalProperties: false + description: >- + Private Action Runner authentication. The runner holds the Databricks credentials, so this method carries no secrets. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthType" + connection_id: + description: Unique identifier of the Private Action Runner connection holding the credentials. + example: 08356fb7-3ae3-4ea2-913e-b4cb1b7e7ec2 + format: uuid + 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 + format: uuid + type: string + required: + - auth_type + - connection_id + - user_uuid + type: object + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse: + description: The Private Action Runner authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthType" + 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 + DatabricksIntegrationAccountPrivateActionRunnerAuthType: + 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 + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate: + additionalProperties: false + description: >- + Private Action Runner authentication. The runner holds the Databricks credentials, so this method carries no secrets. Only the fields provided are changed. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthType" + connection_id: + description: Unique identifier of the Private Action Runner connection holding the credentials. + example: 08356fb7-3ae3-4ea2-913e-b4cb1b7e7ec2 + format: uuid + type: string + secret_path: + description: >- + Path of the credential inside the secret backend configured on the runner. Omit it to keep the stored path, send `null` or an empty string to remove it, or send a value to replace it. + example: /vault/databricks/prod + nullable: true + type: string + user_uuid: + description: Unique identifier of the user the Private Action Runner connection belongs to. + example: ac470ea4-aa08-11f0-994d-da9212322ca2 + format: uuid + type: string + 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. Find it at the end of the HTTP Path under Warehouses > Connection Details in the Databricks console. Required when the cloud cost metrics or the Data Observability dataflow is enabled, or when `serverless_jobs_enabled` is on; since serverless jobs are on unless explicitly disabled, omitting this field otherwise causes the request to be rejected with a `422` response. + 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. Find it at the end of the HTTP Path under Warehouses > Connection Details in the Databricks console. Required once the cloud cost metrics or the Data Observability dataflow is enabled, or while `serverless_jobs_enabled` is on; an update that leaves the account without one is rejected with a `422` response. + 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: >- + Data Datadog collects from Databricks, keyed by dataflow id. Each dataflow turns on a distinct kind of collection: set `enabled` to start or stop it, and use `settings` to configure what it collects. Defaults listed on each dataflow apply when the account is created; on update, omitted fields keep their current values. Some dataflows have prerequisites, noted on each; unless one is documented as rejecting the request, it is not verified, so a dataflow enabled without it is stored but collects no data. + properties: + databricks-cloud-cost-metrics: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowRequest" + databricks-data-observability-jobs-monitoring: + $ref: "#/components/schemas/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest" + databricks-data-observability-quality-monitoring: + $ref: "#/components/schemas/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest" + databricks-model-serving-metrics: + $ref: "#/components/schemas/DatabricksModelServingMetricsIntegrationDataflowRequest" + type: object + DatabricksIntegrationDataflowsResponse: + description: Data Datadog collects from Databricks, keyed by dataflow id. + properties: + databricks-cloud-cost-metrics: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowResponse" + databricks-data-observability-jobs-monitoring: + $ref: "#/components/schemas/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse" + databricks-data-observability-quality-monitoring: + $ref: "#/components/schemas/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse" + databricks-model-serving-metrics: + $ref: "#/components/schemas/DatabricksModelServingMetricsIntegrationDataflowResponse" + type: object + DatabricksModelServingMetricsIntegrationDataflowRequest: + additionalProperties: false + description: >- + Health and usage metrics for your Databricks model serving endpoints. Not supported on accounts that authenticate with `private_action_runner`; on those accounts this dataflow collects no data. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + type: object + DatabricksModelServingMetricsIntegrationDataflowResponse: + description: >- + Health and usage metrics for your Databricks model serving endpoints. Not supported on accounts that authenticate with `private_action_runner`; on those accounts this dataflow collects no data. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + type: object DatadogAPIKey: description: The definition of the `DatadogAPIKey` object. properties: @@ -59406,8 +60018,10 @@ components: type: object LLMObsCreatePromptDataAttributes: description: >- - Attributes for creating an Agent Observability prompt and its first version. `prompt_id` and `template` are required; all other attributes are optional. + Attributes for creating an Agent Observability prompt and its first version. `prompt_id` and `template` are required; all other attributes are optional. If `config` is omitted, the first version stores an empty object. Configuration authoring must be enabled for your organization to supply `config`. Otherwise, supplying it, including an empty object, returns HTTP 403. properties: + config: + $ref: "#/components/schemas/LLMObsPromptConfig" description: description: Optional description of the prompt. type: string @@ -59449,6 +60063,105 @@ components: required: - data type: object + LLMObsCreatePromptResponse: + description: Response returned after creating an Agent Observability prompt. + properties: + data: + $ref: "#/components/schemas/LLMObsCreatePromptResponseData" + required: + - data + type: object + LLMObsCreatePromptResponseData: + description: Data object returned after creating an Agent Observability prompt. + properties: + attributes: + $ref: "#/components/schemas/LLMObsCreatePromptResponseDataAttributes" + id: + description: Unique identifier of the prompt. + example: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: string + type: + $ref: "#/components/schemas/LLMObsPromptType" + required: + - id + - type + - attributes + type: object + LLMObsCreatePromptResponseDataAttributes: + description: >- + Attributes returned after creating an Agent Observability prompt and its first version. Empty `config` is omitted when configuration authoring is disabled for the organization. Non-empty saved configuration is always returned. + properties: + author: + description: UUID of the user who authored the prompt. + type: string + config: + $ref: "#/components/schemas/LLMObsPromptConfig" + created_at: + description: Timestamp when the prompt was created. + format: date-time + type: string + created_from: + description: >- + Source that created the prompt, such as `ui-registry`, `sdk-registry`, or `sdk-instrumentation`. + example: "sdk-registry" + type: string + datasets: + description: Datasets observed in runs associated with this prompt. + items: + $ref: "#/components/schemas/LLMObsPromptDataset" + type: array + description: + description: Description of the prompt. + type: string + extracted_from: + description: Source prompt from which this prompt was extracted, when applicable. + type: string + in_registry: + description: Whether the prompt is a registry entry (as opposed to a code-discovered prompt). + example: true + type: boolean + last_seen_at: + description: Timestamp of the most recent observed run of this prompt. + format: date-time + type: string + last_version_created_at: + description: Timestamp when the most recent version of the prompt was created. + format: date-time + type: string + ml_app: + description: The ML application this prompt is associated with. + type: string + ml_apps: + description: ML applications observed running this prompt. + items: + type: string + type: array + num_versions: + description: Number of versions of the prompt. + example: 1 + format: int64 + type: integer + prompt_id: + description: Customer-provided identifier of the prompt. + example: "customer-support-assistant" + type: string + source: + $ref: "#/components/schemas/LLMObsPromptResponseSource" + tags: + description: Tags observed on runs of this prompt. + items: + type: string + type: array + title: + description: Title of the prompt. + type: string + required: + - prompt_id + - source + - num_versions + - in_registry + - created_from + type: object LLMObsCreatePromptVersionData: description: Data object for creating an Agent Observability prompt version. properties: @@ -59462,8 +60175,10 @@ components: type: object LLMObsCreatePromptVersionDataAttributes: description: >- - Attributes for creating a new version of an Agent Observability prompt. `template` is required; all other attributes are optional. + Attributes for creating a new version of an Agent Observability prompt. `template` is required; all other attributes are optional. If `config` is omitted, the latest version's configuration is carried forward. An explicit empty object clears it. Configuration authoring must be enabled for your organization to supply `config`. Otherwise, supplying it, including an empty object, returns HTTP 403. Omitting `config` still carries forward the latest configuration. properties: + config: + $ref: "#/components/schemas/LLMObsPromptConfig" description: description: Optional description of this version. type: string @@ -64086,12 +64801,30 @@ components: - content type: object LLMObsPromptChatTemplate: - description: A chat prompt template. + description: >- + A chat prompt template containing messages and optional named message placeholders. + + **Preview:** Message placeholders are available in Preview. To request access, contact [Datadog Support](https://www.datadoghq.com/support/) or your Customer Success Manager. items: - $ref: "#/components/schemas/LLMObsPromptChatMessage" + $ref: "#/components/schemas/LLMObsPromptChatTemplateItem" minItems: 1 type: array x-generate-alias-as-model: true + LLMObsPromptChatTemplateItem: + description: A chat message or a named message placeholder in a prompt template. + oneOf: + - $ref: "#/components/schemas/LLMObsPromptChatMessage" + - $ref: "#/components/schemas/LLMObsPromptMessagePlaceholder" + LLMObsPromptConfig: + additionalProperties: {} + description: >- + Versioned prompt configuration is in Preview. To request access, contact [Datadog Support](https://www.datadoghq.com/support/) or your Customer Success Manager. Customer-owned configuration delivered with a prompt version. Datadog stores and returns the object without interpolating it, validating provider-specific keys, or applying it to model calls. Do not include secrets. + example: + model: provider-model + response_format: + type: json_object + temperature: 0.2 + type: object LLMObsPromptData: description: Data object for an Agent Observability prompt. properties: @@ -64109,7 +64842,8 @@ components: - attributes type: object LLMObsPromptDataAttributes: - description: Attributes of an Agent Observability prompt registry entry. + description: >- + Attributes of an Agent Observability prompt registry entry. Prompt list and metadata-update responses omit complete template and configuration data. properties: author: description: UUID of the user who authored the prompt. @@ -64193,6 +64927,33 @@ components: required: - id type: object + LLMObsPromptMessagePlaceholder: + additionalProperties: false + description: >- + A named placeholder that inserts a list of messages when a compatible SDK formats the prompt. + + **Preview:** Message placeholders are available in Preview. To request access, contact [Datadog Support](https://www.datadoghq.com/support/) or your Customer Success Manager. + properties: + name: + description: Name used to supply the message list when formatting the prompt. + example: "history" + minLength: 1 + pattern: "^\\w+$" + type: string + type: + $ref: "#/components/schemas/LLMObsPromptMessagePlaceholderType" + required: + - type + - name + type: object + LLMObsPromptMessagePlaceholderType: + description: Type of chat-template item. + enum: + - placeholder + example: "placeholder" + type: string + x-enum-varnames: + - PLACEHOLDER LLMObsPromptResponse: description: Response containing a single Agent Observability prompt. example: @@ -64244,14 +65005,18 @@ components: type: object LLMObsPromptSDKDataAttributes: description: >- - Attributes of a flattened prompt version returned for SDK consumption. Exactly one of `template` and `chat_template` is returned. + Attributes of a flattened prompt version returned for SDK consumption. Exactly one of `template` and `chat_template` is returned. Empty `config` is omitted when configuration authoring is disabled for the organization. Non-empty saved configuration is always returned. properties: chat_template: description: >- - Chat template for this prompt version, as a list of role and content messages. Omitted for text templates. + Chat template for this prompt version, as a list of messages and named message placeholders. Omitted for text templates. + + **Preview:** Message placeholders are available in Preview. To request access, contact [Datadog Support](https://www.datadoghq.com/support/) or your Customer Success Manager. items: - $ref: "#/components/schemas/LLMObsPromptChatMessage" + $ref: "#/components/schemas/LLMObsPromptChatTemplateItem" type: array + config: + $ref: "#/components/schemas/LLMObsPromptConfig" labels: deprecated: true description: Labels attached to the selected version. @@ -64283,8 +65048,13 @@ components: chat_template: - content: "You are a helpful customer support assistant for {{company_name}}." role: "system" + - name: "history" + type: "placeholder" - content: "Help {{customer_name}} with this question: {{question}}" role: "user" + config: + model: provider-model + temperature: 0.2 prompt_id: "customer-support-assistant" prompt_version_uuid: "d83ab666-61cc-5545-a83b-2424bb85467b" version: "2" @@ -64297,7 +65067,10 @@ components: - data type: object LLMObsPromptTemplate: - description: A text template or a list of chat messages. + description: >- + A text template or a list of chat messages and named message placeholders. + + **Preview:** Message placeholders are available in Preview. To request access, contact [Datadog Support](https://www.datadoghq.com/support/) or your Customer Success Manager. example: "You are a helpful assistant for {{audience}}." oneOf: - $ref: "#/components/schemas/LLMObsPromptTextTemplate" @@ -64332,11 +65105,14 @@ components: - attributes type: object LLMObsPromptVersionDataAttributes: - description: Attributes of a specific version of an Agent Observability prompt. + description: >- + Attributes of a specific version of an Agent Observability prompt. Empty `config` is omitted when configuration authoring is disabled for the organization. Non-empty saved configuration is always returned. properties: author: description: UUID of the user who authored this version. type: string + config: + $ref: "#/components/schemas/LLMObsPromptConfig" created_at: description: Timestamp stored on this prompt version. format: date-time @@ -64499,6 +65275,7 @@ components: data: attributes: author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + config: {} created_at: "2025-02-01T14:30:00Z" description: "Give concise answers and cite relevant help-center articles." prompt_id: "customer-support-assistant" @@ -165741,6 +166518,304 @@ 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-observability-jobs-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 + serverless_jobs_enabled: true + databricks-data-observability-quality-monitoring: + enabled: true + settings: + do_crawlers_cron: "0 * * * *" + sync_system_catalog: true + databricks-model-serving-metrics: + enabled: false + 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 + "x-permission": + operator: OR + permissions: + - integrations_read + 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/). + 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-observability-jobs-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 + serverless_jobs_enabled: true + databricks-data-observability-quality-monitoring: + enabled: true + settings: + do_crawlers_cron: "0 * * * *" + sync_system_catalog: true + databricks-model-serving-metrics: + enabled: false + 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 + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + 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/{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 + "x-permission": + operator: OR + permissions: + - manage_integrations + 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/). + 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-observability-jobs-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 + serverless_jobs_enabled: true + databricks-data-observability-quality-monitoring: + enabled: true + settings: + do_crawlers_cron: "0 * * * *" + sync_system_catalog: true + databricks-model-serving-metrics: + enabled: false + 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 + "x-permission": + operator: OR + permissions: + - integrations_read + 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/). + 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-observability-jobs-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 + serverless_jobs_enabled: true + databricks-data-observability-quality-monitoring: + enabled: true + settings: + do_crawlers_cron: "0 * * * *" + sync_system_catalog: true + databricks-model-serving-metrics: + enabled: false + 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 + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + 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/elastic-cloud/accounts: get: description: List Elastic Cloud integration accounts. @@ -174931,6 +176006,11 @@ paths: value: data: attributes: + config: + model: provider-model + response_format: + type: json_object + temperature: 0.2 description: "Answers customer questions using the company knowledge base." prompt_id: "customer-support-assistant" template: @@ -174954,6 +176034,11 @@ paths: data: attributes: author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + config: + model: provider-model + response_format: + type: json_object + temperature: 0.2 created_at: "2025-01-15T10:00:00Z" created_from: "sdk-registry" description: "Answers customer questions using the company knowledge base." @@ -174966,7 +176051,7 @@ paths: id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" type: prompt-templates schema: - $ref: "#/components/schemas/LLMObsPromptResponse" + $ref: "#/components/schemas/LLMObsCreatePromptResponse" description: OK "400": content: @@ -175091,6 +176176,9 @@ paths: role: "system" - content: "Help {{customer_name}} with this question: {{question}}" role: "user" + config: + model: provider-model + temperature: 0.2 prompt_id: "customer-support-assistant" prompt_version_uuid: "d83ab666-61cc-5545-a83b-2424bb85467b" version: "2" @@ -175297,6 +176385,9 @@ paths: value: data: attributes: + config: + model: provider-model + temperature: 0.4 description: "Give concise answers and cite relevant help-center articles." template: - content: "You are a helpful customer support assistant for {{company_name}}." @@ -175318,6 +176409,9 @@ paths: data: attributes: author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + config: + model: provider-model + temperature: 0.4 created_at: "2025-02-01T14:30:00Z" description: "Give concise answers and cite relevant help-center articles." prompt_id: "customer-support-assistant" @@ -175379,7 +176473,8 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v1/prompts/{prompt_id}/versions/{version}: get: - description: Get the full template of a single, specific version of an Agent Observability prompt. + description: >- + Get the full template and configuration of a single, specific version of an Agent Observability prompt. operationId: GetLLMObsPromptVersion parameters: - $ref: "#/components/parameters/LLMObsPromptIDPathParameter" @@ -175394,6 +176489,7 @@ paths: data: attributes: author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + config: {} created_at: "2025-02-01T14:30:00Z" description: "Give concise answers and cite relevant help-center articles." prompt_id: "customer-support-assistant" @@ -175480,6 +176576,9 @@ paths: data: attributes: author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + config: + model: provider-model + temperature: 0.4 created_at: "2025-02-01T14:30:00Z" description: "Give concise answers and cite relevant help-center articles." prompt_id: "customer-support-assistant" @@ -230783,6 +231882,15 @@ tags: name: Data Deletion - description: Manage and run data observability monitors. name: Data Observability + - description: |- + Manage your Datadog Databricks integration accounts and account resources directly + through the Datadog API. 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 - 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/agent-observability/CreateLLMObsPrompt.java b/examples/v2/agent-observability/CreateLLMObsPrompt.java index 688d42bcb34..09b7ae3c1fc 100644 --- a/examples/v2/agent-observability/CreateLLMObsPrompt.java +++ b/examples/v2/agent-observability/CreateLLMObsPrompt.java @@ -6,11 +6,12 @@ import com.datadog.api.client.v2.model.LLMObsCreatePromptData; import com.datadog.api.client.v2.model.LLMObsCreatePromptDataAttributes; import com.datadog.api.client.v2.model.LLMObsCreatePromptRequest; -import com.datadog.api.client.v2.model.LLMObsPromptResponse; +import com.datadog.api.client.v2.model.LLMObsCreatePromptResponse; import com.datadog.api.client.v2.model.LLMObsPromptTemplate; import com.datadog.api.client.v2.model.LLMObsPromptType; import com.datadog.api.client.v2.model.LLMObsPromptVersionLabel; import java.util.Collections; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,6 +25,11 @@ public static void main(String[] args) { new LLMObsCreatePromptData() .attributes( new LLMObsCreatePromptDataAttributes() + .config( + Map.ofEntries( + Map.entry("model", "provider-model"), + Map.entry("response_format", "{'type': 'json_object'}"), + Map.entry("temperature", "0.2"))) .labels(Collections.singletonList(LLMObsPromptVersionLabel.PRODUCTION)) .promptId("customer-support-assistant") .template( @@ -31,7 +37,7 @@ public static void main(String[] args) { .type(LLMObsPromptType.PROMPT_TEMPLATES)); try { - LLMObsPromptResponse result = apiInstance.createLLMObsPrompt(body); + LLMObsCreatePromptResponse result = apiInstance.createLLMObsPrompt(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AgentObservabilityApi#createLLMObsPrompt"); diff --git a/examples/v2/agent-observability/CreateLLMObsPromptVersion.java b/examples/v2/agent-observability/CreateLLMObsPromptVersion.java index 673a3b5ca60..a1415fd1dcc 100644 --- a/examples/v2/agent-observability/CreateLLMObsPromptVersion.java +++ b/examples/v2/agent-observability/CreateLLMObsPromptVersion.java @@ -11,6 +11,7 @@ import com.datadog.api.client.v2.model.LLMObsPromptVersionResponse; import com.datadog.api.client.v2.model.LLMObsPromptVersionType; import java.util.Collections; +import java.util.Map; public class Example { public static void main(String[] args) { @@ -24,6 +25,11 @@ public static void main(String[] args) { new LLMObsCreatePromptVersionData() .attributes( new LLMObsCreatePromptVersionDataAttributes() + .config( + Map.ofEntries( + Map.entry("model", "provider-model"), + Map.entry("response_format", "{'type': 'json_object'}"), + Map.entry("temperature", "0.2"))) .labels(Collections.singletonList(LLMObsPromptVersionLabel.PRODUCTION)) .template( new LLMObsPromptTemplate("You are a helpful assistant for ."))) diff --git a/examples/v2/databricks-integration/CreateDatabricksIntegrationAccount.java b/examples/v2/databricks-integration/CreateDatabricksIntegrationAccount.java new file mode 100644 index 00000000000..19f0398f346 --- /dev/null +++ b/examples/v2/databricks-integration/CreateDatabricksIntegrationAccount.java @@ -0,0 +1,95 @@ +// 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.DatabricksIntegrationApi; +import com.datadog.api.client.v2.model.DatabricksCloudCostMetricsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest; +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.IntegrationAccountType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createDatabricksIntegrationAccount", true); + DatabricksIntegrationApi apiInstance = new DatabricksIntegrationApi(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))) + .databricksDataObservabilityJobsMonitoring( + new DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest() + .ddApiKeyId( + "fe383f4e-09fc-46bf-8e10-4efdd453a646") + .ddApiKeySecret("your-datadog-api-key") + .djmGlobalInitScriptEnabled(true) + .scriptGpumEnabled(true) + .scriptLogsEnabled(true) + .serverlessJobsEnabled(true))) + .databricksDataObservabilityQualityMonitoring( + new DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest() + .doCrawlersCron("0 * * * *") + .syncSystemCatalog(true))) + .databricksModelServingMetrics( + new DatabricksModelServingMetricsIntegrationDataflowRequest() + .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 DatabricksIntegrationApi#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/DeleteDatabricksIntegrationAccount.java b/examples/v2/databricks-integration/DeleteDatabricksIntegrationAccount.java new file mode 100644 index 00000000000..74b7961de16 --- /dev/null +++ b/examples/v2/databricks-integration/DeleteDatabricksIntegrationAccount.java @@ -0,0 +1,24 @@ +// 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.DatabricksIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteDatabricksIntegrationAccount", true); + DatabricksIntegrationApi apiInstance = new DatabricksIntegrationApi(defaultClient); + + try { + apiInstance.deleteDatabricksIntegrationAccount("account_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling DatabricksIntegrationApi#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/GetDatabricksIntegrationAccount.java b/examples/v2/databricks-integration/GetDatabricksIntegrationAccount.java new file mode 100644 index 00000000000..29b1ba58085 --- /dev/null +++ b/examples/v2/databricks-integration/GetDatabricksIntegrationAccount.java @@ -0,0 +1,27 @@ +// 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.DatabricksIntegrationApi; +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); + DatabricksIntegrationApi apiInstance = new DatabricksIntegrationApi(defaultClient); + + try { + DatabricksIntegrationAccountResponse result = + apiInstance.getDatabricksIntegrationAccount("account_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling DatabricksIntegrationApi#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/ListDatabricksIntegrationAccounts.java b/examples/v2/databricks-integration/ListDatabricksIntegrationAccounts.java new file mode 100644 index 00000000000..bc008599620 --- /dev/null +++ b/examples/v2/databricks-integration/ListDatabricksIntegrationAccounts.java @@ -0,0 +1,27 @@ +// 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.DatabricksIntegrationApi; +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); + DatabricksIntegrationApi apiInstance = new DatabricksIntegrationApi(defaultClient); + + try { + DatabricksIntegrationAccountsResponse result = + apiInstance.listDatabricksIntegrationAccounts(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling DatabricksIntegrationApi#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/UpdateDatabricksIntegrationAccount.java b/examples/v2/databricks-integration/UpdateDatabricksIntegrationAccount.java new file mode 100644 index 00000000000..d652a190979 --- /dev/null +++ b/examples/v2/databricks-integration/UpdateDatabricksIntegrationAccount.java @@ -0,0 +1,96 @@ +// 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.DatabricksIntegrationApi; +import com.datadog.api.client.v2.model.DatabricksCloudCostMetricsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest; +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.IntegrationAccountType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateDatabricksIntegrationAccount", true); + DatabricksIntegrationApi apiInstance = new DatabricksIntegrationApi(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))) + .databricksDataObservabilityJobsMonitoring( + new DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest() + .ddApiKeyId( + "fe383f4e-09fc-46bf-8e10-4efdd453a646") + .ddApiKeySecret("your-datadog-api-key") + .djmGlobalInitScriptEnabled(true) + .scriptGpumEnabled(true) + .scriptLogsEnabled(true) + .serverlessJobsEnabled(true))) + .databricksDataObservabilityQualityMonitoring( + new DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest() + .enabled(true) + .settings( + new DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest() + .doCrawlersCron("0 * * * *") + .syncSystemCatalog(true))) + .databricksModelServingMetrics( + new DatabricksModelServingMetricsIntegrationDataflowRequest() + .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 DatabricksIntegrationApi#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 e7a14021f41..31da385557d 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1308,6 +1308,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/AgentObservabilityApi.java b/src/main/java/com/datadog/api/client/v2/api/AgentObservabilityApi.java index b3f6273901f..e9045d4526a 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AgentObservabilityApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AgentObservabilityApi.java @@ -20,6 +20,7 @@ import com.datadog.api.client.v2.model.LLMObsAnnotationsRequest; import com.datadog.api.client.v2.model.LLMObsAnnotationsResponse; import com.datadog.api.client.v2.model.LLMObsCreatePromptRequest; +import com.datadog.api.client.v2.model.LLMObsCreatePromptResponse; import com.datadog.api.client.v2.model.LLMObsCreatePromptVersionRequest; import com.datadog.api.client.v2.model.LLMObsCustomEvalConfigListResponse; import com.datadog.api.client.v2.model.LLMObsCustomEvalConfigResponse; @@ -2158,10 +2159,10 @@ public CompletableFuture> createLLMObsProject *

See {@link #createLLMObsPromptWithHttpInfo}. * * @param body Create prompt payload. (required) - * @return LLMObsPromptResponse + * @return LLMObsCreatePromptResponse * @throws ApiException if fails to make API call */ - public LLMObsPromptResponse createLLMObsPrompt(LLMObsCreatePromptRequest body) + public LLMObsCreatePromptResponse createLLMObsPrompt(LLMObsCreatePromptRequest body) throws ApiException { return createLLMObsPromptWithHttpInfo(body).getData(); } @@ -2172,9 +2173,9 @@ public LLMObsPromptResponse createLLMObsPrompt(LLMObsCreatePromptRequest body) *

See {@link #createLLMObsPromptWithHttpInfoAsync}. * * @param body Create prompt payload. (required) - * @return CompletableFuture<LLMObsPromptResponse> + * @return CompletableFuture<LLMObsCreatePromptResponse> */ - public CompletableFuture createLLMObsPromptAsync( + public CompletableFuture createLLMObsPromptAsync( LLMObsCreatePromptRequest body) { return createLLMObsPromptWithHttpInfoAsync(body) .thenApply( @@ -2187,7 +2188,7 @@ public CompletableFuture createLLMObsPromptAsync( * Create a new prompt (and its first version) in the Agent Observability prompt registry. * * @param body Create prompt payload. (required) - * @return ApiResponse<LLMObsPromptResponse> + * @return ApiResponse<LLMObsCreatePromptResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -2201,7 +2202,7 @@ public CompletableFuture createLLMObsPromptAsync( * *
429 Too many requests -
*/ - public ApiResponse createLLMObsPromptWithHttpInfo( + public ApiResponse createLLMObsPromptWithHttpInfo( LLMObsCreatePromptRequest body) throws ApiException { // Check if unstable operation is enabled String operationId = "createLLMObsPrompt"; @@ -2239,7 +2240,7 @@ public ApiResponse createLLMObsPromptWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -2248,16 +2249,16 @@ public ApiResponse createLLMObsPromptWithHttpInfo( *

See {@link #createLLMObsPromptWithHttpInfo}. * * @param body Create prompt payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsPromptResponse>> + * @return CompletableFuture<ApiResponse<LLMObsCreatePromptResponse>> */ - public CompletableFuture> createLLMObsPromptWithHttpInfoAsync( - LLMObsCreatePromptRequest body) { + public CompletableFuture> + createLLMObsPromptWithHttpInfoAsync(LLMObsCreatePromptRequest body) { // Check if unstable operation is enabled String operationId = "createLLMObsPrompt"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -2266,7 +2267,7 @@ public CompletableFuture> createLLMObsPromptWi // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling createLLMObsPrompt")); @@ -2289,7 +2290,7 @@ public CompletableFuture> createLLMObsPromptWi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -2301,7 +2302,7 @@ public CompletableFuture> createLLMObsPromptWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -6232,7 +6233,8 @@ public CompletableFuture getLLMObsPromptVersionAsyn } /** - * Get the full template of a single, specific version of an Agent Observability prompt. + * Get the full template and configuration of a single, specific version of an Agent Observability + * prompt. * * @param promptId The customer-provided identifier of the Agent Observability prompt. (required) * @param version The version number of the Agent Observability prompt. (required) diff --git a/src/main/java/com/datadog/api/client/v2/api/DatabricksIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/DatabricksIntegrationApi.java new file mode 100644 index 00000000000..a3f56277fa0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/DatabricksIntegrationApi.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 DatabricksIntegrationApi { + private ApiClient apiClient; + + public DatabricksIntegrationApi() { + this(ApiClient.getDefaultApiClient()); + } + + public DatabricksIntegrationApi(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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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.DatabricksIntegrationApi.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..9554a73727a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowRequest.java @@ -0,0 +1,127 @@ +/* + * 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; + +/** + * Cost data collected from your Databricks system tables. Cloud Cost Management must be + * enabled for your organization while this dataflow is on; any request that leaves it enabled + * without that is rejected with a 422 response. + */ +@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 Datadog collects this data. Defaults to false; set to true to + * start collection. + * + * @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 Cloud Cost Management 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; + } + } + + /** + * 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); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings); + } + + @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('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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..52f11090163 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowResponse.java @@ -0,0 +1,182 @@ +/* + * 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; + +/** + * Cost data collected from your Databricks system tables. Requires Cloud Cost Management to be set up + * for your organization. + */ +@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 Datadog collects this data. + * + * @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 Cloud Cost Management 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..0d6a9565814 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest.java @@ -0,0 +1,98 @@ +/* + * 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 Cloud Cost Management 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. This takes effect across the Databricks account: if any one workspace enables + * it, Datadog collects cost data for all of them regardless of their individual settings, and + * every covered workspace incurs Cloud Cost Management charges. Defaults to true. + * + * @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..dbbaedfea42 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse.java @@ -0,0 +1,155 @@ +/* + * 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 Cloud Cost Management 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. This takes effect across the Databricks account: if any one workspace enables + * it, Datadog collects cost data for all of them regardless of their individual settings, and + * every covered workspace incurs Cloud Cost Management charges. + * + * @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/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.java new file mode 100644 index 00000000000..b6bc344cbda --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.java @@ -0,0 +1,130 @@ +/* + * 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; + +/** + * Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks + * jobs. + */ +@JsonPropertyOrder({ + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.JSON_PROPERTY_ENABLED, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest { + @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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest settings; + + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest enabled( + Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether Datadog collects this data. Defaults to true; set to false to + * stop collection. + * + * @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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest settings( + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the 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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest getSettings() { + return settings; + } + + public void setSettings( + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * Return true if this DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest + databricksDataObservabilityJobsMonitoringIntegrationDataflowRequest = + (DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.enabled) + && Objects.equals( + this.settings, + databricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.settings); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse.java new file mode 100644 index 00000000000..1ae877af285 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse.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.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; + +/** + * Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks + * jobs. + */ +@JsonPropertyOrder({ + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse { + @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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse settings; + + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse enabled( + Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether Datadog collects this data. + * + * @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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse settings( + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the Data Jobs Monitoring dataflow. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + getSettings() { + return settings; + } + + public void setSettings( + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse 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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse + */ + @JsonAnySetter + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse putAdditionalProperty( + String 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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse + databricksDataObservabilityJobsMonitoringIntegrationDataflowResponse = + (DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowResponse.enabled) + && Objects.equals( + this.settings, + databricksDataObservabilityJobsMonitoringIntegrationDataflowResponse.settings) + && Objects.equals( + this.additionalProperties, + databricksDataObservabilityJobsMonitoringIntegrationDataflowResponse + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse {\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/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest.java new file mode 100644 index 00000000000..c35f6d14d65 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest.java @@ -0,0 +1,277 @@ +/* + * 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 Data Jobs Monitoring dataflow. Only the fields provided are changed. */ +@JsonPropertyOrder({ + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_DD_API_KEY_ID, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_DD_API_KEY_SECRET, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_DJM_GLOBAL_INIT_SCRIPT_ENABLED, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_SCRIPT_GPUM_ENABLED, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_SCRIPT_LOGS_ENABLED, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_SERVERLESS_JOBS_ENABLED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest { + @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 static final String JSON_PROPERTY_SERVERLESS_JOBS_ENABLED = "serverless_jobs_enabled"; + private Boolean serverlessJobsEnabled; + + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest 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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest 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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + djmGlobalInitScriptEnabled(Boolean djmGlobalInitScriptEnabled) { + this.djmGlobalInitScriptEnabled = djmGlobalInitScriptEnabled; + return this; + } + + /** + * Whether Datadog installs and manages the Agent on your Databricks clusters through a global + * init script. Installation can take up to 15 minutes and requires Databricks Workspace Admin + * permissions. The script does not apply to clusters in Standard access mode. Leave this + * false to install the Agent yourself. Defaults to false. + * + * @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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + 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. Defaults to false + * . + * + * @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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + scriptLogsEnabled(Boolean scriptLogsEnabled) { + this.scriptLogsEnabled = scriptLogsEnabled; + return this; + } + + /** + * Whether driver and worker 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. Defaults to + * false. + * + * @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; + } + + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + serverlessJobsEnabled(Boolean serverlessJobsEnabled) { + this.serverlessJobsEnabled = serverlessJobsEnabled; + return this; + } + + /** + * Whether health and cost data is collected for jobs running on Serverless or SQL Warehouse + * compute. This compute has no clusters for the global init script to target, so collection reads + * the Databricks system tables and requires system_tables_sql_warehouse_id. Defaults + * to true. + * + * @return serverlessJobsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVERLESS_JOBS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getServerlessJobsEnabled() { + return serverlessJobsEnabled; + } + + public void setServerlessJobsEnabled(Boolean serverlessJobsEnabled) { + this.serverlessJobsEnabled = serverlessJobsEnabled; + } + + /** + * Return true if this DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest = + (DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest) o; + return Objects.equals( + this.ddApiKeyId, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest.ddApiKeyId) + && Objects.equals( + this.ddApiKeySecret, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .ddApiKeySecret) + && Objects.equals( + this.djmGlobalInitScriptEnabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .djmGlobalInitScriptEnabled) + && Objects.equals( + this.scriptGpumEnabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .scriptGpumEnabled) + && Objects.equals( + this.scriptLogsEnabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .scriptLogsEnabled) + && Objects.equals( + this.serverlessJobsEnabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + .serverlessJobsEnabled); + } + + @Override + public int hashCode() { + return Objects.hash( + ddApiKeyId, + ddApiKeySecret, + djmGlobalInitScriptEnabled, + scriptGpumEnabled, + scriptLogsEnabled, + serverlessJobsEnabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest {\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(" serverlessJobsEnabled: ") + .append(toIndentedString(serverlessJobsEnabled)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse.java new file mode 100644 index 00000000000..81ad4fb0b2d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse.java @@ -0,0 +1,299 @@ +/* + * 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 Data Jobs Monitoring dataflow. */ +@JsonPropertyOrder({ + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .JSON_PROPERTY_DD_API_KEY_ID, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .JSON_PROPERTY_DJM_GLOBAL_INIT_SCRIPT_ENABLED, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .JSON_PROPERTY_SCRIPT_GPUM_ENABLED, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .JSON_PROPERTY_SCRIPT_LOGS_ENABLED, + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .JSON_PROPERTY_SERVERLESS_JOBS_ENABLED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse { + @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 static final String JSON_PROPERTY_SERVERLESS_JOBS_ENABLED = "serverless_jobs_enabled"; + private Boolean serverlessJobsEnabled; + + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse 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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + djmGlobalInitScriptEnabled(Boolean djmGlobalInitScriptEnabled) { + this.djmGlobalInitScriptEnabled = djmGlobalInitScriptEnabled; + return this; + } + + /** + * Whether Datadog installs and manages the Agent on your Databricks clusters through a global + * init script. The script does not apply to clusters in Standard access mode. When false + * , the Agent is installed manually. + * + * @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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + 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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + scriptLogsEnabled(Boolean scriptLogsEnabled) { + this.scriptLogsEnabled = scriptLogsEnabled; + return this; + } + + /** + * Whether driver and worker 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; + } + + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + serverlessJobsEnabled(Boolean serverlessJobsEnabled) { + this.serverlessJobsEnabled = serverlessJobsEnabled; + return this; + } + + /** + * Whether health and cost data is collected for jobs running on Serverless or SQL Warehouse + * compute. This compute has no clusters for the global init script to target, so collection reads + * the Databricks system tables and requires system_tables_sql_warehouse_id. + * + * @return serverlessJobsEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVERLESS_JOBS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getServerlessJobsEnabled() { + return serverlessJobsEnabled; + } + + public void setServerlessJobsEnabled(Boolean serverlessJobsEnabled) { + this.serverlessJobsEnabled = serverlessJobsEnabled; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set 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 DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + */ + @JsonAnySetter + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + putAdditionalProperty(String 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 + * DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse = + (DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse) o; + return Objects.equals( + this.ddApiKeyId, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse.ddApiKeyId) + && Objects.equals( + this.djmGlobalInitScriptEnabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .djmGlobalInitScriptEnabled) + && Objects.equals( + this.scriptGpumEnabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .scriptGpumEnabled) + && Objects.equals( + this.scriptLogsEnabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .scriptLogsEnabled) + && Objects.equals( + this.serverlessJobsEnabled, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .serverlessJobsEnabled) + && Objects.equals( + this.additionalProperties, + databricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + ddApiKeyId, + djmGlobalInitScriptEnabled, + scriptGpumEnabled, + scriptLogsEnabled, + serverlessJobsEnabled, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse {\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(" serverlessJobsEnabled: ") + .append(toIndentedString(serverlessJobsEnabled)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.java new file mode 100644 index 00000000000..75556234dc2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.java @@ -0,0 +1,131 @@ +/* + * 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; + +/** + * Data Observability, which collects lineage and data quality information from your Databricks + * catalogs so you can explore how data flows and detect, resolve, and prevent quality issues. + */ +@JsonPropertyOrder({ + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.JSON_PROPERTY_ENABLED, + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest { + @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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest settings; + + public DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest enabled( + Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether Datadog collects this data. Defaults to false; set to true to + * start collection. + * + * @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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest settings( + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the 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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + getSettings() { + return settings; + } + + public void setSettings( + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * Return true if this DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest + databricksDataObservabilityQualityMonitoringIntegrationDataflowRequest = + (DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, + databricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.enabled) + && Objects.equals( + this.settings, + databricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.settings); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse.java new file mode 100644 index 00000000000..2fd05798a01 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse.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.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; + +/** + * Data Observability, which collects lineage and data quality information from your Databricks + * catalogs so you can explore how data flows and detect, resolve, and prevent quality issues. + */ +@JsonPropertyOrder({ + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse { + @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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse settings; + + public DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse enabled( + Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether Datadog collects this data. + * + * @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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse settings( + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings of the Data Observability dataflow. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + getSettings() { + return settings; + } + + public void setSettings( + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse 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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + */ + @JsonAnySetter + public DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + putAdditionalProperty(String 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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + databricksDataObservabilityQualityMonitoringIntegrationDataflowResponse = + (DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, + databricksDataObservabilityQualityMonitoringIntegrationDataflowResponse.enabled) + && Objects.equals( + this.settings, + databricksDataObservabilityQualityMonitoringIntegrationDataflowResponse.settings) + && Objects.equals( + this.additionalProperties, + databricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse {\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/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest.java new file mode 100644 index 00000000000..a9123fcd3ef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest.java @@ -0,0 +1,130 @@ +/* + * 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 Data Observability dataflow. Only the fields provided are changed. */ +@JsonPropertyOrder({ + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_DO_CRAWLERS_CRON, + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + .JSON_PROPERTY_SYNC_SYSTEM_CATALOG +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest { + @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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + doCrawlersCron(String doCrawlersCron) { + this.doCrawlersCron = doCrawlersCron; + return this; + } + + /** + * Cron expression setting how often Datadog connects to your Databricks warehouse to collect + * metadata. Currently, only hourly (0 * * * *) and daily (0 0 * * *) + * are supported. Defaults to hourly (0 * * * *). + * + * @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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + syncSystemCatalog(Boolean syncSystemCatalog) { + this.syncSystemCatalog = syncSystemCatalog; + return this; + } + + /** + * Whether metadata from the Databricks system catalog is included in Data + * Observability alongside your data catalogs. Defaults to false. + * + * @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 + * DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + databricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest = + (DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest) o; + return Objects.equals( + this.doCrawlersCron, + databricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + .doCrawlersCron) + && Objects.equals( + this.syncSystemCatalog, + databricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + .syncSystemCatalog); + } + + @Override + public int hashCode() { + return Objects.hash(doCrawlersCron, syncSystemCatalog); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest {\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/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse.java new file mode 100644 index 00000000000..c72d723acfb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse.java @@ -0,0 +1,189 @@ +/* + * 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 Data Observability dataflow. */ +@JsonPropertyOrder({ + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + .JSON_PROPERTY_DO_CRAWLERS_CRON, + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + .JSON_PROPERTY_SYNC_SYSTEM_CATALOG +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse { + @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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + doCrawlersCron(String doCrawlersCron) { + this.doCrawlersCron = doCrawlersCron; + return this; + } + + /** + * Cron expression setting how often Datadog connects to your Databricks warehouse to collect + * metadata. Currently, only hourly (0 * * * *) and daily (0 0 * * *) + * are supported. + * + * @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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + syncSystemCatalog(Boolean syncSystemCatalog) { + this.syncSystemCatalog = syncSystemCatalog; + return this; + } + + /** + * Whether metadata from the Databricks system catalog is included in Data + * Observability 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 DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + */ + @JsonAnySetter + public DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + putAdditionalProperty(String 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 + * DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + databricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse = + (DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse) o; + return Objects.equals( + this.doCrawlersCron, + databricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + .doCrawlersCron) + && Objects.equals( + this.syncSystemCatalog, + databricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + .syncSystemCatalog) + && Objects.equals( + this.additionalProperties, + databricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(doCrawlersCron, syncSystemCatalog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse" + + " {\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..dcb6c89dd0a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationRequest.java @@ -0,0 +1,339 @@ +/* + * 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 DatabricksIntegrationAccountPrivateActionRunnerAuthRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Integer.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Long.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Float.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals(Double.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Boolean.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Integer.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Float.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.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 (!((DatabricksIntegrationAccountPrivateActionRunnerAuthRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'DatabricksIntegrationAccountPrivateActionRunnerAuthRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'DatabricksIntegrationAccountPrivateActionRunnerAuthRequest'", + 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( + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "DatabricksIntegrationAccountOAuthAuthRequest", + new GenericType() {}); + schemas.put( + "DatabricksIntegrationAccountPrivateActionRunnerAuthRequest", + 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, + * DatabricksIntegrationAccountPrivateActionRunnerAuthRequest + * + *

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( + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.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," + + " DatabricksIntegrationAccountPrivateActionRunnerAuthRequest"); + } + + /** + * Get the actual instance, which can be the following: + * DatabricksIntegrationAccountOAuthAuthRequest, + * DatabricksIntegrationAccountPrivateActionRunnerAuthRequest + * + * @return The actual instance (DatabricksIntegrationAccountOAuthAuthRequest, + * DatabricksIntegrationAccountPrivateActionRunnerAuthRequest) + */ + @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 `DatabricksIntegrationAccountPrivateActionRunnerAuthRequest`. If the + * actual instance is not `DatabricksIntegrationAccountPrivateActionRunnerAuthRequest`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountPrivateActionRunnerAuthRequest` + * @throws ClassCastException if the instance is not + * `DatabricksIntegrationAccountPrivateActionRunnerAuthRequest` + */ + public DatabricksIntegrationAccountPrivateActionRunnerAuthRequest + getDatabricksIntegrationAccountPrivateActionRunnerAuthRequest() throws ClassCastException { + return (DatabricksIntegrationAccountPrivateActionRunnerAuthRequest) 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..96f0be2b4bc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationResponse.java @@ -0,0 +1,429 @@ +/* + * 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 DatabricksIntegrationAccountPrivateActionRunnerAuthResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Integer.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Long.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals(Float.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Double.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Boolean.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Integer.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Float.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.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 (!((DatabricksIntegrationAccountPrivateActionRunnerAuthResponse) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'DatabricksIntegrationAccountPrivateActionRunnerAuthResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'DatabricksIntegrationAccountPrivateActionRunnerAuthResponse'", + e); + } + + // deserialize DatabricksIntegrationAccountBearerTokenAuthResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(Integer.class) + || DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(Long.class) + || DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(Float.class) + || DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(Double.class) + || DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(Boolean.class) + || DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(Integer.class) + || DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(Float.class) + || DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountBearerTokenAuthResponse.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountBearerTokenAuthResponse.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 (!((DatabricksIntegrationAccountBearerTokenAuthResponse) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'DatabricksIntegrationAccountBearerTokenAuthResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'DatabricksIntegrationAccountBearerTokenAuthResponse'", + 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( + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DatabricksIntegrationAccountAuthenticationResponse( + DatabricksIntegrationAccountBearerTokenAuthResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "DatabricksIntegrationAccountOAuthAuthResponse", + new GenericType() {}); + schemas.put( + "DatabricksIntegrationAccountPrivateActionRunnerAuthResponse", + new GenericType() {}); + schemas.put( + "DatabricksIntegrationAccountBearerTokenAuthResponse", + 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, + * DatabricksIntegrationAccountPrivateActionRunnerAuthResponse, + * DatabricksIntegrationAccountBearerTokenAuthResponse + * + *

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( + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + DatabricksIntegrationAccountBearerTokenAuthResponse.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," + + " DatabricksIntegrationAccountPrivateActionRunnerAuthResponse," + + " DatabricksIntegrationAccountBearerTokenAuthResponse"); + } + + /** + * Get the actual instance, which can be the following: + * DatabricksIntegrationAccountOAuthAuthResponse, + * DatabricksIntegrationAccountPrivateActionRunnerAuthResponse, + * DatabricksIntegrationAccountBearerTokenAuthResponse + * + * @return The actual instance (DatabricksIntegrationAccountOAuthAuthResponse, + * DatabricksIntegrationAccountPrivateActionRunnerAuthResponse, + * DatabricksIntegrationAccountBearerTokenAuthResponse) + */ + @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 `DatabricksIntegrationAccountPrivateActionRunnerAuthResponse`. If + * the actual instance is not `DatabricksIntegrationAccountPrivateActionRunnerAuthResponse`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountPrivateActionRunnerAuthResponse` + * @throws ClassCastException if the instance is not + * `DatabricksIntegrationAccountPrivateActionRunnerAuthResponse` + */ + public DatabricksIntegrationAccountPrivateActionRunnerAuthResponse + getDatabricksIntegrationAccountPrivateActionRunnerAuthResponse() throws ClassCastException { + return (DatabricksIntegrationAccountPrivateActionRunnerAuthResponse) super.getActualInstance(); + } + + /** + * Get the actual instance of `DatabricksIntegrationAccountBearerTokenAuthResponse`. If the actual + * instance is not `DatabricksIntegrationAccountBearerTokenAuthResponse`, the ClassCastException + * will be thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountBearerTokenAuthResponse` + * @throws ClassCastException if the instance is not + * `DatabricksIntegrationAccountBearerTokenAuthResponse` + */ + public DatabricksIntegrationAccountBearerTokenAuthResponse + getDatabricksIntegrationAccountBearerTokenAuthResponse() throws ClassCastException { + return (DatabricksIntegrationAccountBearerTokenAuthResponse) 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..f2cf94c898d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountAuthenticationUpdate.java @@ -0,0 +1,425 @@ +/* + * 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 DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals(Integer.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals(Long.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals(Float.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals(Double.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals(Boolean.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals( + Integer.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals( + Float.class) + || DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.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 (!((DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate'", + e); + } + + // deserialize DatabricksIntegrationAccountBearerTokenAuthUpdate + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(Integer.class) + || DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(Long.class) + || DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(Float.class) + || DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(Double.class) + || DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(Boolean.class) + || DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(Integer.class) + || DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(Float.class) + || DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DatabricksIntegrationAccountBearerTokenAuthUpdate.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(DatabricksIntegrationAccountBearerTokenAuthUpdate.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 (!((DatabricksIntegrationAccountBearerTokenAuthUpdate) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'DatabricksIntegrationAccountBearerTokenAuthUpdate'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'DatabricksIntegrationAccountBearerTokenAuthUpdate'", + 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( + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public DatabricksIntegrationAccountAuthenticationUpdate( + DatabricksIntegrationAccountBearerTokenAuthUpdate o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "DatabricksIntegrationAccountOAuthAuthUpdate", + new GenericType() {}); + schemas.put( + "DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate", + new GenericType() {}); + schemas.put( + "DatabricksIntegrationAccountBearerTokenAuthUpdate", + 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, + * DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate, + * DatabricksIntegrationAccountBearerTokenAuthUpdate + * + *

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( + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + DatabricksIntegrationAccountBearerTokenAuthUpdate.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," + + " DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate," + + " DatabricksIntegrationAccountBearerTokenAuthUpdate"); + } + + /** + * Get the actual instance, which can be the following: + * DatabricksIntegrationAccountOAuthAuthUpdate, + * DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate, + * DatabricksIntegrationAccountBearerTokenAuthUpdate + * + * @return The actual instance (DatabricksIntegrationAccountOAuthAuthUpdate, + * DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate, + * DatabricksIntegrationAccountBearerTokenAuthUpdate) + */ + @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 `DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate`. If the + * actual instance is not `DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate` + * @throws ClassCastException if the instance is not + * `DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate` + */ + public DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate + getDatabricksIntegrationAccountPrivateActionRunnerAuthUpdate() throws ClassCastException { + return (DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate) super.getActualInstance(); + } + + /** + * Get the actual instance of `DatabricksIntegrationAccountBearerTokenAuthUpdate`. If the actual + * instance is not `DatabricksIntegrationAccountBearerTokenAuthUpdate`, the ClassCastException + * will be thrown. + * + * @return The actual instance of `DatabricksIntegrationAccountBearerTokenAuthUpdate` + * @throws ClassCastException if the instance is not + * `DatabricksIntegrationAccountBearerTokenAuthUpdate` + */ + public DatabricksIntegrationAccountBearerTokenAuthUpdate + getDatabricksIntegrationAccountBearerTokenAuthUpdate() throws ClassCastException { + return (DatabricksIntegrationAccountBearerTokenAuthUpdate) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountBearerTokenAuthResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountBearerTokenAuthResponse.java new file mode 100644 index 00000000000..99664e6906c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountBearerTokenAuthResponse.java @@ -0,0 +1,159 @@ +/* + * 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 bearer token authentication method configured on the account. */ +@JsonPropertyOrder({DatabricksIntegrationAccountBearerTokenAuthResponse.JSON_PROPERTY_AUTH_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountBearerTokenAuthResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountBearerTokenAuthType authType = + DatabricksIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public DatabricksIntegrationAccountBearerTokenAuthResponse() {} + + @JsonCreator + public DatabricksIntegrationAccountBearerTokenAuthResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountBearerTokenAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public DatabricksIntegrationAccountBearerTokenAuthResponse authType( + DatabricksIntegrationAccountBearerTokenAuthType 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 DatabricksIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountBearerTokenAuthType 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 DatabricksIntegrationAccountBearerTokenAuthResponse + */ + @JsonAnySetter + public DatabricksIntegrationAccountBearerTokenAuthResponse putAdditionalProperty( + String 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 DatabricksIntegrationAccountBearerTokenAuthResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountBearerTokenAuthResponse + databricksIntegrationAccountBearerTokenAuthResponse = + (DatabricksIntegrationAccountBearerTokenAuthResponse) o; + return Objects.equals( + this.authType, databricksIntegrationAccountBearerTokenAuthResponse.authType) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountBearerTokenAuthResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountBearerTokenAuthResponse {\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/DatabricksIntegrationAccountBearerTokenAuthType.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountBearerTokenAuthType.java new file mode 100644 index 00000000000..ce574c5c8c5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountBearerTokenAuthType.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 = + DatabricksIntegrationAccountBearerTokenAuthType + .DatabricksIntegrationAccountBearerTokenAuthTypeSerializer.class) +public class DatabricksIntegrationAccountBearerTokenAuthType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("bearer_token")); + + public static final DatabricksIntegrationAccountBearerTokenAuthType BEARER_TOKEN = + new DatabricksIntegrationAccountBearerTokenAuthType("bearer_token"); + + DatabricksIntegrationAccountBearerTokenAuthType(String value) { + super(value, allowedValues); + } + + public static class DatabricksIntegrationAccountBearerTokenAuthTypeSerializer + extends StdSerializer { + public DatabricksIntegrationAccountBearerTokenAuthTypeSerializer( + Class t) { + super(t); + } + + public DatabricksIntegrationAccountBearerTokenAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DatabricksIntegrationAccountBearerTokenAuthType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DatabricksIntegrationAccountBearerTokenAuthType fromValue(String value) { + return new DatabricksIntegrationAccountBearerTokenAuthType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountBearerTokenAuthUpdate.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountBearerTokenAuthUpdate.java new file mode 100644 index 00000000000..d8dcf0358c9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountBearerTokenAuthUpdate.java @@ -0,0 +1,133 @@ +/* + * 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; + +/** + * Bearer token authentication. The credential is a single opaque secret, a Databricks personal + * access token, with no accompanying non-secret identifier. The method is deprecated: Databricks + * accepts it only on accounts that already use it, and never on creation. Only the fields provided + * are changed; omit token to keep the stored one. + */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountBearerTokenAuthUpdate.JSON_PROPERTY_AUTH_TYPE, + DatabricksIntegrationAccountBearerTokenAuthUpdate.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountBearerTokenAuthUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountBearerTokenAuthType authType = + DatabricksIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public DatabricksIntegrationAccountBearerTokenAuthUpdate() {} + + @JsonCreator + public DatabricksIntegrationAccountBearerTokenAuthUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountBearerTokenAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public DatabricksIntegrationAccountBearerTokenAuthUpdate authType( + DatabricksIntegrationAccountBearerTokenAuthType 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 DatabricksIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountBearerTokenAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public DatabricksIntegrationAccountBearerTokenAuthUpdate token(String token) { + this.token = token; + return this; + } + + /** + * Secret token used to authenticate with Databricks. + * + * @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 DatabricksIntegrationAccountBearerTokenAuthUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountBearerTokenAuthUpdate + databricksIntegrationAccountBearerTokenAuthUpdate = + (DatabricksIntegrationAccountBearerTokenAuthUpdate) o; + return Objects.equals(this.authType, databricksIntegrationAccountBearerTokenAuthUpdate.authType) + && Objects.equals(this.token, databricksIntegrationAccountBearerTokenAuthUpdate.token); + } + + @Override + public int hashCode() { + return Objects.hash(authType, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountBearerTokenAuthUpdate {\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/DatabricksIntegrationAccountCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateAttributes.java new file mode 100644 index 00000000000..3d432b36655 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountCreateAttributes.java @@ -0,0 +1,261 @@ +/* + * 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. bearer_token is not available on + * creation: Databricks accepts it only on accounts that already use it, so it can only appear on + * read and update. + * + * @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; + } + + /** + * Data Datadog collects from Databricks, keyed by dataflow id. Each dataflow turns on a distinct + * kind of collection: set enabled to start or stop it, and use settings + * to configure what it collects. Defaults listed on each dataflow apply when the account is + * created; on update, omitted fields keep their current values. Some dataflows have + * prerequisites, noted on each; unless one is documented as rejecting the request, it is not + * verified, so a dataflow enabled without it 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..fb0a2d0bdd6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthRequest.java @@ -0,0 +1,186 @@ +/* + * 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. Generate it under User management > Service + * principals > Credentials & secrets in Databricks. + * + * @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..c8ed8cbb2a8 --- /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..a75eccb2576 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountOAuthAuthUpdate.java @@ -0,0 +1,200 @@ +/* + * 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; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Databricks OAuth machine-to-machine authentication using a service principal. Only the fields + * provided are changed; omit client_secret to keep the stored one. + */ +@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 JsonNullable azureTenantId = JsonNullable.undefined(); + + 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) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + 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 = JsonNullable.of(azureTenantId); + return this; + } + + /** + * Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. Omit it to + * keep the stored tenant, send null or an empty string to remove it, or send a value + * to replace it. + * + * @return azureTenantId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAzureTenantId() { + return azureTenantId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AZURE_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAzureTenantId_JsonNullable() { + return azureTenantId; + } + + @JsonProperty(JSON_PROPERTY_AZURE_TENANT_ID) + public void setAzureTenantId_JsonNullable(JsonNullable azureTenantId) { + this.azureTenantId = azureTenantId; + } + + public void setAzureTenantId(String azureTenantId) { + this.azureTenantId = JsonNullable.of(azureTenantId); + } + + public DatabricksIntegrationAccountOAuthAuthUpdate clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Client ID of the Databricks service principal. + * + * @return clientId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + 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. Generate it under User management > Service + * principals > Credentials & secrets in Databricks. + * + * @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/DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.java new file mode 100644 index 00000000000..585a0cd3197 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.java @@ -0,0 +1,197 @@ +/* + * 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; +import java.util.UUID; + +/** + * Private Action Runner authentication. The runner holds the Databricks credentials, so this method + * carries no secrets. + */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.JSON_PROPERTY_AUTH_TYPE, + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.JSON_PROPERTY_CONNECTION_ID, + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.JSON_PROPERTY_SECRET_PATH, + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest.JSON_PROPERTY_USER_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountPrivateActionRunnerAuthRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountPrivateActionRunnerAuthType authType = + DatabricksIntegrationAccountPrivateActionRunnerAuthType.PRIVATE_ACTION_RUNNER; + + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private UUID 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 UUID userUuid; + + public DatabricksIntegrationAccountPrivateActionRunnerAuthRequest() {} + + @JsonCreator + public DatabricksIntegrationAccountPrivateActionRunnerAuthRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountPrivateActionRunnerAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_CONNECTION_ID) UUID connectionId, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_UUID) UUID userUuid) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.connectionId = connectionId; + this.userUuid = userUuid; + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthRequest authType( + DatabricksIntegrationAccountPrivateActionRunnerAuthType 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 DatabricksIntegrationAccountPrivateActionRunnerAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountPrivateActionRunnerAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthRequest connectionId( + UUID 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 UUID getConnectionId() { + return connectionId; + } + + public void setConnectionId(UUID connectionId) { + this.connectionId = connectionId; + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthRequest 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 DatabricksIntegrationAccountPrivateActionRunnerAuthRequest userUuid(UUID 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 UUID getUserUuid() { + return userUuid; + } + + public void setUserUuid(UUID userUuid) { + this.userUuid = userUuid; + } + + /** + * Return true if this DatabricksIntegrationAccountPrivateActionRunnerAuthRequest object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest + databricksIntegrationAccountPrivateActionRunnerAuthRequest = + (DatabricksIntegrationAccountPrivateActionRunnerAuthRequest) o; + return Objects.equals( + this.authType, databricksIntegrationAccountPrivateActionRunnerAuthRequest.authType) + && Objects.equals( + this.connectionId, + databricksIntegrationAccountPrivateActionRunnerAuthRequest.connectionId) + && Objects.equals( + this.secretPath, databricksIntegrationAccountPrivateActionRunnerAuthRequest.secretPath) + && Objects.equals( + this.userUuid, databricksIntegrationAccountPrivateActionRunnerAuthRequest.userUuid); + } + + @Override + public int hashCode() { + return Objects.hash(authType, connectionId, secretPath, userUuid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountPrivateActionRunnerAuthRequest {\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/DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.java new file mode 100644 index 00000000000..f865a62dbc3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.java @@ -0,0 +1,250 @@ +/* + * 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({ + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.JSON_PROPERTY_AUTH_TYPE, + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.JSON_PROPERTY_CONNECTION_ID, + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.JSON_PROPERTY_SECRET_PATH, + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse.JSON_PROPERTY_USER_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountPrivateActionRunnerAuthResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountPrivateActionRunnerAuthType authType = + DatabricksIntegrationAccountPrivateActionRunnerAuthType.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 DatabricksIntegrationAccountPrivateActionRunnerAuthResponse() {} + + @JsonCreator + public DatabricksIntegrationAccountPrivateActionRunnerAuthResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountPrivateActionRunnerAuthType 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 DatabricksIntegrationAccountPrivateActionRunnerAuthResponse authType( + DatabricksIntegrationAccountPrivateActionRunnerAuthType 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 DatabricksIntegrationAccountPrivateActionRunnerAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountPrivateActionRunnerAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthResponse 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 DatabricksIntegrationAccountPrivateActionRunnerAuthResponse 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 DatabricksIntegrationAccountPrivateActionRunnerAuthResponse 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 DatabricksIntegrationAccountPrivateActionRunnerAuthResponse + */ + @JsonAnySetter + public DatabricksIntegrationAccountPrivateActionRunnerAuthResponse putAdditionalProperty( + String 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 DatabricksIntegrationAccountPrivateActionRunnerAuthResponse object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse + databricksIntegrationAccountPrivateActionRunnerAuthResponse = + (DatabricksIntegrationAccountPrivateActionRunnerAuthResponse) o; + return Objects.equals( + this.authType, databricksIntegrationAccountPrivateActionRunnerAuthResponse.authType) + && Objects.equals( + this.connectionId, + databricksIntegrationAccountPrivateActionRunnerAuthResponse.connectionId) + && Objects.equals( + this.secretPath, databricksIntegrationAccountPrivateActionRunnerAuthResponse.secretPath) + && Objects.equals( + this.userUuid, databricksIntegrationAccountPrivateActionRunnerAuthResponse.userUuid) + && Objects.equals( + this.additionalProperties, + databricksIntegrationAccountPrivateActionRunnerAuthResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, connectionId, secretPath, userUuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountPrivateActionRunnerAuthResponse {\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/DatabricksIntegrationAccountPrivateActionRunnerAuthType.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthType.java new file mode 100644 index 00000000000..f77ffc862fe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthType.java @@ -0,0 +1,64 @@ +/* + * 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 = + DatabricksIntegrationAccountPrivateActionRunnerAuthType + .DatabricksIntegrationAccountPrivateActionRunnerAuthTypeSerializer.class) +public class DatabricksIntegrationAccountPrivateActionRunnerAuthType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("private_action_runner")); + + public static final DatabricksIntegrationAccountPrivateActionRunnerAuthType + PRIVATE_ACTION_RUNNER = + new DatabricksIntegrationAccountPrivateActionRunnerAuthType("private_action_runner"); + + DatabricksIntegrationAccountPrivateActionRunnerAuthType(String value) { + super(value, allowedValues); + } + + public static class DatabricksIntegrationAccountPrivateActionRunnerAuthTypeSerializer + extends StdSerializer { + public DatabricksIntegrationAccountPrivateActionRunnerAuthTypeSerializer( + Class t) { + super(t); + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DatabricksIntegrationAccountPrivateActionRunnerAuthType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DatabricksIntegrationAccountPrivateActionRunnerAuthType fromValue(String value) { + return new DatabricksIntegrationAccountPrivateActionRunnerAuthType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.java b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.java new file mode 100644 index 00000000000..c1220856a8d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.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.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; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Private Action Runner authentication. The runner holds the Databricks credentials, so this method + * carries no secrets. Only the fields provided are changed. + */ +@JsonPropertyOrder({ + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.JSON_PROPERTY_AUTH_TYPE, + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.JSON_PROPERTY_CONNECTION_ID, + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.JSON_PROPERTY_SECRET_PATH, + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate.JSON_PROPERTY_USER_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private DatabricksIntegrationAccountPrivateActionRunnerAuthType authType = + DatabricksIntegrationAccountPrivateActionRunnerAuthType.PRIVATE_ACTION_RUNNER; + + public static final String JSON_PROPERTY_CONNECTION_ID = "connection_id"; + private UUID connectionId; + + public static final String JSON_PROPERTY_SECRET_PATH = "secret_path"; + private JsonNullable secretPath = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_USER_UUID = "user_uuid"; + private UUID userUuid; + + public DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate() {} + + @JsonCreator + public DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + DatabricksIntegrationAccountPrivateActionRunnerAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate authType( + DatabricksIntegrationAccountPrivateActionRunnerAuthType 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 DatabricksIntegrationAccountPrivateActionRunnerAuthType getAuthType() { + return authType; + } + + public void setAuthType(DatabricksIntegrationAccountPrivateActionRunnerAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate connectionId(UUID connectionId) { + this.connectionId = connectionId; + return this; + } + + /** + * Unique identifier of the Private Action Runner connection holding the credentials. + * + * @return connectionId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONNECTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getConnectionId() { + return connectionId; + } + + public void setConnectionId(UUID connectionId) { + this.connectionId = connectionId; + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate secretPath(String secretPath) { + this.secretPath = JsonNullable.of(secretPath); + return this; + } + + /** + * Path of the credential inside the secret backend configured on the runner. Omit it to keep the + * stored path, send null or an empty string to remove it, or send a value to replace + * it. + * + * @return secretPath + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getSecretPath() { + return secretPath.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SECRET_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getSecretPath_JsonNullable() { + return secretPath; + } + + @JsonProperty(JSON_PROPERTY_SECRET_PATH) + public void setSecretPath_JsonNullable(JsonNullable secretPath) { + this.secretPath = secretPath; + } + + public void setSecretPath(String secretPath) { + this.secretPath = JsonNullable.of(secretPath); + } + + public DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate userUuid(UUID userUuid) { + this.userUuid = userUuid; + return this; + } + + /** + * Unique identifier of the user the Private Action Runner connection belongs to. + * + * @return userUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getUserUuid() { + return userUuid; + } + + public void setUserUuid(UUID userUuid) { + this.userUuid = userUuid; + } + + /** + * Return true if this DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate + databricksIntegrationAccountPrivateActionRunnerAuthUpdate = + (DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate) o; + return Objects.equals( + this.authType, databricksIntegrationAccountPrivateActionRunnerAuthUpdate.authType) + && Objects.equals( + this.connectionId, + databricksIntegrationAccountPrivateActionRunnerAuthUpdate.connectionId) + && Objects.equals( + this.secretPath, databricksIntegrationAccountPrivateActionRunnerAuthUpdate.secretPath) + && Objects.equals( + this.userUuid, databricksIntegrationAccountPrivateActionRunnerAuthUpdate.userUuid); + } + + @Override + public int hashCode() { + return Objects.hash(authType, connectionId, secretPath, userUuid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate {\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/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..3860a19d57f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountResponseAttributes.java @@ -0,0 +1,251 @@ +/* + * 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. A bearer_token + * method indicates an account still on token authentication, which Databricks accepts only on + * accounts that already use it. + * + * @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; + } + + /** + * Data Datadog collects from Databricks, 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..13c694c4b26 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsRequest.java @@ -0,0 +1,131 @@ +/* + * 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. Find it at the end of the + * HTTP Path under Warehouses > Connection Details in the Databricks console. Required when the + * cloud cost metrics or the Data Observability dataflow is enabled, or when + * serverless_jobs_enabled is on; since serverless jobs are on unless explicitly disabled, + * omitting this field otherwise causes the request to be rejected with a 422 + * response. + * + * @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..0c25f95c83c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountSettingsUpdate.java @@ -0,0 +1,124 @@ +/* + * 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. Find it at the end of the + * HTTP Path under Warehouses > Connection Details in the Databricks console. Required once the + * cloud cost metrics or the Data Observability dataflow is enabled, or while + * serverless_jobs_enabled is on; an update that leaves the account without one is rejected + * with a 422 response. + * + * @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..b48e93526f4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationAccountUpdateAttributes.java @@ -0,0 +1,254 @@ +/* + * 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. bearer_token is deprecated on Databricks: + * it is accepted only on accounts that already use it and never on creation, so it cannot move an + * account onto token authentication. Migrate those accounts to databricks_oauth or + * private_action_runner. + * + * @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; + } + + /** + * Data Datadog collects from Databricks, keyed by dataflow id. Each dataflow turns on a distinct + * kind of collection: set enabled to start or stop it, and use settings + * to configure what it collects. Defaults listed on each dataflow apply when the account is + * created; on update, omitted fields keep their current values. Some dataflows have + * prerequisites, noted on each; unless one is documented as rejecting the request, it is not + * verified, so a dataflow enabled without it 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..5e697c49c94 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationDataflowsRequest.java @@ -0,0 +1,239 @@ +/* + * 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; + +/** + * Data Datadog collects from Databricks, keyed by dataflow id. Each dataflow turns on a distinct + * kind of collection: set enabled to start or stop it, and use settings + * to configure what it collects. Defaults listed on each dataflow apply when the account is + * created; on update, omitted fields keep their current values. Some dataflows have prerequisites, + * noted on each; unless one is documented as rejecting the request, it is not verified, so a + * dataflow enabled without it is stored but collects no data. + */ +@JsonPropertyOrder({ + DatabricksIntegrationDataflowsRequest.JSON_PROPERTY_DATABRICKS_CLOUD_COST_METRICS, + DatabricksIntegrationDataflowsRequest.JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_JOBS_MONITORING, + DatabricksIntegrationDataflowsRequest + .JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_QUALITY_MONITORING, + DatabricksIntegrationDataflowsRequest.JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS +}) +@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_OBSERVABILITY_JOBS_MONITORING = + "databricks-data-observability-jobs-monitoring"; + private DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest + databricksDataObservabilityJobsMonitoring; + + public static final String JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_QUALITY_MONITORING = + "databricks-data-observability-quality-monitoring"; + private DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest + databricksDataObservabilityQualityMonitoring; + + public static final String JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS = + "databricks-model-serving-metrics"; + private DatabricksModelServingMetricsIntegrationDataflowRequest databricksModelServingMetrics; + + public DatabricksIntegrationDataflowsRequest databricksCloudCostMetrics( + DatabricksCloudCostMetricsIntegrationDataflowRequest databricksCloudCostMetrics) { + this.databricksCloudCostMetrics = databricksCloudCostMetrics; + this.unparsed |= databricksCloudCostMetrics.unparsed; + return this; + } + + /** + * Cost data collected from your Databricks system tables. Cloud Cost Management must be + * enabled for your organization while this dataflow is on; any request that leaves it enabled + * without that is rejected with a 422 response. + * + * @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 databricksDataObservabilityJobsMonitoring( + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest + databricksDataObservabilityJobsMonitoring) { + this.databricksDataObservabilityJobsMonitoring = databricksDataObservabilityJobsMonitoring; + this.unparsed |= databricksDataObservabilityJobsMonitoring.unparsed; + return this; + } + + /** + * Data Jobs Monitoring, which collects performance, reliability, and cost data for your + * Databricks jobs. + * + * @return databricksDataObservabilityJobsMonitoring + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_JOBS_MONITORING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest + getDatabricksDataObservabilityJobsMonitoring() { + return databricksDataObservabilityJobsMonitoring; + } + + public void setDatabricksDataObservabilityJobsMonitoring( + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest + databricksDataObservabilityJobsMonitoring) { + this.databricksDataObservabilityJobsMonitoring = databricksDataObservabilityJobsMonitoring; + if (databricksDataObservabilityJobsMonitoring != null) { + this.unparsed |= databricksDataObservabilityJobsMonitoring.unparsed; + } + } + + public DatabricksIntegrationDataflowsRequest databricksDataObservabilityQualityMonitoring( + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest + databricksDataObservabilityQualityMonitoring) { + this.databricksDataObservabilityQualityMonitoring = + databricksDataObservabilityQualityMonitoring; + this.unparsed |= databricksDataObservabilityQualityMonitoring.unparsed; + return this; + } + + /** + * Data Observability, which collects lineage and data quality information from your Databricks + * catalogs so you can explore how data flows and detect, resolve, and prevent quality issues. + * + * @return databricksDataObservabilityQualityMonitoring + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_QUALITY_MONITORING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest + getDatabricksDataObservabilityQualityMonitoring() { + return databricksDataObservabilityQualityMonitoring; + } + + public void setDatabricksDataObservabilityQualityMonitoring( + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest + databricksDataObservabilityQualityMonitoring) { + this.databricksDataObservabilityQualityMonitoring = + databricksDataObservabilityQualityMonitoring; + if (databricksDataObservabilityQualityMonitoring != null) { + this.unparsed |= databricksDataObservabilityQualityMonitoring.unparsed; + } + } + + public DatabricksIntegrationDataflowsRequest databricksModelServingMetrics( + DatabricksModelServingMetricsIntegrationDataflowRequest databricksModelServingMetrics) { + this.databricksModelServingMetrics = databricksModelServingMetrics; + this.unparsed |= databricksModelServingMetrics.unparsed; + return this; + } + + /** + * Health and usage metrics for your Databricks model serving endpoints. Not supported on accounts + * that authenticate with private_action_runner; on those accounts this dataflow + * collects no data. + * + * @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; + } + } + + /** 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.databricksDataObservabilityJobsMonitoring, + databricksIntegrationDataflowsRequest.databricksDataObservabilityJobsMonitoring) + && Objects.equals( + this.databricksDataObservabilityQualityMonitoring, + databricksIntegrationDataflowsRequest.databricksDataObservabilityQualityMonitoring) + && Objects.equals( + this.databricksModelServingMetrics, + databricksIntegrationDataflowsRequest.databricksModelServingMetrics); + } + + @Override + public int hashCode() { + return Objects.hash( + databricksCloudCostMetrics, + databricksDataObservabilityJobsMonitoring, + databricksDataObservabilityQualityMonitoring, + databricksModelServingMetrics); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationDataflowsRequest {\n"); + sb.append(" databricksCloudCostMetrics: ") + .append(toIndentedString(databricksCloudCostMetrics)) + .append("\n"); + sb.append(" databricksDataObservabilityJobsMonitoring: ") + .append(toIndentedString(databricksDataObservabilityJobsMonitoring)) + .append("\n"); + sb.append(" databricksDataObservabilityQualityMonitoring: ") + .append(toIndentedString(databricksDataObservabilityQualityMonitoring)) + .append("\n"); + sb.append(" databricksModelServingMetrics: ") + .append(toIndentedString(databricksModelServingMetrics)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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..0eee7aafd24 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksIntegrationDataflowsResponse.java @@ -0,0 +1,288 @@ +/* + * 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; + +/** Data Datadog collects from Databricks, keyed by dataflow id. */ +@JsonPropertyOrder({ + DatabricksIntegrationDataflowsResponse.JSON_PROPERTY_DATABRICKS_CLOUD_COST_METRICS, + DatabricksIntegrationDataflowsResponse + .JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_JOBS_MONITORING, + DatabricksIntegrationDataflowsResponse + .JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_QUALITY_MONITORING, + DatabricksIntegrationDataflowsResponse.JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS +}) +@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_OBSERVABILITY_JOBS_MONITORING = + "databricks-data-observability-jobs-monitoring"; + private DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse + databricksDataObservabilityJobsMonitoring; + + public static final String JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_QUALITY_MONITORING = + "databricks-data-observability-quality-monitoring"; + private DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + databricksDataObservabilityQualityMonitoring; + + public static final String JSON_PROPERTY_DATABRICKS_MODEL_SERVING_METRICS = + "databricks-model-serving-metrics"; + private DatabricksModelServingMetricsIntegrationDataflowResponse databricksModelServingMetrics; + + public DatabricksIntegrationDataflowsResponse databricksCloudCostMetrics( + DatabricksCloudCostMetricsIntegrationDataflowResponse databricksCloudCostMetrics) { + this.databricksCloudCostMetrics = databricksCloudCostMetrics; + this.unparsed |= databricksCloudCostMetrics.unparsed; + return this; + } + + /** + * Cost data collected from your Databricks system tables. Requires Cloud Cost Management to be set up + * for your organization. + * + * @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 databricksDataObservabilityJobsMonitoring( + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse + databricksDataObservabilityJobsMonitoring) { + this.databricksDataObservabilityJobsMonitoring = databricksDataObservabilityJobsMonitoring; + this.unparsed |= databricksDataObservabilityJobsMonitoring.unparsed; + return this; + } + + /** + * Data Jobs Monitoring, which collects performance, reliability, and cost data for your + * Databricks jobs. + * + * @return databricksDataObservabilityJobsMonitoring + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_JOBS_MONITORING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse + getDatabricksDataObservabilityJobsMonitoring() { + return databricksDataObservabilityJobsMonitoring; + } + + public void setDatabricksDataObservabilityJobsMonitoring( + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse + databricksDataObservabilityJobsMonitoring) { + this.databricksDataObservabilityJobsMonitoring = databricksDataObservabilityJobsMonitoring; + if (databricksDataObservabilityJobsMonitoring != null) { + this.unparsed |= databricksDataObservabilityJobsMonitoring.unparsed; + } + } + + public DatabricksIntegrationDataflowsResponse databricksDataObservabilityQualityMonitoring( + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + databricksDataObservabilityQualityMonitoring) { + this.databricksDataObservabilityQualityMonitoring = + databricksDataObservabilityQualityMonitoring; + this.unparsed |= databricksDataObservabilityQualityMonitoring.unparsed; + return this; + } + + /** + * Data Observability, which collects lineage and data quality information from your Databricks + * catalogs so you can explore how data flows and detect, resolve, and prevent quality issues. + * + * @return databricksDataObservabilityQualityMonitoring + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATABRICKS_DATA_OBSERVABILITY_QUALITY_MONITORING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + getDatabricksDataObservabilityQualityMonitoring() { + return databricksDataObservabilityQualityMonitoring; + } + + public void setDatabricksDataObservabilityQualityMonitoring( + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + databricksDataObservabilityQualityMonitoring) { + this.databricksDataObservabilityQualityMonitoring = + databricksDataObservabilityQualityMonitoring; + if (databricksDataObservabilityQualityMonitoring != null) { + this.unparsed |= databricksDataObservabilityQualityMonitoring.unparsed; + } + } + + public DatabricksIntegrationDataflowsResponse databricksModelServingMetrics( + DatabricksModelServingMetricsIntegrationDataflowResponse databricksModelServingMetrics) { + this.databricksModelServingMetrics = databricksModelServingMetrics; + this.unparsed |= databricksModelServingMetrics.unparsed; + return this; + } + + /** + * Health and usage metrics for your Databricks model serving endpoints. Not supported on accounts + * that authenticate with private_action_runner; on those accounts this dataflow + * collects no data. + * + * @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; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set 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.databricksDataObservabilityJobsMonitoring, + databricksIntegrationDataflowsResponse.databricksDataObservabilityJobsMonitoring) + && Objects.equals( + this.databricksDataObservabilityQualityMonitoring, + databricksIntegrationDataflowsResponse.databricksDataObservabilityQualityMonitoring) + && Objects.equals( + this.databricksModelServingMetrics, + databricksIntegrationDataflowsResponse.databricksModelServingMetrics) + && Objects.equals( + this.additionalProperties, databricksIntegrationDataflowsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + databricksCloudCostMetrics, + databricksDataObservabilityJobsMonitoring, + databricksDataObservabilityQualityMonitoring, + databricksModelServingMetrics, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksIntegrationDataflowsResponse {\n"); + sb.append(" databricksCloudCostMetrics: ") + .append(toIndentedString(databricksCloudCostMetrics)) + .append("\n"); + sb.append(" databricksDataObservabilityJobsMonitoring: ") + .append(toIndentedString(databricksDataObservabilityJobsMonitoring)) + .append("\n"); + sb.append(" databricksDataObservabilityQualityMonitoring: ") + .append(toIndentedString(databricksDataObservabilityQualityMonitoring)) + .append("\n"); + sb.append(" databricksModelServingMetrics: ") + .append(toIndentedString(databricksModelServingMetrics)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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..53c46aeed84 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DatabricksModelServingMetricsIntegrationDataflowRequest.java @@ -0,0 +1,92 @@ +/* + * 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; + +/** + * Health and usage metrics for your Databricks model serving endpoints. Not supported on accounts + * that authenticate with private_action_runner; on those accounts this dataflow + * collects no data. + */ +@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 Datadog collects this data. Defaults to false; set to true to + * start collection. + * + * @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; + } + + /** + * 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); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DatabricksModelServingMetricsIntegrationDataflowRequest {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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..7c6bb9a1be4 --- /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; + +/** + * Health and usage metrics for your Databricks model serving endpoints. Not supported on accounts + * that authenticate with private_action_runner; on those accounts this dataflow + * collects no data. + */ +@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 Datadog collects this data. + * + * @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/LLMObsCreatePromptData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptData.java index a4c4e240cc4..868ab853b96 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptData.java @@ -53,7 +53,10 @@ public LLMObsCreatePromptData attributes(LLMObsCreatePromptDataAttributes attrib /** * Attributes for creating an Agent Observability prompt and its first version. prompt_id - * and template are required; all other attributes are optional. + * and template are required; all other attributes are optional. If + * config is omitted, the first version stores an empty object. Configuration authoring + * must be enabled for your organization to supply config. Otherwise, supplying it, + * including an empty object, returns HTTP 403. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java index 9c6c8447f73..9743a040fa1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java @@ -21,9 +21,13 @@ /** * Attributes for creating an Agent Observability prompt and its first version. prompt_id - * and template are required; all other attributes are optional. + * and template are required; all other attributes are optional. If + * config is omitted, the first version stores an empty object. Configuration authoring must + * be enabled for your organization to supply config. Otherwise, supplying it, + * including an empty object, returns HTTP 403. */ @JsonPropertyOrder({ + LLMObsCreatePromptDataAttributes.JSON_PROPERTY_CONFIG, LLMObsCreatePromptDataAttributes.JSON_PROPERTY_DESCRIPTION, LLMObsCreatePromptDataAttributes.JSON_PROPERTY_ENV_IDS, LLMObsCreatePromptDataAttributes.JSON_PROPERTY_LABELS, @@ -36,6 +40,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LLMObsCreatePromptDataAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIG = "config"; + private Map config = null; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -69,6 +76,39 @@ public LLMObsCreatePromptDataAttributes( this.unparsed |= template.unparsed; } + public LLMObsCreatePromptDataAttributes config(Map config) { + this.config = config; + return this; + } + + public LLMObsCreatePromptDataAttributes putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Versioned prompt configuration is in Preview. To request access, contact Datadog Support or your Customer Success Manager. + * Customer-owned configuration delivered with a prompt version. Datadog stores and returns the + * object without interpolating it, validating provider-specific keys, or applying it to model + * calls. Do not include secrets. + * + * @return config + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + public void setConfig(Map config) { + this.config = config; + } + public LLMObsCreatePromptDataAttributes description(String description) { this.description = description; return this; @@ -180,7 +220,10 @@ public LLMObsCreatePromptDataAttributes template(LLMObsPromptTemplate template) } /** - * A text template or a list of chat messages. + * A text template or a list of chat messages and named message placeholders. + * Preview: Message placeholders are available in Preview. To request access, + * contact Datadog Support or your Customer + * Success Manager. * * @return template */ @@ -296,7 +339,8 @@ public boolean equals(Object o) { } LLMObsCreatePromptDataAttributes llmObsCreatePromptDataAttributes = (LLMObsCreatePromptDataAttributes) o; - return Objects.equals(this.description, llmObsCreatePromptDataAttributes.description) + return Objects.equals(this.config, llmObsCreatePromptDataAttributes.config) + && Objects.equals(this.description, llmObsCreatePromptDataAttributes.description) && Objects.equals(this.envIds, llmObsCreatePromptDataAttributes.envIds) && Objects.equals(this.labels, llmObsCreatePromptDataAttributes.labels) && Objects.equals(this.promptId, llmObsCreatePromptDataAttributes.promptId) @@ -310,13 +354,22 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - description, envIds, labels, promptId, template, title, userVersion, additionalProperties); + config, + description, + envIds, + labels, + promptId, + template, + title, + userVersion, + additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsCreatePromptDataAttributes {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" envIds: ").append(toIndentedString(envIds)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptResponse.java new file mode 100644 index 00000000000..5e821c4bdd7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptResponse.java @@ -0,0 +1,150 @@ +/* + * 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 returned after creating an Agent Observability prompt. */ +@JsonPropertyOrder({LLMObsCreatePromptResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsCreatePromptResponseData data; + + public LLMObsCreatePromptResponse() {} + + @JsonCreator + public LLMObsCreatePromptResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsCreatePromptResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsCreatePromptResponse data(LLMObsCreatePromptResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object returned after creating an Agent Observability prompt. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsCreatePromptResponseData getData() { + return data; + } + + public void setData(LLMObsCreatePromptResponseData 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 LLMObsCreatePromptResponse + */ + @JsonAnySetter + public LLMObsCreatePromptResponse putAdditionalProperty(String 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 LLMObsCreatePromptResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptResponse llmObsCreatePromptResponse = (LLMObsCreatePromptResponse) o; + return Objects.equals(this.data, llmObsCreatePromptResponse.data) + && Objects.equals( + this.additionalProperties, llmObsCreatePromptResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptResponse {\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/LLMObsCreatePromptResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptResponseData.java new file mode 100644 index 00000000000..0069a7ec21e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptResponseData.java @@ -0,0 +1,217 @@ +/* + * 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 object returned after creating an Agent Observability prompt. */ +@JsonPropertyOrder({ + LLMObsCreatePromptResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsCreatePromptResponseData.JSON_PROPERTY_ID, + LLMObsCreatePromptResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsCreatePromptResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptType type; + + public LLMObsCreatePromptResponseData() {} + + @JsonCreator + public LLMObsCreatePromptResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsCreatePromptResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsCreatePromptResponseData attributes( + LLMObsCreatePromptResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes returned after creating an Agent Observability prompt and its first version. Empty + * config is omitted when configuration authoring is disabled for the organization. + * Non-empty saved configuration is always returned. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsCreatePromptResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsCreatePromptResponseDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsCreatePromptResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the prompt. + * + * @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 LLMObsCreatePromptResponseData type(LLMObsPromptType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an Agent Observability prompt. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptType getType() { + return type; + } + + public void setType(LLMObsPromptType 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 LLMObsCreatePromptResponseData + */ + @JsonAnySetter + public LLMObsCreatePromptResponseData putAdditionalProperty(String 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 LLMObsCreatePromptResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptResponseData llmObsCreatePromptResponseData = + (LLMObsCreatePromptResponseData) o; + return Objects.equals(this.attributes, llmObsCreatePromptResponseData.attributes) + && Objects.equals(this.id, llmObsCreatePromptResponseData.id) + && Objects.equals(this.type, llmObsCreatePromptResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsCreatePromptResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptResponseData {\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/LLMObsCreatePromptResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptResponseDataAttributes.java new file mode 100644 index 00000000000..0d20f282fa3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptResponseDataAttributes.java @@ -0,0 +1,670 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Attributes returned after creating an Agent Observability prompt and its first version. Empty + * config is omitted when configuration authoring is disabled for the organization. + * Non-empty saved configuration is always returned. + */ +@JsonPropertyOrder({ + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_AUTHOR, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_CONFIG, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_CREATED_FROM, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_DATASETS, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_DESCRIPTION, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_EXTRACTED_FROM, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_IN_REGISTRY, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_LAST_SEEN_AT, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_LAST_VERSION_CREATED_AT, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_ML_APP, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_ML_APPS, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_NUM_VERSIONS, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_PROMPT_ID, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_SOURCE, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_TAGS, + LLMObsCreatePromptResponseDataAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHOR = "author"; + private String author; + + public static final String JSON_PROPERTY_CONFIG = "config"; + private Map config = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_FROM = "created_from"; + private String createdFrom; + + public static final String JSON_PROPERTY_DATASETS = "datasets"; + private List datasets = null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EXTRACTED_FROM = "extracted_from"; + private String extractedFrom; + + public static final String JSON_PROPERTY_IN_REGISTRY = "in_registry"; + private Boolean inRegistry; + + public static final String JSON_PROPERTY_LAST_SEEN_AT = "last_seen_at"; + private OffsetDateTime lastSeenAt; + + public static final String JSON_PROPERTY_LAST_VERSION_CREATED_AT = "last_version_created_at"; + private OffsetDateTime lastVersionCreatedAt; + + public static final String JSON_PROPERTY_ML_APP = "ml_app"; + private String mlApp; + + public static final String JSON_PROPERTY_ML_APPS = "ml_apps"; + private List mlApps = null; + + public static final String JSON_PROPERTY_NUM_VERSIONS = "num_versions"; + private Long numVersions; + + public static final String JSON_PROPERTY_PROMPT_ID = "prompt_id"; + private String promptId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private LLMObsPromptResponseSource source; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public LLMObsCreatePromptResponseDataAttributes() {} + + @JsonCreator + public LLMObsCreatePromptResponseDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_FROM) String createdFrom, + @JsonProperty(required = true, value = JSON_PROPERTY_IN_REGISTRY) Boolean inRegistry, + @JsonProperty(required = true, value = JSON_PROPERTY_NUM_VERSIONS) Long numVersions, + @JsonProperty(required = true, value = JSON_PROPERTY_PROMPT_ID) String promptId, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) + LLMObsPromptResponseSource source) { + this.createdFrom = createdFrom; + this.inRegistry = inRegistry; + this.numVersions = numVersions; + this.promptId = promptId; + this.source = source; + this.unparsed |= !source.isValid(); + } + + public LLMObsCreatePromptResponseDataAttributes author(String author) { + this.author = author; + return this; + } + + /** + * UUID of the user who authored the prompt. + * + * @return author + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public LLMObsCreatePromptResponseDataAttributes config(Map config) { + this.config = config; + return this; + } + + public LLMObsCreatePromptResponseDataAttributes putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Versioned prompt configuration is in Preview. To request access, contact Datadog Support or your Customer Success Manager. + * Customer-owned configuration delivered with a prompt version. Datadog stores and returns the + * object without interpolating it, validating provider-specific keys, or applying it to model + * calls. Do not include secrets. + * + * @return config + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + public void setConfig(Map config) { + this.config = config; + } + + public LLMObsCreatePromptResponseDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the prompt was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsCreatePromptResponseDataAttributes createdFrom(String createdFrom) { + this.createdFrom = createdFrom; + return this; + } + + /** + * Source that created the prompt, such as ui-registry, sdk-registry, or + * sdk-instrumentation. + * + * @return createdFrom + */ + @JsonProperty(JSON_PROPERTY_CREATED_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedFrom() { + return createdFrom; + } + + public void setCreatedFrom(String createdFrom) { + this.createdFrom = createdFrom; + } + + public LLMObsCreatePromptResponseDataAttributes datasets(List datasets) { + this.datasets = datasets; + if (datasets != null) { + for (LLMObsPromptDataset item : datasets) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public LLMObsCreatePromptResponseDataAttributes addDatasetsItem( + LLMObsPromptDataset datasetsItem) { + if (this.datasets == null) { + this.datasets = new ArrayList<>(); + } + this.datasets.add(datasetsItem); + this.unparsed |= datasetsItem.unparsed; + return this; + } + + /** + * Datasets observed in runs associated with this prompt. + * + * @return datasets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasets() { + return datasets; + } + + public void setDatasets(List datasets) { + this.datasets = datasets; + if (datasets != null) { + for (LLMObsPromptDataset item : datasets) { + this.unparsed |= item.unparsed; + } + } + } + + public LLMObsCreatePromptResponseDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Description of the prompt. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsCreatePromptResponseDataAttributes extractedFrom(String extractedFrom) { + this.extractedFrom = extractedFrom; + return this; + } + + /** + * Source prompt from which this prompt was extracted, when applicable. + * + * @return extractedFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTRACTED_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExtractedFrom() { + return extractedFrom; + } + + public void setExtractedFrom(String extractedFrom) { + this.extractedFrom = extractedFrom; + } + + public LLMObsCreatePromptResponseDataAttributes inRegistry(Boolean inRegistry) { + this.inRegistry = inRegistry; + return this; + } + + /** + * Whether the prompt is a registry entry (as opposed to a code-discovered prompt). + * + * @return inRegistry + */ + @JsonProperty(JSON_PROPERTY_IN_REGISTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getInRegistry() { + return inRegistry; + } + + public void setInRegistry(Boolean inRegistry) { + this.inRegistry = inRegistry; + } + + public LLMObsCreatePromptResponseDataAttributes lastSeenAt(OffsetDateTime lastSeenAt) { + this.lastSeenAt = lastSeenAt; + return this; + } + + /** + * Timestamp of the most recent observed run of this prompt. + * + * @return lastSeenAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastSeenAt() { + return lastSeenAt; + } + + public void setLastSeenAt(OffsetDateTime lastSeenAt) { + this.lastSeenAt = lastSeenAt; + } + + public LLMObsCreatePromptResponseDataAttributes lastVersionCreatedAt( + OffsetDateTime lastVersionCreatedAt) { + this.lastVersionCreatedAt = lastVersionCreatedAt; + return this; + } + + /** + * Timestamp when the most recent version of the prompt was created. + * + * @return lastVersionCreatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_VERSION_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastVersionCreatedAt() { + return lastVersionCreatedAt; + } + + public void setLastVersionCreatedAt(OffsetDateTime lastVersionCreatedAt) { + this.lastVersionCreatedAt = lastVersionCreatedAt; + } + + public LLMObsCreatePromptResponseDataAttributes mlApp(String mlApp) { + this.mlApp = mlApp; + return this; + } + + /** + * The ML application this prompt is associated with. + * + * @return mlApp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ML_APP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMlApp() { + return mlApp; + } + + public void setMlApp(String mlApp) { + this.mlApp = mlApp; + } + + public LLMObsCreatePromptResponseDataAttributes mlApps(List mlApps) { + this.mlApps = mlApps; + return this; + } + + public LLMObsCreatePromptResponseDataAttributes addMlAppsItem(String mlAppsItem) { + if (this.mlApps == null) { + this.mlApps = new ArrayList<>(); + } + this.mlApps.add(mlAppsItem); + return this; + } + + /** + * ML applications observed running this prompt. + * + * @return mlApps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ML_APPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMlApps() { + return mlApps; + } + + public void setMlApps(List mlApps) { + this.mlApps = mlApps; + } + + public LLMObsCreatePromptResponseDataAttributes numVersions(Long numVersions) { + this.numVersions = numVersions; + return this; + } + + /** + * Number of versions of the prompt. + * + * @return numVersions + */ + @JsonProperty(JSON_PROPERTY_NUM_VERSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getNumVersions() { + return numVersions; + } + + public void setNumVersions(Long numVersions) { + this.numVersions = numVersions; + } + + public LLMObsCreatePromptResponseDataAttributes promptId(String promptId) { + this.promptId = promptId; + return this; + } + + /** + * Customer-provided identifier of the prompt. + * + * @return promptId + */ + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptId() { + return promptId; + } + + public void setPromptId(String promptId) { + this.promptId = promptId; + } + + public LLMObsCreatePromptResponseDataAttributes source(LLMObsPromptResponseSource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * Whether the prompt was created from the registry or discovered from observed LLM calls. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptResponseSource getSource() { + return source; + } + + public void setSource(LLMObsPromptResponseSource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + public LLMObsCreatePromptResponseDataAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public LLMObsCreatePromptResponseDataAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags observed on runs of this prompt. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public LLMObsCreatePromptResponseDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Title of the prompt. + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsCreatePromptResponseDataAttributes + */ + @JsonAnySetter + public LLMObsCreatePromptResponseDataAttributes putAdditionalProperty(String 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 LLMObsCreatePromptResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptResponseDataAttributes llmObsCreatePromptResponseDataAttributes = + (LLMObsCreatePromptResponseDataAttributes) o; + return Objects.equals(this.author, llmObsCreatePromptResponseDataAttributes.author) + && Objects.equals(this.config, llmObsCreatePromptResponseDataAttributes.config) + && Objects.equals(this.createdAt, llmObsCreatePromptResponseDataAttributes.createdAt) + && Objects.equals(this.createdFrom, llmObsCreatePromptResponseDataAttributes.createdFrom) + && Objects.equals(this.datasets, llmObsCreatePromptResponseDataAttributes.datasets) + && Objects.equals(this.description, llmObsCreatePromptResponseDataAttributes.description) + && Objects.equals( + this.extractedFrom, llmObsCreatePromptResponseDataAttributes.extractedFrom) + && Objects.equals(this.inRegistry, llmObsCreatePromptResponseDataAttributes.inRegistry) + && Objects.equals(this.lastSeenAt, llmObsCreatePromptResponseDataAttributes.lastSeenAt) + && Objects.equals( + this.lastVersionCreatedAt, + llmObsCreatePromptResponseDataAttributes.lastVersionCreatedAt) + && Objects.equals(this.mlApp, llmObsCreatePromptResponseDataAttributes.mlApp) + && Objects.equals(this.mlApps, llmObsCreatePromptResponseDataAttributes.mlApps) + && Objects.equals(this.numVersions, llmObsCreatePromptResponseDataAttributes.numVersions) + && Objects.equals(this.promptId, llmObsCreatePromptResponseDataAttributes.promptId) + && Objects.equals(this.source, llmObsCreatePromptResponseDataAttributes.source) + && Objects.equals(this.tags, llmObsCreatePromptResponseDataAttributes.tags) + && Objects.equals(this.title, llmObsCreatePromptResponseDataAttributes.title) + && Objects.equals( + this.additionalProperties, + llmObsCreatePromptResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + author, + config, + createdAt, + createdFrom, + datasets, + description, + extractedFrom, + inRegistry, + lastSeenAt, + lastVersionCreatedAt, + mlApp, + mlApps, + numVersions, + promptId, + source, + tags, + title, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptResponseDataAttributes {\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdFrom: ").append(toIndentedString(createdFrom)).append("\n"); + sb.append(" datasets: ").append(toIndentedString(datasets)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" extractedFrom: ").append(toIndentedString(extractedFrom)).append("\n"); + sb.append(" inRegistry: ").append(toIndentedString(inRegistry)).append("\n"); + sb.append(" lastSeenAt: ").append(toIndentedString(lastSeenAt)).append("\n"); + sb.append(" lastVersionCreatedAt: ") + .append(toIndentedString(lastVersionCreatedAt)) + .append("\n"); + sb.append(" mlApp: ").append(toIndentedString(mlApp)).append("\n"); + sb.append(" mlApps: ").append(toIndentedString(mlApps)).append("\n"); + sb.append(" numVersions: ").append(toIndentedString(numVersions)).append("\n"); + sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionData.java index c2c5216e7b9..a9abbf3bba4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionData.java @@ -54,7 +54,11 @@ public LLMObsCreatePromptVersionData attributes( /** * Attributes for creating a new version of an Agent Observability prompt. template - * is required; all other attributes are optional. + * is required; all other attributes are optional. If config is omitted, the latest + * version's configuration is carried forward. An explicit empty object clears it. Configuration + * authoring must be enabled for your organization to supply config. Otherwise, + * supplying it, including an empty object, returns HTTP 403. Omitting config still + * carries forward the latest configuration. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java index f3818138c7d..c918e2f7d6d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java @@ -21,9 +21,14 @@ /** * Attributes for creating a new version of an Agent Observability prompt. template is - * required; all other attributes are optional. + * required; all other attributes are optional. If config is omitted, the latest + * version's configuration is carried forward. An explicit empty object clears it. Configuration + * authoring must be enabled for your organization to supply config. Otherwise, + * supplying it, including an empty object, returns HTTP 403. Omitting config still + * carries forward the latest configuration. */ @JsonPropertyOrder({ + LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_CONFIG, LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_DESCRIPTION, LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_ENV_IDS, LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_LABELS, @@ -34,6 +39,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LLMObsCreatePromptVersionDataAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIG = "config"; + private Map config = null; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -59,6 +67,39 @@ public LLMObsCreatePromptVersionDataAttributes( this.unparsed |= template.unparsed; } + public LLMObsCreatePromptVersionDataAttributes config(Map config) { + this.config = config; + return this; + } + + public LLMObsCreatePromptVersionDataAttributes putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Versioned prompt configuration is in Preview. To request access, contact Datadog Support or your Customer Success Manager. + * Customer-owned configuration delivered with a prompt version. Datadog stores and returns the + * object without interpolating it, validating provider-specific keys, or applying it to model + * calls. Do not include secrets. + * + * @return config + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + public void setConfig(Map config) { + this.config = config; + } + public LLMObsCreatePromptVersionDataAttributes description(String description) { this.description = description; return this; @@ -151,7 +192,10 @@ public LLMObsCreatePromptVersionDataAttributes template(LLMObsPromptTemplate tem } /** - * A text template or a list of chat messages. + * A text template or a list of chat messages and named message placeholders. + * Preview: Message placeholders are available in Preview. To request access, + * contact Datadog Support or your Customer + * Success Manager. * * @return template */ @@ -246,7 +290,8 @@ public boolean equals(Object o) { } LLMObsCreatePromptVersionDataAttributes llmObsCreatePromptVersionDataAttributes = (LLMObsCreatePromptVersionDataAttributes) o; - return Objects.equals(this.description, llmObsCreatePromptVersionDataAttributes.description) + return Objects.equals(this.config, llmObsCreatePromptVersionDataAttributes.config) + && Objects.equals(this.description, llmObsCreatePromptVersionDataAttributes.description) && Objects.equals(this.envIds, llmObsCreatePromptVersionDataAttributes.envIds) && Objects.equals(this.labels, llmObsCreatePromptVersionDataAttributes.labels) && Objects.equals(this.template, llmObsCreatePromptVersionDataAttributes.template) @@ -258,13 +303,15 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(description, envIds, labels, template, userVersion, additionalProperties); + return Objects.hash( + config, description, envIds, labels, template, userVersion, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsCreatePromptVersionDataAttributes {\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" envIds: ").append(toIndentedString(envIds)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplate.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplate.java index 53d603e186e..2b2b0294b57 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplate.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplate.java @@ -16,16 +16,21 @@ import java.util.Map; import java.util.Objects; -/** A chat prompt template. */ +/** + * A chat prompt template containing messages and optional named message placeholders. + * Preview: Message placeholders are available in Preview. To request access, + * contact Datadog Support or your Customer Success + * Manager. + */ @JsonPropertyOrder({}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class LLMObsPromptChatTemplate extends ArrayList { +public class LLMObsPromptChatTemplate extends ArrayList { @JsonIgnore public boolean unparsed = false; public LLMObsPromptChatTemplate() {} - public LLMObsPromptChatTemplate(List items) { + public LLMObsPromptChatTemplate(List items) { super(items); } diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplateItem.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplateItem.java new file mode 100644 index 00000000000..c553be3b074 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplateItem.java @@ -0,0 +1,288 @@ +/* + * 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 = LLMObsPromptChatTemplateItem.LLMObsPromptChatTemplateItemDeserializer.class) +@JsonSerialize(using = LLMObsPromptChatTemplateItem.LLMObsPromptChatTemplateItemSerializer.class) +public class LLMObsPromptChatTemplateItem extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(LLMObsPromptChatTemplateItem.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class LLMObsPromptChatTemplateItemSerializer + extends StdSerializer { + public LLMObsPromptChatTemplateItemSerializer(Class t) { + super(t); + } + + public LLMObsPromptChatTemplateItemSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPromptChatTemplateItem value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class LLMObsPromptChatTemplateItemDeserializer + extends StdDeserializer { + public LLMObsPromptChatTemplateItemDeserializer() { + this(LLMObsPromptChatTemplateItem.class); + } + + public LLMObsPromptChatTemplateItemDeserializer(Class vc) { + super(vc); + } + + @Override + public LLMObsPromptChatTemplateItem 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 LLMObsPromptChatMessage + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LLMObsPromptChatMessage.class.equals(Integer.class) + || LLMObsPromptChatMessage.class.equals(Long.class) + || LLMObsPromptChatMessage.class.equals(Float.class) + || LLMObsPromptChatMessage.class.equals(Double.class) + || LLMObsPromptChatMessage.class.equals(Boolean.class) + || LLMObsPromptChatMessage.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((LLMObsPromptChatMessage.class.equals(Integer.class) + || LLMObsPromptChatMessage.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((LLMObsPromptChatMessage.class.equals(Float.class) + || LLMObsPromptChatMessage.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (LLMObsPromptChatMessage.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (LLMObsPromptChatMessage.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LLMObsPromptChatMessage.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 (!((LLMObsPromptChatMessage) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LLMObsPromptChatMessage'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LLMObsPromptChatMessage'", e); + } + + // deserialize LLMObsPromptMessagePlaceholder + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LLMObsPromptMessagePlaceholder.class.equals(Integer.class) + || LLMObsPromptMessagePlaceholder.class.equals(Long.class) + || LLMObsPromptMessagePlaceholder.class.equals(Float.class) + || LLMObsPromptMessagePlaceholder.class.equals(Double.class) + || LLMObsPromptMessagePlaceholder.class.equals(Boolean.class) + || LLMObsPromptMessagePlaceholder.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((LLMObsPromptMessagePlaceholder.class.equals(Integer.class) + || LLMObsPromptMessagePlaceholder.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((LLMObsPromptMessagePlaceholder.class.equals(Float.class) + || LLMObsPromptMessagePlaceholder.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (LLMObsPromptMessagePlaceholder.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (LLMObsPromptMessagePlaceholder.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LLMObsPromptMessagePlaceholder.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 (!((LLMObsPromptMessagePlaceholder) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LLMObsPromptMessagePlaceholder'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, "Input data does not match schema 'LLMObsPromptMessagePlaceholder'", e); + } + + LLMObsPromptChatTemplateItem ret = new LLMObsPromptChatTemplateItem(); + 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 LLMObsPromptChatTemplateItem getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "LLMObsPromptChatTemplateItem cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public LLMObsPromptChatTemplateItem() { + super("oneOf", Boolean.FALSE); + } + + public LLMObsPromptChatTemplateItem(LLMObsPromptChatMessage o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public LLMObsPromptChatTemplateItem(LLMObsPromptMessagePlaceholder o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("LLMObsPromptChatMessage", new GenericType() {}); + schemas.put( + "LLMObsPromptMessagePlaceholder", new GenericType() {}); + JSON.registerDescendants( + LLMObsPromptChatTemplateItem.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return LLMObsPromptChatTemplateItem.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: LLMObsPromptChatMessage, LLMObsPromptMessagePlaceholder + * + *

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(LLMObsPromptChatMessage.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + LLMObsPromptMessagePlaceholder.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 LLMObsPromptChatMessage, LLMObsPromptMessagePlaceholder"); + } + + /** + * Get the actual instance, which can be the following: LLMObsPromptChatMessage, + * LLMObsPromptMessagePlaceholder + * + * @return The actual instance (LLMObsPromptChatMessage, LLMObsPromptMessagePlaceholder) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `LLMObsPromptChatMessage`. If the actual instance is not + * `LLMObsPromptChatMessage`, the ClassCastException will be thrown. + * + * @return The actual instance of `LLMObsPromptChatMessage` + * @throws ClassCastException if the instance is not `LLMObsPromptChatMessage` + */ + public LLMObsPromptChatMessage getLLMObsPromptChatMessage() throws ClassCastException { + return (LLMObsPromptChatMessage) super.getActualInstance(); + } + + /** + * Get the actual instance of `LLMObsPromptMessagePlaceholder`. If the actual instance is not + * `LLMObsPromptMessagePlaceholder`, the ClassCastException will be thrown. + * + * @return The actual instance of `LLMObsPromptMessagePlaceholder` + * @throws ClassCastException if the instance is not `LLMObsPromptMessagePlaceholder` + */ + public LLMObsPromptMessagePlaceholder getLLMObsPromptMessagePlaceholder() + throws ClassCastException { + return (LLMObsPromptMessagePlaceholder) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptData.java index c1d1b55d700..be67a5cd102 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptData.java @@ -58,7 +58,8 @@ public LLMObsPromptData attributes(LLMObsPromptDataAttributes attributes) { } /** - * Attributes of an Agent Observability prompt registry entry. + * Attributes of an Agent Observability prompt registry entry. Prompt list and metadata-update + * responses omit complete template and configuration data. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataAttributes.java index 1f82c290c2e..d9814bf6970 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataAttributes.java @@ -20,7 +20,10 @@ import java.util.Map; import java.util.Objects; -/** Attributes of an Agent Observability prompt registry entry. */ +/** + * Attributes of an Agent Observability prompt registry entry. Prompt list and metadata-update + * responses omit complete template and configuration data. + */ @JsonPropertyOrder({ LLMObsPromptDataAttributes.JSON_PROPERTY_AUTHOR, LLMObsPromptDataAttributes.JSON_PROPERTY_CREATED_AT, diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptMessagePlaceholder.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptMessagePlaceholder.java new file mode 100644 index 00000000000..b32ae25fe70 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptMessagePlaceholder.java @@ -0,0 +1,131 @@ +/* + * 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; + +/** + * A named placeholder that inserts a list of messages when a compatible SDK formats the prompt. + * Preview: Message placeholders are available in Preview. To request access, + * contact Datadog Support or your Customer Success + * Manager. + */ +@JsonPropertyOrder({ + LLMObsPromptMessagePlaceholder.JSON_PROPERTY_NAME, + LLMObsPromptMessagePlaceholder.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptMessagePlaceholder { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptMessagePlaceholderType type; + + public LLMObsPromptMessagePlaceholder() {} + + @JsonCreator + public LLMObsPromptMessagePlaceholder( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPromptMessagePlaceholderType type) { + this.name = name; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPromptMessagePlaceholder name(String name) { + this.name = name; + return this; + } + + /** + * Name used to supply the message list when formatting the prompt. + * + * @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 LLMObsPromptMessagePlaceholder type(LLMObsPromptMessagePlaceholderType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of chat-template item. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptMessagePlaceholderType getType() { + return type; + } + + public void setType(LLMObsPromptMessagePlaceholderType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** Return true if this LLMObsPromptMessagePlaceholder object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptMessagePlaceholder llmObsPromptMessagePlaceholder = + (LLMObsPromptMessagePlaceholder) o; + return Objects.equals(this.name, llmObsPromptMessagePlaceholder.name) + && Objects.equals(this.type, llmObsPromptMessagePlaceholder.type); + } + + @Override + public int hashCode() { + return Objects.hash(name, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptMessagePlaceholder {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptMessagePlaceholderType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptMessagePlaceholderType.java new file mode 100644 index 00000000000..1ffc8e5c8f8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptMessagePlaceholderType.java @@ -0,0 +1,59 @@ +/* + * 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; + +/** Type of chat-template item. */ +@JsonSerialize( + using = LLMObsPromptMessagePlaceholderType.LLMObsPromptMessagePlaceholderTypeSerializer.class) +public class LLMObsPromptMessagePlaceholderType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("placeholder")); + + public static final LLMObsPromptMessagePlaceholderType PLACEHOLDER = + new LLMObsPromptMessagePlaceholderType("placeholder"); + + LLMObsPromptMessagePlaceholderType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPromptMessagePlaceholderTypeSerializer + extends StdSerializer { + public LLMObsPromptMessagePlaceholderTypeSerializer( + Class t) { + super(t); + } + + public LLMObsPromptMessagePlaceholderTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPromptMessagePlaceholderType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPromptMessagePlaceholderType fromValue(String value) { + return new LLMObsPromptMessagePlaceholderType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKData.java index 24e2533648f..aa215934936 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKData.java @@ -59,7 +59,9 @@ public LLMObsPromptSDKData attributes(LLMObsPromptSDKDataAttributes attributes) /** * Attributes of a flattened prompt version returned for SDK consumption. Exactly one of - * template and chat_template is returned. + * template and chat_template is returned. Empty config is + * omitted when configuration authoring is disabled for the organization. Non-empty saved + * configuration is always returned. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKDataAttributes.java index d71b6c2db1c..f9093926685 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKDataAttributes.java @@ -20,10 +20,13 @@ /** * Attributes of a flattened prompt version returned for SDK consumption. Exactly one of - * template and chat_template is returned. + * template and chat_template is returned. Empty config is omitted + * when configuration authoring is disabled for the organization. Non-empty saved configuration is + * always returned. */ @JsonPropertyOrder({ LLMObsPromptSDKDataAttributes.JSON_PROPERTY_CHAT_TEMPLATE, + LLMObsPromptSDKDataAttributes.JSON_PROPERTY_CONFIG, LLMObsPromptSDKDataAttributes.JSON_PROPERTY_LABELS, LLMObsPromptSDKDataAttributes.JSON_PROPERTY_PROMPT_ID, LLMObsPromptSDKDataAttributes.JSON_PROPERTY_PROMPT_VERSION_UUID, @@ -35,7 +38,10 @@ public class LLMObsPromptSDKDataAttributes { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_CHAT_TEMPLATE = "chat_template"; - private List chatTemplate = null; + private List chatTemplate = null; + + public static final String JSON_PROPERTY_CONFIG = "config"; + private Map config = null; public static final String JSON_PROPERTY_LABELS = "labels"; private List labels = null; @@ -52,10 +58,11 @@ public class LLMObsPromptSDKDataAttributes { public static final String JSON_PROPERTY_VERSION = "version"; private String version; - public LLMObsPromptSDKDataAttributes chatTemplate(List chatTemplate) { + public LLMObsPromptSDKDataAttributes chatTemplate( + List chatTemplate) { this.chatTemplate = chatTemplate; if (chatTemplate != null) { - for (LLMObsPromptChatMessage item : chatTemplate) { + for (LLMObsPromptChatTemplateItem item : chatTemplate) { this.unparsed |= item.unparsed; } } @@ -63,7 +70,7 @@ public LLMObsPromptSDKDataAttributes chatTemplate(List } public LLMObsPromptSDKDataAttributes addChatTemplateItem( - LLMObsPromptChatMessage chatTemplateItem) { + LLMObsPromptChatTemplateItem chatTemplateItem) { if (this.chatTemplate == null) { this.chatTemplate = new ArrayList<>(); } @@ -73,27 +80,62 @@ public LLMObsPromptSDKDataAttributes addChatTemplateItem( } /** - * Chat template for this prompt version, as a list of role and content messages. Omitted for text - * templates. + * Chat template for this prompt version, as a list of messages and named message placeholders. + * Omitted for text templates. Preview: Message placeholders are available in + * Preview. To request access, contact Datadog + * Support or your Customer Success Manager. * * @return chatTemplate */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_CHAT_TEMPLATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getChatTemplate() { + public List getChatTemplate() { return chatTemplate; } - public void setChatTemplate(List chatTemplate) { + public void setChatTemplate(List chatTemplate) { this.chatTemplate = chatTemplate; if (chatTemplate != null) { - for (LLMObsPromptChatMessage item : chatTemplate) { + for (LLMObsPromptChatTemplateItem item : chatTemplate) { this.unparsed |= item.unparsed; } } } + public LLMObsPromptSDKDataAttributes config(Map config) { + this.config = config; + return this; + } + + public LLMObsPromptSDKDataAttributes putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Versioned prompt configuration is in Preview. To request access, contact Datadog Support or your Customer Success Manager. + * Customer-owned configuration delivered with a prompt version. Datadog stores and returns the + * object without interpolating it, validating provider-specific keys, or applying it to model + * calls. Do not include secrets. + * + * @return config + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + public void setConfig(Map config) { + this.config = config; + } + public LLMObsPromptSDKDataAttributes labels(List labels) { this.labels = labels; return this; @@ -268,6 +310,7 @@ public boolean equals(Object o) { } LLMObsPromptSDKDataAttributes llmObsPromptSdkDataAttributes = (LLMObsPromptSDKDataAttributes) o; return Objects.equals(this.chatTemplate, llmObsPromptSdkDataAttributes.chatTemplate) + && Objects.equals(this.config, llmObsPromptSdkDataAttributes.config) && Objects.equals(this.labels, llmObsPromptSdkDataAttributes.labels) && Objects.equals(this.promptId, llmObsPromptSdkDataAttributes.promptId) && Objects.equals(this.promptVersionUuid, llmObsPromptSdkDataAttributes.promptVersionUuid) @@ -280,7 +323,14 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - chatTemplate, labels, promptId, promptVersionUuid, template, version, additionalProperties); + chatTemplate, + config, + labels, + promptId, + promptVersionUuid, + template, + version, + additionalProperties); } @Override @@ -288,6 +338,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsPromptSDKDataAttributes {\n"); sb.append(" chatTemplate: ").append(toIndentedString(chatTemplate)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); sb.append(" promptVersionUuid: ").append(toIndentedString(promptVersionUuid)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionData.java index 0996b6f90cd..34b6420b614 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionData.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionData.java @@ -58,7 +58,9 @@ public LLMObsPromptVersionData attributes(LLMObsPromptVersionDataAttributes attr } /** - * Attributes of a specific version of an Agent Observability prompt. + * Attributes of a specific version of an Agent Observability prompt. Empty config is + * omitted when configuration authoring is disabled for the organization. Non-empty saved + * configuration is always returned. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionDataAttributes.java index 9f2c088d22b..d0fc76df826 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionDataAttributes.java @@ -20,9 +20,14 @@ import java.util.Map; import java.util.Objects; -/** Attributes of a specific version of an Agent Observability prompt. */ +/** + * Attributes of a specific version of an Agent Observability prompt. Empty config is + * omitted when configuration authoring is disabled for the organization. Non-empty saved + * configuration is always returned. + */ @JsonPropertyOrder({ LLMObsPromptVersionDataAttributes.JSON_PROPERTY_AUTHOR, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_CONFIG, LLMObsPromptVersionDataAttributes.JSON_PROPERTY_CREATED_AT, LLMObsPromptVersionDataAttributes.JSON_PROPERTY_DATASETS, LLMObsPromptVersionDataAttributes.JSON_PROPERTY_DESCRIPTION, @@ -45,6 +50,9 @@ public class LLMObsPromptVersionDataAttributes { public static final String JSON_PROPERTY_AUTHOR = "author"; private String author; + public static final String JSON_PROPERTY_CONFIG = "config"; + private Map config = null; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private OffsetDateTime createdAt; @@ -123,6 +131,39 @@ public void setAuthor(String author) { this.author = author; } + public LLMObsPromptVersionDataAttributes config(Map config) { + this.config = config; + return this; + } + + public LLMObsPromptVersionDataAttributes putConfigItem(String key, Object configItem) { + if (this.config == null) { + this.config = new HashMap<>(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Versioned prompt configuration is in Preview. To request access, contact Datadog Support or your Customer Success Manager. + * Customer-owned configuration delivered with a prompt version. Datadog stores and returns the + * object without interpolating it, validating provider-specific keys, or applying it to model + * calls. Do not include secrets. + * + * @return config + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getConfig() { + return config; + } + + public void setConfig(Map config) { + this.config = config; + } + public LLMObsPromptVersionDataAttributes createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; return this; @@ -385,7 +426,10 @@ public LLMObsPromptVersionDataAttributes template(LLMObsPromptTemplate template) } /** - * A text template or a list of chat messages. + * A text template or a list of chat messages and named message placeholders. + * Preview: Message placeholders are available in Preview. To request access, + * contact Datadog Support or your Customer + * Success Manager. * * @return template */ @@ -522,6 +566,7 @@ public boolean equals(Object o) { LLMObsPromptVersionDataAttributes llmObsPromptVersionDataAttributes = (LLMObsPromptVersionDataAttributes) o; return Objects.equals(this.author, llmObsPromptVersionDataAttributes.author) + && Objects.equals(this.config, llmObsPromptVersionDataAttributes.config) && Objects.equals(this.createdAt, llmObsPromptVersionDataAttributes.createdAt) && Objects.equals(this.datasets, llmObsPromptVersionDataAttributes.datasets) && Objects.equals(this.description, llmObsPromptVersionDataAttributes.description) @@ -544,6 +589,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( author, + config, createdAt, datasets, description, @@ -566,6 +612,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsPromptVersionDataAttributes {\n"); sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" datasets: ").append(toIndentedString(datasets)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); diff --git a/src/test/resources/com/datadog/api/client/v2/api/agent_observability.feature b/src/test/resources/com/datadog/api/client/v2/api/agent_observability.feature index 8cc3d342377..44fc57a408f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/agent_observability.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/agent_observability.feature @@ -184,7 +184,7 @@ Feature: Agent Observability Given operation "CreateLLMObsPromptVersion" enabled And new "CreateLLMObsPromptVersion" request And request contains "prompt_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"env_ids": [], "labels": ["production"], "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-template-versions"}} + And body with value {"data": {"attributes": {"config": {"model": "provider-model", "response_format": {"type": "json_object"}, "temperature": 0.2}, "env_ids": [], "labels": ["production"], "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-template-versions"}} When the request is sent Then the response status is 400 Bad Request @@ -193,7 +193,7 @@ Feature: Agent Observability Given operation "CreateLLMObsPromptVersion" enabled And new "CreateLLMObsPromptVersion" request And request contains "prompt_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"env_ids": [], "labels": ["production"], "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-template-versions"}} + And body with value {"data": {"attributes": {"config": {"model": "provider-model", "response_format": {"type": "json_object"}, "temperature": 0.2}, "env_ids": [], "labels": ["production"], "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-template-versions"}} When the request is sent Then the response status is 404 Not Found @@ -202,7 +202,7 @@ Feature: Agent Observability Given operation "CreateLLMObsPromptVersion" enabled And new "CreateLLMObsPromptVersion" request And request contains "prompt_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"env_ids": [], "labels": ["production"], "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-template-versions"}} + And body with value {"data": {"attributes": {"config": {"model": "provider-model", "response_format": {"type": "json_object"}, "temperature": 0.2}, "env_ids": [], "labels": ["production"], "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-template-versions"}} When the request is sent Then the response status is 200 OK @@ -310,7 +310,7 @@ Feature: Agent Observability Scenario: Create an Agent Observability prompt returns "Bad Request" response Given operation "CreateLLMObsPrompt" enabled And new "CreateLLMObsPrompt" request - And body with value {"data": {"attributes": {"env_ids": [], "labels": ["production"], "prompt_id": "customer-support-assistant", "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-templates"}} + And body with value {"data": {"attributes": {"config": {"model": "provider-model", "response_format": {"type": "json_object"}, "temperature": 0.2}, "env_ids": [], "labels": ["production"], "prompt_id": "customer-support-assistant", "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-templates"}} When the request is sent Then the response status is 400 Bad Request @@ -318,7 +318,7 @@ Feature: Agent Observability Scenario: Create an Agent Observability prompt returns "Conflict" response Given operation "CreateLLMObsPrompt" enabled And new "CreateLLMObsPrompt" request - And body with value {"data": {"attributes": {"env_ids": [], "labels": ["production"], "prompt_id": "customer-support-assistant", "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-templates"}} + And body with value {"data": {"attributes": {"config": {"model": "provider-model", "response_format": {"type": "json_object"}, "temperature": 0.2}, "env_ids": [], "labels": ["production"], "prompt_id": "customer-support-assistant", "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-templates"}} When the request is sent Then the response status is 409 Conflict @@ -326,7 +326,7 @@ Feature: Agent Observability Scenario: Create an Agent Observability prompt returns "OK" response Given operation "CreateLLMObsPrompt" enabled And new "CreateLLMObsPrompt" request - And body with value {"data": {"attributes": {"env_ids": [], "labels": ["production"], "prompt_id": "customer-support-assistant", "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-templates"}} + And body with value {"data": {"attributes": {"config": {"model": "provider-model", "response_format": {"type": "json_object"}, "temperature": 0.2}, "env_ids": [], "labels": ["production"], "prompt_id": "customer-support-assistant", "template": "You are a helpful assistant for {{audience}}."}, "type": "prompt-templates"}} When the request is sent Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/databricks_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/databricks_integration.feature new file mode 100644 index 00000000000..0518707d9a2 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/databricks_integration.feature @@ -0,0 +1,148 @@ +@endpoint(databricks-integration) @endpoint(databricks-integration-v2) +Feature: Databricks Integration + Manage your Datadog Databricks integration accounts and account resources + directly through the Datadog API. 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 "DatabricksIntegration" 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-observability-jobs-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, "serverless_jobs_enabled": true}}, "databricks-data-observability-quality-monitoring": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"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-observability-jobs-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, "serverless_jobs_enabled": true}}, "databricks-data-observability-quality-monitoring": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"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-observability-jobs-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, "serverless_jobs_enabled": true}}, "databricks-data-observability-quality-monitoring": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"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-observability-jobs-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, "serverless_jobs_enabled": true}}, "databricks-data-observability-quality-monitoring": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"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-observability-jobs-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, "serverless_jobs_enabled": true}}, "databricks-data-observability-quality-monitoring": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"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-observability-jobs-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, "serverless_jobs_enabled": true}}, "databricks-data-observability-quality-monitoring": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"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-observability-jobs-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, "serverless_jobs_enabled": true}}, "databricks-data-observability-quality-monitoring": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"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-observability-jobs-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, "serverless_jobs_enabled": true}}, "databricks-data-observability-quality-monitoring": {"enabled": true, "settings": {"do_crawlers_cron": "0 * * * *", "sync_system_catalog": true}}, "databricks-model-serving-metrics": {"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/rum_replay_heatmaps.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature index 86e8b851ae2..69b8076d2a5 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature @@ -8,28 +8,28 @@ Feature: Rum Replay Heatmaps And a valid "appKeyAuth" key in the system And an instance of "RumReplayHeatmaps" API - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Create replay heatmap snapshot returns "Created" response Given new "CreateReplayHeatmapSnapshot" request And body with value {"data": {"attributes": {"application_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", "device_type": "desktop", "event_id": "11111111-2222-3333-4444-555555555555", "is_device_type_selected_by_user": false, "snapshot_name": "My Snapshot", "start": 0, "view_name": "/home"}, "type": "snapshots"}} When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Delete replay heatmap snapshot returns "No Content" response Given new "DeleteReplayHeatmapSnapshot" request And request contains "snapshot_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List replay heatmap snapshots returns "OK" response Given new "ListReplayHeatmapSnapshots" request And request contains "filter[view_name]" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Update replay heatmap snapshot returns "OK" response Given new "UpdateReplayHeatmapSnapshot" request And request contains "snapshot_id" parameter from "REPLACE.ME" diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature index 2fd317e4df2..bd1a9f7ae8b 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature @@ -8,7 +8,7 @@ Feature: Rum Replay Playlists And a valid "appKeyAuth" key in the system And an instance of "RumReplayPlaylists" API - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Add RUM replay session to playlist returns "Created" response Given new "AddRumReplaySessionToPlaylist" request And request contains "ts" parameter from "REPLACE.ME" @@ -17,7 +17,7 @@ Feature: Rum Replay Playlists When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Add RUM replay session to playlist returns "OK" response Given new "AddRumReplaySessionToPlaylist" request And request contains "ts" parameter from "REPLACE.ME" @@ -26,7 +26,7 @@ Feature: Rum Replay Playlists When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Bulk remove RUM replay playlist sessions returns "No Content" response Given new "BulkRemoveRumReplayPlaylistSessions" request And request contains "playlist_id" parameter from "REPLACE.ME" @@ -34,41 +34,41 @@ Feature: Rum Replay Playlists When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Create RUM replay playlist returns "Created" response Given new "CreateRumReplayPlaylist" request And body with value {"data": {"attributes": {"created_by": {"handle": "john.doe@example.com", "id": "00000000-0000-0000-0000-000000000001", "uuid": "00000000-0000-0000-0000-000000000001"}, "name": "My Playlist"}, "type": "rum_replay_playlist"}} When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Delete RUM replay playlist returns "No Content" response Given new "DeleteRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Get RUM replay playlist returns "OK" response Given new "GetRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List RUM replay playlist sessions returns "OK" response Given new "ListRumReplayPlaylistSessions" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List RUM replay playlists returns "OK" response Given new "ListRumReplayPlaylists" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Remove RUM replay session from playlist returns "No Content" response Given new "RemoveRumReplaySessionFromPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" @@ -76,7 +76,7 @@ Feature: Rum Replay Playlists When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Update RUM replay playlist returns "OK" response Given new "UpdateRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature index e5ce759c6b2..3aab0ffe818 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature @@ -3,7 +3,7 @@ Feature: Rum Replay Sessions Retrieve segments for RUM replay sessions. Access session replay data stored in event platform or blob storage. - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Get segments returns "OK" response Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature index e339e1e5e45..22d5630a38e 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature @@ -8,7 +8,7 @@ Feature: Rum Replay Viewership And a valid "appKeyAuth" key in the system And an instance of "RumReplayViewership" API - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Create RUM replay session watch returns "Created" response Given new "CreateRumReplaySessionWatch" request And request contains "session_id" parameter from "REPLACE.ME" @@ -16,21 +16,21 @@ Feature: Rum Replay Viewership When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Delete RUM replay session watch returns "No Content" response Given new "DeleteRumReplaySessionWatch" request And request contains "session_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List RUM replay session watchers returns "OK" response Given new "ListRumReplaySessionWatchers" request And request contains "session_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List RUM replay viewership history sessions returns "OK" response Given new "ListRumReplayViewershipHistorySessions" request When the request is sent 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 316bfc290bb..cbecf69cfc2 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 @@ -3692,6 +3692,43 @@ "type": "idempotent" } }, + "ListDatabricksIntegrationAccounts": { + "tag": "Databricks Integration", + "undo": { + "type": "safe" + } + }, + "CreateDatabricksIntegrationAccount": { + "tag": "Databricks Integration", + "undo": { + "operationId": "DeleteDatabricksIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteDatabricksIntegrationAccount": { + "tag": "Databricks Integration", + "undo": { + "type": "idempotent" + } + }, + "GetDatabricksIntegrationAccount": { + "tag": "Databricks Integration", + "undo": { + "type": "safe" + } + }, + "UpdateDatabricksIntegrationAccount": { + "tag": "Databricks Integration", + "undo": { + "type": "idempotent" + } + }, "ListElasticCloudIntegrationAccounts": { "tag": "Elastic Cloud Integration", "undo": {