From 582a99cfae3a1d30d5731f5ffed80c13546b735c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 11 Nov 2026 11:44:39 +0000 Subject: [PATCH] Regenerate client from commit cea239d of spec repo --- .generator/schemas/v2/openapi.yaml | 550 +++++++++++ ...teChatGPTEnterpriseIntegrationAccount.java | 68 ++ ...teChatGPTEnterpriseIntegrationAccount.java | 27 + ...etChatGPTEnterpriseIntegrationAccount.java | 30 + ...tChatGPTEnterpriseIntegrationAccounts.java | 30 + ...teChatGPTEnterpriseIntegrationAccount.java | 69 ++ .../com/datadog/api/client/ApiClient.java | 5 + .../api/ChatGptEnterpriseIntegrationApi.java | 854 ++++++++++++++++++ ...gentConsoleIntegrationDataflowRequest.java | 101 +++ ...entConsoleIntegrationDataflowResponse.java | 169 ++++ ...oudCostDataIntegrationDataflowRequest.java | 93 ++ ...udCostDataIntegrationDataflowResponse.java | 170 ++++ ...tegrationAccountAuthenticationRequest.java | 256 ++++++ ...egrationAccountAuthenticationResponse.java | 258 ++++++ ...ntegrationAccountAuthenticationUpdate.java | 253 ++++++ ...egrationAccountBearerTokenAuthRequest.java | 138 +++ ...grationAccountBearerTokenAuthResponse.java | 162 ++++ ...IntegrationAccountBearerTokenAuthType.java | 63 ++ ...tegrationAccountBearerTokenAuthUpdate.java | 138 +++ ...iseIntegrationAccountCreateAttributes.java | 263 ++++++ ...nterpriseIntegrationAccountCreateData.java | 189 ++++ ...rpriseIntegrationAccountCreateRequest.java | 155 ++++ ...TEnterpriseIntegrationAccountResponse.java | 154 ++++ ...eIntegrationAccountResponseAttributes.java | 256 ++++++ ...erpriseIntegrationAccountResponseData.java | 212 +++++ ...riseIntegrationAccountSettingsRequest.java | 97 ++ ...iseIntegrationAccountSettingsResponse.java | 156 ++++ ...priseIntegrationAccountSettingsUpdate.java | 90 ++ ...iseIntegrationAccountUpdateAttributes.java | 255 ++++++ ...nterpriseIntegrationAccountUpdateData.java | 220 +++++ ...rpriseIntegrationAccountUpdateRequest.java | 155 ++++ ...EnterpriseIntegrationAccountsResponse.java | 169 ++++ ...EnterpriseIntegrationDataflowsRequest.java | 147 +++ ...nterpriseIntegrationDataflowsResponse.java | 198 ++++ .../chatgpt_enterprise_integration.feature | 148 +++ .../com/datadog/api/client/v2/api/undo.json | 37 + 36 files changed, 6335 insertions(+) create mode 100644 examples/v2/chatgpt-enterprise-integration/CreateChatGPTEnterpriseIntegrationAccount.java create mode 100644 examples/v2/chatgpt-enterprise-integration/DeleteChatGPTEnterpriseIntegrationAccount.java create mode 100644 examples/v2/chatgpt-enterprise-integration/GetChatGPTEnterpriseIntegrationAccount.java create mode 100644 examples/v2/chatgpt-enterprise-integration/ListChatGPTEnterpriseIntegrationAccounts.java create mode 100644 examples/v2/chatgpt-enterprise-integration/UpdateChatGPTEnterpriseIntegrationAccount.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/ChatGptEnterpriseIntegrationApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponseAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationDataflowsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationDataflowsResponse.java create mode 100644 src/test/resources/com/datadog/api/client/v2/api/chatgpt_enterprise_integration.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6325ee4e374..638bc2fc092 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -24586,6 +24586,293 @@ components: example: infra_host type: string type: object + ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest: + additionalProperties: false + description: >- + Activity, token consumption, credits, and estimated usage costs across ChatGPT Chat, ChatGPT Work, and Codex, shown in Agent Console with breakdowns by product, model, and user where OpenAI provides them. Data already available from OpenAI appears within 1 hour of enabling this dataflow. + properties: + enabled: + description: >- + Whether Datadog collects this data. Defaults to `true`; set to `false` to stop collection. + example: true + type: boolean + required: + - enabled + type: object + ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse: + description: >- + Activity, token consumption, credits, and estimated usage costs across ChatGPT Chat, ChatGPT Work, and Codex, shown in Agent Console with breakdowns by product, model, and user where OpenAI provides them. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest: + additionalProperties: false + description: >- + ChatGPT Enterprise costs from the OpenAI Costs API, so that ChatGPT Enterprise spend can be analyzed in [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). These costs are excluded from Cloud Cost Management spend-monitored billing. Reported costs are estimates, not final invoice amounts. + properties: + enabled: + description: >- + Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + type: object + ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse: + description: >- + ChatGPT Enterprise costs from the OpenAI Costs API, so that ChatGPT Enterprise spend can be analyzed in [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). These costs are excluded from Cloud Cost Management spend-monitored billing. Reported costs are estimates, not final invoice amounts. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest: + description: Authentication for creating the ChatGPT Enterprise integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest" + ChatGPTEnterpriseIntegrationAccountAuthenticationResponse: + description: Authentication configured on the ChatGPT Enterprise integration account. + oneOf: + - $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse" + ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate: + description: Authentication for updating the ChatGPT Enterprise integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate" + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest: + additionalProperties: false + description: >- + Bearer token authentication. Use an admin key created in the OpenAI Admin Console of your ChatGPT Enterprise workspace, not in the API Platform admin-key console, with the **Costs** permission set to **Read**. + properties: + auth_type: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType" + token: + description: Secret token used to authenticate with ChatGPT Enterprise. + example: your-token + type: string + writeOnly: true + required: + - auth_type + - token + type: object + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse: + description: The bearer token authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType" + required: + - auth_type + type: object + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType: + default: bearer_token + description: The authentication method type. + enum: + - bearer_token + example: bearer_token + type: string + x-enum-varnames: + - BEARER_TOKEN + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate: + additionalProperties: false + description: >- + Bearer token authentication. Use an admin key created in the OpenAI Admin Console of your ChatGPT Enterprise workspace, not in the API Platform admin-key console, with the **Costs** permission set to **Read**. Only the fields provided are changed; omit `token` to keep the stored one. + properties: + auth_type: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType" + token: + description: Secret token used to authenticate with ChatGPT Enterprise. + example: your-token + type: string + writeOnly: true + required: + - auth_type + type: object + ChatGPTEnterpriseIntegrationAccountCreateAttributes: + description: Writable attributes used to create a ChatGPT Enterprise integration account. + properties: + authentication: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountAuthenticationRequest" + dataflows: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationDataflowsRequest" + name: + description: Human-readable name of the ChatGPT Enterprise integration account. + example: chatgpt-enterprise-acme + type: string + settings: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountSettingsRequest" + required: + - name + - authentication + - settings + type: object + ChatGPTEnterpriseIntegrationAccountCreateData: + description: Data envelope for creating a ChatGPT Enterprise integration account. + properties: + attributes: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountCreateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + ChatGPTEnterpriseIntegrationAccountCreateRequest: + description: Request payload to create a ChatGPT Enterprise integration account. + properties: + data: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountCreateData" + required: + - data + type: object + ChatGPTEnterpriseIntegrationAccountResponse: + description: Response payload for a single ChatGPT Enterprise integration account. + properties: + data: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountResponseData" + required: + - data + type: object + ChatGPTEnterpriseIntegrationAccountResponseAttributes: + description: Attributes of a ChatGPT Enterprise integration account returned in responses. + properties: + authentication: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountAuthenticationResponse" + dataflows: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationDataflowsResponse" + name: + description: Human-readable name of the ChatGPT Enterprise integration account. + example: chatgpt-enterprise-acme + type: string + settings: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountSettingsResponse" + required: + - name + - settings + type: object + ChatGPTEnterpriseIntegrationAccountResponseData: + description: Data envelope of a ChatGPT Enterprise integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountResponseAttributes" + id: + description: Server-generated unique identifier of the ChatGPT Enterprise integration account. + example: 3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03 + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - attributes + - type + type: object + ChatGPTEnterpriseIntegrationAccountSettingsRequest: + additionalProperties: false + description: Settings for creating the ChatGPT Enterprise integration account. + properties: + openai_org_id: + description: >- + OpenAI API Platform organization ID (`org-...`) that the Costs API uses for your Enterprise usage. This is not the ChatGPT workspace UUID or your Datadog organization ID. A value that does not match `^org-[A-Za-z0-9]+$` is rejected with a `422` response. + example: org-AbC123dEf456 + type: string + required: + - openai_org_id + type: object + ChatGPTEnterpriseIntegrationAccountSettingsResponse: + description: Settings configured on the ChatGPT Enterprise integration account. + properties: + openai_org_id: + description: >- + OpenAI API Platform organization ID (`org-...`) that the Costs API uses for your Enterprise usage. This is not the ChatGPT workspace UUID or your Datadog organization ID. A value that does not match `^org-[A-Za-z0-9]+$` is rejected with a `422` response. + example: org-AbC123dEf456 + type: string + required: + - openai_org_id + type: object + ChatGPTEnterpriseIntegrationAccountSettingsUpdate: + additionalProperties: false + description: >- + Settings for updating the ChatGPT Enterprise integration account. Only the fields provided are changed. + properties: + openai_org_id: + description: >- + OpenAI API Platform organization ID (`org-...`) that the Costs API uses for your Enterprise usage. This is not the ChatGPT workspace UUID or your Datadog organization ID. A value that does not match `^org-[A-Za-z0-9]+$` is rejected with a `422` response. + example: org-AbC123dEf456 + type: string + type: object + ChatGPTEnterpriseIntegrationAccountUpdateAttributes: + description: >- + Writable attributes used to update a ChatGPT Enterprise 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. + properties: + authentication: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate" + dataflows: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationDataflowsRequest" + name: + description: Human-readable name of the ChatGPT Enterprise integration account. + example: chatgpt-enterprise-acme + type: string + settings: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountSettingsUpdate" + type: object + ChatGPTEnterpriseIntegrationAccountUpdateData: + description: Data envelope for updating a ChatGPT Enterprise integration account. + properties: + attributes: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountUpdateAttributes" + id: + description: Unique identifier of the ChatGPT Enterprise integration account to update. + example: 3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03 + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + ChatGPTEnterpriseIntegrationAccountUpdateRequest: + description: Request payload to update a ChatGPT Enterprise integration account. + properties: + data: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountUpdateData" + required: + - data + type: object + ChatGPTEnterpriseIntegrationAccountsResponse: + description: Response payload for a list of ChatGPT Enterprise integration accounts. + properties: + data: + description: List of ChatGPT Enterprise integration accounts. + items: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountResponseData" + type: array + required: + - data + type: object + ChatGPTEnterpriseIntegrationDataflowsRequest: + additionalProperties: false + description: >- + Data Datadog collects from ChatGPT Enterprise, keyed by dataflow id. Each dataflow turns on a distinct kind of collection: set `enabled` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted fields keep their current values. Every dataflow requires a ChatGPT Enterprise workspace with access to the OpenAI Costs API; a dataflow enabled without it is stored but collects no data. + properties: + chatgpt-enterprise-agent-console: + $ref: "#/components/schemas/ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest" + chatgpt-enterprise-cloud-cost-data: + $ref: "#/components/schemas/ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest" + type: object + ChatGPTEnterpriseIntegrationDataflowsResponse: + description: Data Datadog collects from ChatGPT Enterprise, keyed by dataflow id. + properties: + chatgpt-enterprise-agent-console: + $ref: "#/components/schemas/ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse" + chatgpt-enterprise-cloud-cost-data: + $ref: "#/components/schemas/ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse" + type: object CircleCIAPIKey: description: The definition of the `CircleCIAPIKey` object. properties: @@ -197681,6 +197968,260 @@ 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/chatgpt-enterprise/accounts: + get: + description: List ChatGPT Enterprise integration accounts. + operationId: ListChatGPTEnterpriseIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + auth_type: bearer_token + dataflows: + chatgpt-enterprise-agent-console: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + chatgpt-enterprise-cloud-cost-data: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: chatgpt-enterprise-acme + settings: + openai_org_id: org-AbC123dEf456 + id: 3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03 + type: integration-account + schema: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List ChatGPT Enterprise integration accounts + tags: + - ChatGPT Enterprise 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 ChatGPT Enterprise integration account. + operationId: CreateChatGPTEnterpriseIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + chatgpt-enterprise-agent-console: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + chatgpt-enterprise-cloud-cost-data: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: chatgpt-enterprise-acme + settings: + openai_org_id: org-AbC123dEf456 + id: 3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03 + type: integration-account + schema: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountResponse" + 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 ChatGPT Enterprise integration account + tags: + - ChatGPT Enterprise 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/chatgpt-enterprise/accounts/{account_id}: + delete: + description: Delete a ChatGPT Enterprise integration account. + operationId: DeleteChatGPTEnterpriseIntegrationAccount + 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 ChatGPT Enterprise integration account + tags: + - ChatGPT Enterprise 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 ChatGPT Enterprise integration account. + operationId: GetChatGPTEnterpriseIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + chatgpt-enterprise-agent-console: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + chatgpt-enterprise-cloud-cost-data: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: chatgpt-enterprise-acme + settings: + openai_org_id: org-AbC123dEf456 + id: 3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03 + type: integration-account + schema: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountResponse" + 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 ChatGPT Enterprise integration account + tags: + - ChatGPT Enterprise 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 ChatGPT Enterprise integration account. Only the fields provided are changed. + operationId: UpdateChatGPTEnterpriseIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + chatgpt-enterprise-agent-console: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + chatgpt-enterprise-cloud-cost-data: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: chatgpt-enterprise-acme + settings: + openai_org_id: org-AbC123dEf456 + id: 3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03 + type: integration-account + schema: + $ref: "#/components/schemas/ChatGPTEnterpriseIntegrationAccountResponse" + 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 ChatGPT Enterprise integration account + tags: + - ChatGPT Enterprise 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: get: description: List Databricks integration accounts. @@ -272732,6 +273273,15 @@ tags: - description: >- View and manage change requests within Change Management. See the [Case Management page](https://docs.datadoghq.com/service_management/case_management/) for more information. name: Change Management + - description: |- + Manage your Datadog ChatGPT Enterprise integration accounts and account resources + directly through the Datadog API. See the + [ChatGPT Enterprise integration page](https://docs.datadoghq.com/integrations/chatgpt-enterprise/) for + more information. + externalDocs: + description: ChatGPT Enterprise integration. + url: https://docs.datadoghq.com/integrations/chatgpt-enterprise/ + name: ChatGPT Enterprise Integration - description: |- Configure AWS, GitHub, and Custom OIDC cloud authentication for persona and intake authentication through the Datadog API. name: Cloud Authentication diff --git a/examples/v2/chatgpt-enterprise-integration/CreateChatGPTEnterpriseIntegrationAccount.java b/examples/v2/chatgpt-enterprise-integration/CreateChatGPTEnterpriseIntegrationAccount.java new file mode 100644 index 00000000000..ee74d1cf703 --- /dev/null +++ b/examples/v2/chatgpt-enterprise-integration/CreateChatGPTEnterpriseIntegrationAccount.java @@ -0,0 +1,68 @@ +// Create a ChatGPT Enterprise integration account returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ChatGptEnterpriseIntegrationApi; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountAuthenticationRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountCreateAttributes; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountCreateData; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountCreateRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountResponse; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountSettingsRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationDataflowsRequest; +import com.datadog.api.client.v2.model.IntegrationAccountType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createChatGPTEnterpriseIntegrationAccount", true); + ChatGptEnterpriseIntegrationApi apiInstance = + new ChatGptEnterpriseIntegrationApi(defaultClient); + + ChatGPTEnterpriseIntegrationAccountCreateRequest body = + new ChatGPTEnterpriseIntegrationAccountCreateRequest() + .data( + new ChatGPTEnterpriseIntegrationAccountCreateData() + .attributes( + new ChatGPTEnterpriseIntegrationAccountCreateAttributes() + .authentication( + new ChatGPTEnterpriseIntegrationAccountAuthenticationRequest( + new ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest() + .authType( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType + .BEARER_TOKEN) + .token("your-token"))) + .dataflows( + new ChatGPTEnterpriseIntegrationDataflowsRequest() + .chatgptEnterpriseAgentConsole( + new ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest() + .enabled(true)) + .chatgptEnterpriseCloudCostData( + new ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest() + .enabled(true))) + .name("chatgpt-enterprise-acme") + .settings( + new ChatGPTEnterpriseIntegrationAccountSettingsRequest() + .openaiOrgId("org-AbC123dEf456"))) + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + ChatGPTEnterpriseIntegrationAccountResponse result = + apiInstance.createChatGPTEnterpriseIntegrationAccount(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " ChatGptEnterpriseIntegrationApi#createChatGPTEnterpriseIntegrationAccount"); + 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/chatgpt-enterprise-integration/DeleteChatGPTEnterpriseIntegrationAccount.java b/examples/v2/chatgpt-enterprise-integration/DeleteChatGPTEnterpriseIntegrationAccount.java new file mode 100644 index 00000000000..e52af763c9b --- /dev/null +++ b/examples/v2/chatgpt-enterprise-integration/DeleteChatGPTEnterpriseIntegrationAccount.java @@ -0,0 +1,27 @@ +// Delete a ChatGPT Enterprise integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ChatGptEnterpriseIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteChatGPTEnterpriseIntegrationAccount", true); + ChatGptEnterpriseIntegrationApi apiInstance = + new ChatGptEnterpriseIntegrationApi(defaultClient); + + try { + apiInstance.deleteChatGPTEnterpriseIntegrationAccount("account_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " ChatGptEnterpriseIntegrationApi#deleteChatGPTEnterpriseIntegrationAccount"); + 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/chatgpt-enterprise-integration/GetChatGPTEnterpriseIntegrationAccount.java b/examples/v2/chatgpt-enterprise-integration/GetChatGPTEnterpriseIntegrationAccount.java new file mode 100644 index 00000000000..7d16ca9fcf3 --- /dev/null +++ b/examples/v2/chatgpt-enterprise-integration/GetChatGPTEnterpriseIntegrationAccount.java @@ -0,0 +1,30 @@ +// Get a ChatGPT Enterprise integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ChatGptEnterpriseIntegrationApi; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getChatGPTEnterpriseIntegrationAccount", true); + ChatGptEnterpriseIntegrationApi apiInstance = + new ChatGptEnterpriseIntegrationApi(defaultClient); + + try { + ChatGPTEnterpriseIntegrationAccountResponse result = + apiInstance.getChatGPTEnterpriseIntegrationAccount("account_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " ChatGptEnterpriseIntegrationApi#getChatGPTEnterpriseIntegrationAccount"); + 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/chatgpt-enterprise-integration/ListChatGPTEnterpriseIntegrationAccounts.java b/examples/v2/chatgpt-enterprise-integration/ListChatGPTEnterpriseIntegrationAccounts.java new file mode 100644 index 00000000000..9f9ea8ff5ee --- /dev/null +++ b/examples/v2/chatgpt-enterprise-integration/ListChatGPTEnterpriseIntegrationAccounts.java @@ -0,0 +1,30 @@ +// List ChatGPT Enterprise integration accounts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ChatGptEnterpriseIntegrationApi; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listChatGPTEnterpriseIntegrationAccounts", true); + ChatGptEnterpriseIntegrationApi apiInstance = + new ChatGptEnterpriseIntegrationApi(defaultClient); + + try { + ChatGPTEnterpriseIntegrationAccountsResponse result = + apiInstance.listChatGPTEnterpriseIntegrationAccounts(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " ChatGptEnterpriseIntegrationApi#listChatGPTEnterpriseIntegrationAccounts"); + 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/chatgpt-enterprise-integration/UpdateChatGPTEnterpriseIntegrationAccount.java b/examples/v2/chatgpt-enterprise-integration/UpdateChatGPTEnterpriseIntegrationAccount.java new file mode 100644 index 00000000000..21e5a4d6db4 --- /dev/null +++ b/examples/v2/chatgpt-enterprise-integration/UpdateChatGPTEnterpriseIntegrationAccount.java @@ -0,0 +1,69 @@ +// Update a ChatGPT Enterprise integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ChatGptEnterpriseIntegrationApi; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountResponse; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountSettingsUpdate; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountUpdateAttributes; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountUpdateData; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationDataflowsRequest; +import com.datadog.api.client.v2.model.IntegrationAccountType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateChatGPTEnterpriseIntegrationAccount", true); + ChatGptEnterpriseIntegrationApi apiInstance = + new ChatGptEnterpriseIntegrationApi(defaultClient); + + ChatGPTEnterpriseIntegrationAccountUpdateRequest body = + new ChatGPTEnterpriseIntegrationAccountUpdateRequest() + .data( + new ChatGPTEnterpriseIntegrationAccountUpdateData() + .attributes( + new ChatGPTEnterpriseIntegrationAccountUpdateAttributes() + .authentication( + new ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate( + new ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate() + .authType( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType + .BEARER_TOKEN) + .token("your-token"))) + .dataflows( + new ChatGPTEnterpriseIntegrationDataflowsRequest() + .chatgptEnterpriseAgentConsole( + new ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest() + .enabled(true)) + .chatgptEnterpriseCloudCostData( + new ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest() + .enabled(true))) + .name("chatgpt-enterprise-acme") + .settings( + new ChatGPTEnterpriseIntegrationAccountSettingsUpdate() + .openaiOrgId("org-AbC123dEf456"))) + .id("3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03") + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + ChatGPTEnterpriseIntegrationAccountResponse result = + apiInstance.updateChatGPTEnterpriseIntegrationAccount("account_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " ChatGptEnterpriseIntegrationApi#updateChatGPTEnterpriseIntegrationAccount"); + 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 39a8c9f10ba..d72483bb523 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1530,6 +1530,11 @@ public class ApiClient { put("v2.updateIncidentUserDefinedField", false); put("v2.updateIncidentUserDefinedRole", false); put("v2.updateTimestampOverride", false); + put("v2.createChatGPTEnterpriseIntegrationAccount", false); + put("v2.deleteChatGPTEnterpriseIntegrationAccount", false); + put("v2.getChatGPTEnterpriseIntegrationAccount", false); + put("v2.listChatGPTEnterpriseIntegrationAccounts", false); + put("v2.updateChatGPTEnterpriseIntegrationAccount", false); put("v2.createDatabricksIntegrationAccount", false); put("v2.deleteDatabricksIntegrationAccount", false); put("v2.getDatabricksIntegrationAccount", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/ChatGptEnterpriseIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/ChatGptEnterpriseIntegrationApi.java new file mode 100644 index 00000000000..81fa46a6ff0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/ChatGptEnterpriseIntegrationApi.java @@ -0,0 +1,854 @@ +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.ChatGPTEnterpriseIntegrationAccountCreateRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountResponse; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.ChatGPTEnterpriseIntegrationAccountsResponse; +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 ChatGptEnterpriseIntegrationApi { + private ApiClient apiClient; + + public ChatGptEnterpriseIntegrationApi() { + this(ApiClient.getDefaultApiClient()); + } + + public ChatGptEnterpriseIntegrationApi(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 ChatGPT Enterprise integration account. + * + *

See {@link #createChatGPTEnterpriseIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return ChatGPTEnterpriseIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public ChatGPTEnterpriseIntegrationAccountResponse createChatGPTEnterpriseIntegrationAccount( + ChatGPTEnterpriseIntegrationAccountCreateRequest body) throws ApiException { + return createChatGPTEnterpriseIntegrationAccountWithHttpInfo(body).getData(); + } + + /** + * Create a ChatGPT Enterprise integration account. + * + *

See {@link #createChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ChatGPTEnterpriseIntegrationAccountResponse> + */ + public CompletableFuture + createChatGPTEnterpriseIntegrationAccountAsync( + ChatGPTEnterpriseIntegrationAccountCreateRequest body) { + return createChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a ChatGPT Enterprise integration account. + * + * @param body (required) + * @return ApiResponse<ChatGPTEnterpriseIntegrationAccountResponse> + * @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 + createChatGPTEnterpriseIntegrationAccountWithHttpInfo( + ChatGPTEnterpriseIntegrationAccountCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createChatGPTEnterpriseIntegrationAccount"; + 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" + + " createChatGPTEnterpriseIntegrationAccount"); + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/chatgpt-enterprise/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.createChatGPTEnterpriseIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a ChatGPT Enterprise integration account. + * + *

See {@link #createChatGPTEnterpriseIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<ChatGPTEnterpriseIntegrationAccountResponse>> + */ + public CompletableFuture> + createChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync( + ChatGPTEnterpriseIntegrationAccountCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createChatGPTEnterpriseIntegrationAccount"; + 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" + + " createChatGPTEnterpriseIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/chatgpt-enterprise/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.createChatGPTEnterpriseIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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 ChatGPT Enterprise integration account. + * + *

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

See {@link #deleteChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteChatGPTEnterpriseIntegrationAccountAsync(String accountId) { + return deleteChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a ChatGPT Enterprise 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 deleteChatGPTEnterpriseIntegrationAccountWithHttpInfo(String accountId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteChatGPTEnterpriseIntegrationAccount"; + 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" + + " deleteChatGPTEnterpriseIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/chatgpt-enterprise/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.deleteChatGPTEnterpriseIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a ChatGPT Enterprise integration account. + * + *

See {@link #deleteChatGPTEnterpriseIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> + deleteChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync(String accountId) { + // Check if unstable operation is enabled + String operationId = "deleteChatGPTEnterpriseIntegrationAccount"; + 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" + + " deleteChatGPTEnterpriseIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/chatgpt-enterprise/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.deleteChatGPTEnterpriseIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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 ChatGPT Enterprise integration account. + * + *

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

See {@link #getChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ChatGPTEnterpriseIntegrationAccountResponse> + */ + public CompletableFuture + getChatGPTEnterpriseIntegrationAccountAsync(String accountId) { + return getChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a ChatGPT Enterprise integration account. + * + * @param accountId Unique identifier of the integration account. (required) + * @return ApiResponse<ChatGPTEnterpriseIntegrationAccountResponse> + * @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 + getChatGPTEnterpriseIntegrationAccountWithHttpInfo(String accountId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getChatGPTEnterpriseIntegrationAccount"; + 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" + + " getChatGPTEnterpriseIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/chatgpt-enterprise/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.getChatGPTEnterpriseIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a ChatGPT Enterprise integration account. + * + *

See {@link #getChatGPTEnterpriseIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<ChatGPTEnterpriseIntegrationAccountResponse>> + */ + public CompletableFuture> + getChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync(String accountId) { + // Check if unstable operation is enabled + String operationId = "getChatGPTEnterpriseIntegrationAccount"; + 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" + + " getChatGPTEnterpriseIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/chatgpt-enterprise/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.getChatGPTEnterpriseIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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 ChatGPT Enterprise integration accounts. + * + *

See {@link #listChatGPTEnterpriseIntegrationAccountsWithHttpInfo}. + * + * @return ChatGPTEnterpriseIntegrationAccountsResponse + * @throws ApiException if fails to make API call + */ + public ChatGPTEnterpriseIntegrationAccountsResponse listChatGPTEnterpriseIntegrationAccounts() + throws ApiException { + return listChatGPTEnterpriseIntegrationAccountsWithHttpInfo().getData(); + } + + /** + * List ChatGPT Enterprise integration accounts. + * + *

See {@link #listChatGPTEnterpriseIntegrationAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<ChatGPTEnterpriseIntegrationAccountsResponse> + */ + public CompletableFuture + listChatGPTEnterpriseIntegrationAccountsAsync() { + return listChatGPTEnterpriseIntegrationAccountsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List ChatGPT Enterprise integration accounts. + * + * @return ApiResponse<ChatGPTEnterpriseIntegrationAccountsResponse> + * @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 + listChatGPTEnterpriseIntegrationAccountsWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listChatGPTEnterpriseIntegrationAccounts"; + 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/chatgpt-enterprise/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.listChatGPTEnterpriseIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List ChatGPT Enterprise integration accounts. + * + *

See {@link #listChatGPTEnterpriseIntegrationAccountsWithHttpInfo}. + * + * @return + * CompletableFuture<ApiResponse<ChatGPTEnterpriseIntegrationAccountsResponse>> + */ + public CompletableFuture> + listChatGPTEnterpriseIntegrationAccountsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listChatGPTEnterpriseIntegrationAccounts"; + 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/chatgpt-enterprise/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.listChatGPTEnterpriseIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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 ChatGPT Enterprise integration account. + * + *

See {@link #updateChatGPTEnterpriseIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return ChatGPTEnterpriseIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public ChatGPTEnterpriseIntegrationAccountResponse updateChatGPTEnterpriseIntegrationAccount( + String accountId, ChatGPTEnterpriseIntegrationAccountUpdateRequest body) throws ApiException { + return updateChatGPTEnterpriseIntegrationAccountWithHttpInfo(accountId, body).getData(); + } + + /** + * Update a ChatGPT Enterprise integration account. + * + *

See {@link #updateChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<ChatGPTEnterpriseIntegrationAccountResponse> + */ + public CompletableFuture + updateChatGPTEnterpriseIntegrationAccountAsync( + String accountId, ChatGPTEnterpriseIntegrationAccountUpdateRequest body) { + return updateChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync(accountId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a ChatGPT Enterprise integration account. Only the fields provided are changed. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return ApiResponse<ChatGPTEnterpriseIntegrationAccountResponse> + * @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 + updateChatGPTEnterpriseIntegrationAccountWithHttpInfo( + String accountId, ChatGPTEnterpriseIntegrationAccountUpdateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateChatGPTEnterpriseIntegrationAccount"; + 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" + + " updateChatGPTEnterpriseIntegrationAccount"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateChatGPTEnterpriseIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/chatgpt-enterprise/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.updateChatGPTEnterpriseIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a ChatGPT Enterprise integration account. + * + *

See {@link #updateChatGPTEnterpriseIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<ChatGPTEnterpriseIntegrationAccountResponse>> + */ + public CompletableFuture> + updateChatGPTEnterpriseIntegrationAccountWithHttpInfoAsync( + String accountId, ChatGPTEnterpriseIntegrationAccountUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateChatGPTEnterpriseIntegrationAccount"; + 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" + + " updateChatGPTEnterpriseIntegrationAccount")); + 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" + + " updateChatGPTEnterpriseIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/chatgpt-enterprise/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ChatGptEnterpriseIntegrationApi.updateChatGPTEnterpriseIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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/ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest.java new file mode 100644 index 00000000000..d1990bfcb5d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest.java @@ -0,0 +1,101 @@ +/* + * 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; + +/** + * Activity, token consumption, credits, and estimated usage costs across ChatGPT Chat, ChatGPT + * Work, and Codex, shown in Agent Console with breakdowns by product, model, and user where OpenAI + * provides them. Data already available from OpenAI appears within 1 hour of enabling this + * dataflow. + */ +@JsonPropertyOrder({ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest() {} + + @JsonCreator + public ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled) { + this.enabled = enabled; + } + + public ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether Datadog collects this data. Defaults to true; set to false to + * stop collection. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Return true if this ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest + chatGptEnterpriseAgentConsoleIntegrationDataflowRequest = + (ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, chatGptEnterpriseAgentConsoleIntegrationDataflowRequest.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest {\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/ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse.java new file mode 100644 index 00000000000..f695ef9f56f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse.java @@ -0,0 +1,169 @@ +/* + * 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; + +/** + * Activity, token consumption, credits, and estimated usage costs across ChatGPT Chat, ChatGPT + * Work, and Codex, shown in Agent Console with breakdowns by product, model, and user where OpenAI + * provides them. + */ +@JsonPropertyOrder({ + ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse 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; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse + */ + @JsonAnySetter + public ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse putAdditionalProperty( + String 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 ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse + chatGptEnterpriseAgentConsoleIntegrationDataflowResponse = + (ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, chatGptEnterpriseAgentConsoleIntegrationDataflowResponse.enabled) + && Objects.equals( + this.status, chatGptEnterpriseAgentConsoleIntegrationDataflowResponse.status) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseAgentConsoleIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest.java new file mode 100644 index 00000000000..47015e3bfda --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest.java @@ -0,0 +1,93 @@ +/* + * 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; + +/** + * ChatGPT Enterprise costs from the OpenAI Costs API, so that ChatGPT Enterprise spend can be + * analyzed in Cloud Cost + * Management. These costs are excluded from Cloud Cost Management spend-monitored billing. + * Reported costs are estimates, not final invoice amounts. + */ +@JsonPropertyOrder({ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest 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 ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest + chatGptEnterpriseCloudCostDataIntegrationDataflowRequest = + (ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, chatGptEnterpriseCloudCostDataIntegrationDataflowRequest.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest {\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/ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse.java new file mode 100644 index 00000000000..df75cdf6d7c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse.java @@ -0,0 +1,170 @@ +/* + * 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; + +/** + * ChatGPT Enterprise costs from the OpenAI Costs API, so that ChatGPT Enterprise spend can be + * analyzed in Cloud Cost + * Management. These costs are excluded from Cloud Cost Management spend-monitored billing. + * Reported costs are estimates, not final invoice amounts. + */ +@JsonPropertyOrder({ + ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse 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; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse + */ + @JsonAnySetter + public ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse putAdditionalProperty( + String 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 ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse + chatGptEnterpriseCloudCostDataIntegrationDataflowResponse = + (ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, chatGptEnterpriseCloudCostDataIntegrationDataflowResponse.enabled) + && Objects.equals( + this.status, chatGptEnterpriseCloudCostDataIntegrationDataflowResponse.status) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseCloudCostDataIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationRequest.java new file mode 100644 index 00000000000..b2be90d4fd4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationRequest.java @@ -0,0 +1,256 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.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 = + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest + .ChatGPTEnterpriseIntegrationAccountAuthenticationRequestDeserializer.class) +@JsonSerialize( + using = + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest + .ChatGPTEnterpriseIntegrationAccountAuthenticationRequestSerializer.class) +public class ChatGPTEnterpriseIntegrationAccountAuthenticationRequest + extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ChatGPTEnterpriseIntegrationAccountAuthenticationRequest.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class ChatGPTEnterpriseIntegrationAccountAuthenticationRequestSerializer + extends StdSerializer { + public ChatGPTEnterpriseIntegrationAccountAuthenticationRequestSerializer( + Class t) { + super(t); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationRequestSerializer() { + this(null); + } + + @Override + public void serialize( + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ChatGPTEnterpriseIntegrationAccountAuthenticationRequestDeserializer + extends StdDeserializer { + public ChatGPTEnterpriseIntegrationAccountAuthenticationRequestDeserializer() { + this(ChatGPTEnterpriseIntegrationAccountAuthenticationRequest.class); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public ChatGPTEnterpriseIntegrationAccountAuthenticationRequest 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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals(Integer.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals(Long.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals(Float.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals(Double.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals(Boolean.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals( + Integer.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals( + Float.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.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 (!((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest'", + e); + } + + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest ret = + new ChatGPTEnterpriseIntegrationAccountAuthenticationRequest(); + 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 ChatGPTEnterpriseIntegrationAccountAuthenticationRequest getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), + "ChatGPTEnterpriseIntegrationAccountAuthenticationRequest cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ChatGPTEnterpriseIntegrationAccountAuthenticationRequest() { + super("oneOf", Boolean.FALSE); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationRequest( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest", + new GenericType() {}); + JSON.registerDescendants( + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return ChatGPTEnterpriseIntegrationAccountAuthenticationRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest + * + *

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( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest"); + } + + /** + * Get the actual instance, which can be the following: + * ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest + * + * @return The actual instance (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest`. If the + * actual instance is not `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest` + * @throws ClassCastException if the instance is not + * `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest` + */ + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest + getChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest() throws ClassCastException { + return (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationResponse.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationResponse.java new file mode 100644 index 00000000000..2fb41dd9f8c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationResponse.java @@ -0,0 +1,258 @@ +/* + * 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 = + ChatGPTEnterpriseIntegrationAccountAuthenticationResponse + .ChatGPTEnterpriseIntegrationAccountAuthenticationResponseDeserializer.class) +@JsonSerialize( + using = + ChatGPTEnterpriseIntegrationAccountAuthenticationResponse + .ChatGPTEnterpriseIntegrationAccountAuthenticationResponseSerializer.class) +public class ChatGPTEnterpriseIntegrationAccountAuthenticationResponse + extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ChatGPTEnterpriseIntegrationAccountAuthenticationResponse.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class ChatGPTEnterpriseIntegrationAccountAuthenticationResponseSerializer + extends StdSerializer { + public ChatGPTEnterpriseIntegrationAccountAuthenticationResponseSerializer( + Class t) { + super(t); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationResponseSerializer() { + this(null); + } + + @Override + public void serialize( + ChatGPTEnterpriseIntegrationAccountAuthenticationResponse value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ChatGPTEnterpriseIntegrationAccountAuthenticationResponseDeserializer + extends StdDeserializer { + public ChatGPTEnterpriseIntegrationAccountAuthenticationResponseDeserializer() { + this(ChatGPTEnterpriseIntegrationAccountAuthenticationResponse.class); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationResponseDeserializer(Class vc) { + super(vc); + } + + @Override + public ChatGPTEnterpriseIntegrationAccountAuthenticationResponse 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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals(Integer.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals(Long.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals(Float.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals(Double.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals( + Boolean.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals( + Integer.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals( + Float.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.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 (!((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse'", + e); + } + + ChatGPTEnterpriseIntegrationAccountAuthenticationResponse ret = + new ChatGPTEnterpriseIntegrationAccountAuthenticationResponse(); + 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 ChatGPTEnterpriseIntegrationAccountAuthenticationResponse getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), + "ChatGPTEnterpriseIntegrationAccountAuthenticationResponse cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ChatGPTEnterpriseIntegrationAccountAuthenticationResponse() { + super("oneOf", Boolean.FALSE); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationResponse( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse", + new GenericType() {}); + JSON.registerDescendants( + ChatGPTEnterpriseIntegrationAccountAuthenticationResponse.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return ChatGPTEnterpriseIntegrationAccountAuthenticationResponse.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse + * + *

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( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.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" + + " ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse"); + } + + /** + * Get the actual instance, which can be the following: + * ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse + * + * @return The actual instance (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse`. If the + * actual instance is not `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse` + * @throws ClassCastException if the instance is not + * `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse` + */ + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse + getChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse() throws ClassCastException { + return (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate.java new file mode 100644 index 00000000000..2d90f522a28 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate.java @@ -0,0 +1,253 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.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 = + ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate + .ChatGPTEnterpriseIntegrationAccountAuthenticationUpdateDeserializer.class) +@JsonSerialize( + using = + ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate + .ChatGPTEnterpriseIntegrationAccountAuthenticationUpdateSerializer.class) +public class ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class ChatGPTEnterpriseIntegrationAccountAuthenticationUpdateSerializer + extends StdSerializer { + public ChatGPTEnterpriseIntegrationAccountAuthenticationUpdateSerializer( + Class t) { + super(t); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationUpdateSerializer() { + this(null); + } + + @Override + public void serialize( + ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ChatGPTEnterpriseIntegrationAccountAuthenticationUpdateDeserializer + extends StdDeserializer { + public ChatGPTEnterpriseIntegrationAccountAuthenticationUpdateDeserializer() { + this(ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate.class); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationUpdateDeserializer(Class vc) { + super(vc); + } + + @Override + public ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate 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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals(Integer.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals(Long.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals(Float.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals(Double.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals(Boolean.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals( + Integer.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals(Float.class) + || ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.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 (!((ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate'", + e); + } + + ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate ret = + new ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate(); + 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 ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), + "ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate() { + super("oneOf", Boolean.FALSE); + } + + public ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate", + new GenericType() {}); + JSON.registerDescendants( + ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate + * + *

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( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate"); + } + + /** + * Get the actual instance, which can be the following: + * ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate + * + * @return The actual instance (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate`. If the + * actual instance is not `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate` + * @throws ClassCastException if the instance is not + * `ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate` + */ + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate + getChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate() throws ClassCastException { + return (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.java new file mode 100644 index 00000000000..e3ec2166655 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.java @@ -0,0 +1,138 @@ +/* + * 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. Use an admin key created in the OpenAI Admin Console of your ChatGPT + * Enterprise workspace, not in the API Platform admin-key console, with the Costs + * permission set to Read. + */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.JSON_PROPERTY_AUTH_TYPE, + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType authType = + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_TOKEN) String token) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.token = token; + } + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest authType( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType 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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest token(String token) { + this.token = token; + return this; + } + + /** + * Secret token used to authenticate with ChatGPT Enterprise. + * + * @return token + */ + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token; + } + + /** + * Return true if this ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest + chatGptEnterpriseIntegrationAccountBearerTokenAuthRequest = + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest) o; + return Objects.equals( + this.authType, chatGptEnterpriseIntegrationAccountBearerTokenAuthRequest.authType) + && Objects.equals( + this.token, chatGptEnterpriseIntegrationAccountBearerTokenAuthRequest.token); + } + + @Override + public int hashCode() { + return Objects.hash(authType, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountBearerTokenAuthRequest {\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/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.java new file mode 100644 index 00000000000..47ff144bfda --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.java @@ -0,0 +1,162 @@ +/* + * 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({ + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse.JSON_PROPERTY_AUTH_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType authType = + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse authType( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType 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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType 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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse + chatGptEnterpriseIntegrationAccountBearerTokenAuthResponse = + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse) o; + return Objects.equals( + this.authType, chatGptEnterpriseIntegrationAccountBearerTokenAuthResponse.authType) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountBearerTokenAuthResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountBearerTokenAuthResponse {\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/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType.java new file mode 100644 index 00000000000..878fcca138f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType.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 = + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType + .ChatGPTEnterpriseIntegrationAccountBearerTokenAuthTypeSerializer.class) +public class ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("bearer_token")); + + public static final ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType BEARER_TOKEN = + new ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType("bearer_token"); + + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType(String value) { + super(value, allowedValues); + } + + public static class ChatGPTEnterpriseIntegrationAccountBearerTokenAuthTypeSerializer + extends StdSerializer { + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthTypeSerializer( + Class t) { + super(t); + } + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType fromValue(String value) { + return new ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.java new file mode 100644 index 00000000000..a75ac6c542a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.java @@ -0,0 +1,138 @@ +/* + * 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. Use an admin key created in the OpenAI Admin Console of your ChatGPT + * Enterprise workspace, not in the API Platform admin-key console, with the Costs + * permission set to Read. Only the fields provided are changed; omit token + * to keep the stored one. + */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.JSON_PROPERTY_AUTH_TYPE, + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType authType = + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate authType( + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType 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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(ChatGPTEnterpriseIntegrationAccountBearerTokenAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate token(String token) { + this.token = token; + return this; + } + + /** + * Secret token used to authenticate with ChatGPT Enterprise. + * + * @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 ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate + chatGptEnterpriseIntegrationAccountBearerTokenAuthUpdate = + (ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate) o; + return Objects.equals( + this.authType, chatGptEnterpriseIntegrationAccountBearerTokenAuthUpdate.authType) + && Objects.equals( + this.token, chatGptEnterpriseIntegrationAccountBearerTokenAuthUpdate.token); + } + + @Override + public int hashCode() { + return Objects.hash(authType, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountBearerTokenAuthUpdate {\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/ChatGPTEnterpriseIntegrationAccountCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateAttributes.java new file mode 100644 index 00000000000..f339fb8a929 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateAttributes.java @@ -0,0 +1,263 @@ +/* + * 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 ChatGPT Enterprise integration account. */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountCreateAttributes.JSON_PROPERTY_AUTHENTICATION, + ChatGPTEnterpriseIntegrationAccountCreateAttributes.JSON_PROPERTY_DATAFLOWS, + ChatGPTEnterpriseIntegrationAccountCreateAttributes.JSON_PROPERTY_NAME, + ChatGPTEnterpriseIntegrationAccountCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private ChatGPTEnterpriseIntegrationAccountAuthenticationRequest authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private ChatGPTEnterpriseIntegrationDataflowsRequest dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private ChatGPTEnterpriseIntegrationAccountSettingsRequest settings; + + public ChatGPTEnterpriseIntegrationAccountCreateAttributes() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTHENTICATION) + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest authentication, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) + ChatGPTEnterpriseIntegrationAccountSettingsRequest settings) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + this.name = name; + this.settings = settings; + this.unparsed |= settings.unparsed; + } + + public ChatGPTEnterpriseIntegrationAccountCreateAttributes authentication( + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for creating the ChatGPT Enterprise integration account. Exactly one method is + * set. + * + * @return authentication + */ + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountAuthenticationRequest getAuthentication() { + return authentication; + } + + public void setAuthentication( + ChatGPTEnterpriseIntegrationAccountAuthenticationRequest authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountCreateAttributes dataflows( + ChatGPTEnterpriseIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from ChatGPT Enterprise, keyed by dataflow id. Each dataflow turns on a + * distinct kind of collection: set enabled to start or stop it. Defaults listed on + * each dataflow apply when the account is created; on update, omitted fields keep their current + * values. Every dataflow requires a ChatGPT Enterprise workspace with access to the OpenAI Costs + * API; 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 ChatGPTEnterpriseIntegrationDataflowsRequest getDataflows() { + return dataflows; + } + + public void setDataflows(ChatGPTEnterpriseIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the ChatGPT Enterprise 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 ChatGPTEnterpriseIntegrationAccountCreateAttributes settings( + ChatGPTEnterpriseIntegrationAccountSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for creating the ChatGPT Enterprise integration account. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountSettingsRequest getSettings() { + return settings; + } + + public void setSettings(ChatGPTEnterpriseIntegrationAccountSettingsRequest 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 ChatGPTEnterpriseIntegrationAccountCreateAttributes + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountCreateAttributes putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountCreateAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountCreateAttributes + chatGptEnterpriseIntegrationAccountCreateAttributes = + (ChatGPTEnterpriseIntegrationAccountCreateAttributes) o; + return Objects.equals( + this.authentication, chatGptEnterpriseIntegrationAccountCreateAttributes.authentication) + && Objects.equals( + this.dataflows, chatGptEnterpriseIntegrationAccountCreateAttributes.dataflows) + && Objects.equals(this.name, chatGptEnterpriseIntegrationAccountCreateAttributes.name) + && Objects.equals( + this.settings, chatGptEnterpriseIntegrationAccountCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountCreateAttributes {\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/ChatGPTEnterpriseIntegrationAccountCreateData.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateData.java new file mode 100644 index 00000000000..2a1922b5c11 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateData.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.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 ChatGPT Enterprise integration account. */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountCreateData.JSON_PROPERTY_ATTRIBUTES, + ChatGPTEnterpriseIntegrationAccountCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ChatGPTEnterpriseIntegrationAccountCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public ChatGPTEnterpriseIntegrationAccountCreateData() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ChatGPTEnterpriseIntegrationAccountCreateAttributes 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 ChatGPTEnterpriseIntegrationAccountCreateData attributes( + ChatGPTEnterpriseIntegrationAccountCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Writable attributes used to create a ChatGPT Enterprise integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ChatGPTEnterpriseIntegrationAccountCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountCreateData 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 ChatGPTEnterpriseIntegrationAccountCreateData + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountCreateData putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountCreateData chatGptEnterpriseIntegrationAccountCreateData = + (ChatGPTEnterpriseIntegrationAccountCreateData) o; + return Objects.equals(this.attributes, chatGptEnterpriseIntegrationAccountCreateData.attributes) + && Objects.equals(this.type, chatGptEnterpriseIntegrationAccountCreateData.type) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountCreateData {\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/ChatGPTEnterpriseIntegrationAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateRequest.java new file mode 100644 index 00000000000..1b74888db92 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountCreateRequest.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.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 ChatGPT Enterprise integration account. */ +@JsonPropertyOrder({ChatGPTEnterpriseIntegrationAccountCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ChatGPTEnterpriseIntegrationAccountCreateData data; + + public ChatGPTEnterpriseIntegrationAccountCreateRequest() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ChatGPTEnterpriseIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ChatGPTEnterpriseIntegrationAccountCreateRequest data( + ChatGPTEnterpriseIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for creating a ChatGPT Enterprise integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountCreateData getData() { + return data; + } + + public void setData(ChatGPTEnterpriseIntegrationAccountCreateData 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 ChatGPTEnterpriseIntegrationAccountCreateRequest + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountCreateRequest putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountCreateRequest + chatGptEnterpriseIntegrationAccountCreateRequest = + (ChatGPTEnterpriseIntegrationAccountCreateRequest) o; + return Objects.equals(this.data, chatGptEnterpriseIntegrationAccountCreateRequest.data) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountCreateRequest {\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/ChatGPTEnterpriseIntegrationAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponse.java new file mode 100644 index 00000000000..b35efb49222 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponse.java @@ -0,0 +1,154 @@ +/* + * 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 ChatGPT Enterprise integration account. */ +@JsonPropertyOrder({ChatGPTEnterpriseIntegrationAccountResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ChatGPTEnterpriseIntegrationAccountResponseData data; + + public ChatGPTEnterpriseIntegrationAccountResponse() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ChatGPTEnterpriseIntegrationAccountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ChatGPTEnterpriseIntegrationAccountResponse data( + ChatGPTEnterpriseIntegrationAccountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope of a ChatGPT Enterprise integration account, including server-assigned identity. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountResponseData getData() { + return data; + } + + public void setData(ChatGPTEnterpriseIntegrationAccountResponseData 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 ChatGPTEnterpriseIntegrationAccountResponse + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountResponse putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountResponse chatGptEnterpriseIntegrationAccountResponse = + (ChatGPTEnterpriseIntegrationAccountResponse) o; + return Objects.equals(this.data, chatGptEnterpriseIntegrationAccountResponse.data) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountResponse {\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/ChatGPTEnterpriseIntegrationAccountResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponseAttributes.java new file mode 100644 index 00000000000..80cd5a69738 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponseAttributes.java @@ -0,0 +1,256 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a ChatGPT Enterprise integration account returned in responses. */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountResponseAttributes.JSON_PROPERTY_AUTHENTICATION, + ChatGPTEnterpriseIntegrationAccountResponseAttributes.JSON_PROPERTY_DATAFLOWS, + ChatGPTEnterpriseIntegrationAccountResponseAttributes.JSON_PROPERTY_NAME, + ChatGPTEnterpriseIntegrationAccountResponseAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private ChatGPTEnterpriseIntegrationAccountAuthenticationResponse authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private ChatGPTEnterpriseIntegrationDataflowsResponse dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private ChatGPTEnterpriseIntegrationAccountSettingsResponse settings; + + public ChatGPTEnterpriseIntegrationAccountResponseAttributes() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) + ChatGPTEnterpriseIntegrationAccountSettingsResponse settings) { + this.name = name; + this.settings = settings; + this.unparsed |= settings.unparsed; + } + + public ChatGPTEnterpriseIntegrationAccountResponseAttributes authentication( + ChatGPTEnterpriseIntegrationAccountAuthenticationResponse authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication configured on the ChatGPT Enterprise integration account. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChatGPTEnterpriseIntegrationAccountAuthenticationResponse getAuthentication() { + return authentication; + } + + public void setAuthentication( + ChatGPTEnterpriseIntegrationAccountAuthenticationResponse authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountResponseAttributes dataflows( + ChatGPTEnterpriseIntegrationDataflowsResponse dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from ChatGPT Enterprise, keyed by dataflow id. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChatGPTEnterpriseIntegrationDataflowsResponse getDataflows() { + return dataflows; + } + + public void setDataflows(ChatGPTEnterpriseIntegrationDataflowsResponse dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountResponseAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the ChatGPT Enterprise 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 ChatGPTEnterpriseIntegrationAccountResponseAttributes settings( + ChatGPTEnterpriseIntegrationAccountSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings configured on the ChatGPT Enterprise integration account. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountSettingsResponse getSettings() { + return settings; + } + + public void setSettings(ChatGPTEnterpriseIntegrationAccountSettingsResponse 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 ChatGPTEnterpriseIntegrationAccountResponseAttributes + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountResponseAttributes putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountResponseAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountResponseAttributes + chatGptEnterpriseIntegrationAccountResponseAttributes = + (ChatGPTEnterpriseIntegrationAccountResponseAttributes) o; + return Objects.equals( + this.authentication, + chatGptEnterpriseIntegrationAccountResponseAttributes.authentication) + && Objects.equals( + this.dataflows, chatGptEnterpriseIntegrationAccountResponseAttributes.dataflows) + && Objects.equals(this.name, chatGptEnterpriseIntegrationAccountResponseAttributes.name) + && Objects.equals( + this.settings, chatGptEnterpriseIntegrationAccountResponseAttributes.settings) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountResponseAttributes {\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/ChatGPTEnterpriseIntegrationAccountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponseData.java new file mode 100644 index 00000000000..b65621b5301 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountResponseData.java @@ -0,0 +1,212 @@ +/* + * 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 ChatGPT Enterprise integration account, including server-assigned identity. + */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountResponseData.JSON_PROPERTY_ATTRIBUTES, + ChatGPTEnterpriseIntegrationAccountResponseData.JSON_PROPERTY_ID, + ChatGPTEnterpriseIntegrationAccountResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ChatGPTEnterpriseIntegrationAccountResponseAttributes 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 ChatGPTEnterpriseIntegrationAccountResponseData() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ChatGPTEnterpriseIntegrationAccountResponseAttributes 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 ChatGPTEnterpriseIntegrationAccountResponseData attributes( + ChatGPTEnterpriseIntegrationAccountResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a ChatGPT Enterprise integration account returned in responses. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ChatGPTEnterpriseIntegrationAccountResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + /** + * Server-generated unique identifier of the ChatGPT Enterprise integration account. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public ChatGPTEnterpriseIntegrationAccountResponseData 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 ChatGPTEnterpriseIntegrationAccountResponseData + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountResponseData putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountResponseData + chatGptEnterpriseIntegrationAccountResponseData = + (ChatGPTEnterpriseIntegrationAccountResponseData) o; + return Objects.equals( + this.attributes, chatGptEnterpriseIntegrationAccountResponseData.attributes) + && Objects.equals(this.id, chatGptEnterpriseIntegrationAccountResponseData.id) + && Objects.equals(this.type, chatGptEnterpriseIntegrationAccountResponseData.type) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountResponseData {\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/ChatGPTEnterpriseIntegrationAccountSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsRequest.java new file mode 100644 index 00000000000..601ada341e7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsRequest.java @@ -0,0 +1,97 @@ +/* + * 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 ChatGPT Enterprise integration account. */ +@JsonPropertyOrder({ChatGPTEnterpriseIntegrationAccountSettingsRequest.JSON_PROPERTY_OPENAI_ORG_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountSettingsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OPENAI_ORG_ID = "openai_org_id"; + private String openaiOrgId; + + public ChatGPTEnterpriseIntegrationAccountSettingsRequest() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountSettingsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_OPENAI_ORG_ID) String openaiOrgId) { + this.openaiOrgId = openaiOrgId; + } + + public ChatGPTEnterpriseIntegrationAccountSettingsRequest openaiOrgId(String openaiOrgId) { + this.openaiOrgId = openaiOrgId; + return this; + } + + /** + * OpenAI API Platform organization ID (org-...) that the Costs API uses for your + * Enterprise usage. This is not the ChatGPT workspace UUID or your Datadog organization ID. A + * value that does not match ^org-[A-Za-z0-9]+$ is rejected with a 422 + * response. + * + * @return openaiOrgId + */ + @JsonProperty(JSON_PROPERTY_OPENAI_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOpenaiOrgId() { + return openaiOrgId; + } + + public void setOpenaiOrgId(String openaiOrgId) { + this.openaiOrgId = openaiOrgId; + } + + /** + * Return true if this ChatGPTEnterpriseIntegrationAccountSettingsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountSettingsRequest + chatGptEnterpriseIntegrationAccountSettingsRequest = + (ChatGPTEnterpriseIntegrationAccountSettingsRequest) o; + return Objects.equals( + this.openaiOrgId, chatGptEnterpriseIntegrationAccountSettingsRequest.openaiOrgId); + } + + @Override + public int hashCode() { + return Objects.hash(openaiOrgId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountSettingsRequest {\n"); + sb.append(" openaiOrgId: ").append(toIndentedString(openaiOrgId)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/ChatGPTEnterpriseIntegrationAccountSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsResponse.java new file mode 100644 index 00000000000..ffc62622dc4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsResponse.java @@ -0,0 +1,156 @@ +/* + * 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 ChatGPT Enterprise integration account. */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountSettingsResponse.JSON_PROPERTY_OPENAI_ORG_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountSettingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OPENAI_ORG_ID = "openai_org_id"; + private String openaiOrgId; + + public ChatGPTEnterpriseIntegrationAccountSettingsResponse() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountSettingsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_OPENAI_ORG_ID) String openaiOrgId) { + this.openaiOrgId = openaiOrgId; + } + + public ChatGPTEnterpriseIntegrationAccountSettingsResponse openaiOrgId(String openaiOrgId) { + this.openaiOrgId = openaiOrgId; + return this; + } + + /** + * OpenAI API Platform organization ID (org-...) that the Costs API uses for your + * Enterprise usage. This is not the ChatGPT workspace UUID or your Datadog organization ID. A + * value that does not match ^org-[A-Za-z0-9]+$ is rejected with a 422 + * response. + * + * @return openaiOrgId + */ + @JsonProperty(JSON_PROPERTY_OPENAI_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOpenaiOrgId() { + return openaiOrgId; + } + + public void setOpenaiOrgId(String openaiOrgId) { + this.openaiOrgId = openaiOrgId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set 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 ChatGPTEnterpriseIntegrationAccountSettingsResponse + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountSettingsResponse putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountSettingsResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountSettingsResponse + chatGptEnterpriseIntegrationAccountSettingsResponse = + (ChatGPTEnterpriseIntegrationAccountSettingsResponse) o; + return Objects.equals( + this.openaiOrgId, chatGptEnterpriseIntegrationAccountSettingsResponse.openaiOrgId) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountSettingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(openaiOrgId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountSettingsResponse {\n"); + sb.append(" openaiOrgId: ").append(toIndentedString(openaiOrgId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/ChatGPTEnterpriseIntegrationAccountSettingsUpdate.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsUpdate.java new file mode 100644 index 00000000000..defe00ffe65 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountSettingsUpdate.java @@ -0,0 +1,90 @@ +/* + * 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 ChatGPT Enterprise integration account. Only the fields provided are + * changed. + */ +@JsonPropertyOrder({ChatGPTEnterpriseIntegrationAccountSettingsUpdate.JSON_PROPERTY_OPENAI_ORG_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountSettingsUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OPENAI_ORG_ID = "openai_org_id"; + private String openaiOrgId; + + public ChatGPTEnterpriseIntegrationAccountSettingsUpdate openaiOrgId(String openaiOrgId) { + this.openaiOrgId = openaiOrgId; + return this; + } + + /** + * OpenAI API Platform organization ID (org-...) that the Costs API uses for your + * Enterprise usage. This is not the ChatGPT workspace UUID or your Datadog organization ID. A + * value that does not match ^org-[A-Za-z0-9]+$ is rejected with a 422 + * response. + * + * @return openaiOrgId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_ORG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOpenaiOrgId() { + return openaiOrgId; + } + + public void setOpenaiOrgId(String openaiOrgId) { + this.openaiOrgId = openaiOrgId; + } + + /** Return true if this ChatGPTEnterpriseIntegrationAccountSettingsUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountSettingsUpdate + chatGptEnterpriseIntegrationAccountSettingsUpdate = + (ChatGPTEnterpriseIntegrationAccountSettingsUpdate) o; + return Objects.equals( + this.openaiOrgId, chatGptEnterpriseIntegrationAccountSettingsUpdate.openaiOrgId); + } + + @Override + public int hashCode() { + return Objects.hash(openaiOrgId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountSettingsUpdate {\n"); + sb.append(" openaiOrgId: ").append(toIndentedString(openaiOrgId)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/ChatGPTEnterpriseIntegrationAccountUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateAttributes.java new file mode 100644 index 00000000000..21404809ea8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateAttributes.java @@ -0,0 +1,255 @@ +/* + * 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 ChatGPT Enterprise 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. + */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountUpdateAttributes.JSON_PROPERTY_AUTHENTICATION, + ChatGPTEnterpriseIntegrationAccountUpdateAttributes.JSON_PROPERTY_DATAFLOWS, + ChatGPTEnterpriseIntegrationAccountUpdateAttributes.JSON_PROPERTY_NAME, + ChatGPTEnterpriseIntegrationAccountUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private ChatGPTEnterpriseIntegrationDataflowsRequest dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private ChatGPTEnterpriseIntegrationAccountSettingsUpdate settings; + + public ChatGPTEnterpriseIntegrationAccountUpdateAttributes authentication( + ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for updating the ChatGPT Enterprise integration account. Exactly one method is + * set. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate getAuthentication() { + return authentication; + } + + public void setAuthentication( + ChatGPTEnterpriseIntegrationAccountAuthenticationUpdate authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountUpdateAttributes dataflows( + ChatGPTEnterpriseIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from ChatGPT Enterprise, keyed by dataflow id. Each dataflow turns on a + * distinct kind of collection: set enabled to start or stop it. Defaults listed on + * each dataflow apply when the account is created; on update, omitted fields keep their current + * values. Every dataflow requires a ChatGPT Enterprise workspace with access to the OpenAI Costs + * API; 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 ChatGPTEnterpriseIntegrationDataflowsRequest getDataflows() { + return dataflows; + } + + public void setDataflows(ChatGPTEnterpriseIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the ChatGPT Enterprise 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 ChatGPTEnterpriseIntegrationAccountUpdateAttributes settings( + ChatGPTEnterpriseIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for updating the ChatGPT Enterprise integration account. Only the fields provided are + * changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChatGPTEnterpriseIntegrationAccountSettingsUpdate getSettings() { + return settings; + } + + public void setSettings(ChatGPTEnterpriseIntegrationAccountSettingsUpdate 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 ChatGPTEnterpriseIntegrationAccountUpdateAttributes + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountUpdateAttributes putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountUpdateAttributes object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountUpdateAttributes + chatGptEnterpriseIntegrationAccountUpdateAttributes = + (ChatGPTEnterpriseIntegrationAccountUpdateAttributes) o; + return Objects.equals( + this.authentication, chatGptEnterpriseIntegrationAccountUpdateAttributes.authentication) + && Objects.equals( + this.dataflows, chatGptEnterpriseIntegrationAccountUpdateAttributes.dataflows) + && Objects.equals(this.name, chatGptEnterpriseIntegrationAccountUpdateAttributes.name) + && Objects.equals( + this.settings, chatGptEnterpriseIntegrationAccountUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountUpdateAttributes {\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/ChatGPTEnterpriseIntegrationAccountUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateData.java new file mode 100644 index 00000000000..bed2b4cbfe0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateData.java @@ -0,0 +1,220 @@ +/* + * 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 ChatGPT Enterprise integration account. */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationAccountUpdateData.JSON_PROPERTY_ATTRIBUTES, + ChatGPTEnterpriseIntegrationAccountUpdateData.JSON_PROPERTY_ID, + ChatGPTEnterpriseIntegrationAccountUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ChatGPTEnterpriseIntegrationAccountUpdateAttributes 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 ChatGPTEnterpriseIntegrationAccountUpdateData() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ChatGPTEnterpriseIntegrationAccountUpdateAttributes 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 ChatGPTEnterpriseIntegrationAccountUpdateData attributes( + ChatGPTEnterpriseIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Writable attributes used to update a ChatGPT Enterprise 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. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ChatGPTEnterpriseIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the ChatGPT Enterprise 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 ChatGPTEnterpriseIntegrationAccountUpdateData 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 ChatGPTEnterpriseIntegrationAccountUpdateData + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountUpdateData putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountUpdateData chatGptEnterpriseIntegrationAccountUpdateData = + (ChatGPTEnterpriseIntegrationAccountUpdateData) o; + return Objects.equals(this.attributes, chatGptEnterpriseIntegrationAccountUpdateData.attributes) + && Objects.equals(this.id, chatGptEnterpriseIntegrationAccountUpdateData.id) + && Objects.equals(this.type, chatGptEnterpriseIntegrationAccountUpdateData.type) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountUpdateData {\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/ChatGPTEnterpriseIntegrationAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateRequest.java new file mode 100644 index 00000000000..9163fb5bfa6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountUpdateRequest.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.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 ChatGPT Enterprise integration account. */ +@JsonPropertyOrder({ChatGPTEnterpriseIntegrationAccountUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ChatGPTEnterpriseIntegrationAccountUpdateData data; + + public ChatGPTEnterpriseIntegrationAccountUpdateRequest() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ChatGPTEnterpriseIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ChatGPTEnterpriseIntegrationAccountUpdateRequest data( + ChatGPTEnterpriseIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for updating a ChatGPT Enterprise integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChatGPTEnterpriseIntegrationAccountUpdateData getData() { + return data; + } + + public void setData(ChatGPTEnterpriseIntegrationAccountUpdateData 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 ChatGPTEnterpriseIntegrationAccountUpdateRequest + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountUpdateRequest putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountUpdateRequest + chatGptEnterpriseIntegrationAccountUpdateRequest = + (ChatGPTEnterpriseIntegrationAccountUpdateRequest) o; + return Objects.equals(this.data, chatGptEnterpriseIntegrationAccountUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountUpdateRequest {\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/ChatGPTEnterpriseIntegrationAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountsResponse.java new file mode 100644 index 00000000000..d6b917fdfa3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationAccountsResponse.java @@ -0,0 +1,169 @@ +/* + * 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 ChatGPT Enterprise integration accounts. */ +@JsonPropertyOrder({ChatGPTEnterpriseIntegrationAccountsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationAccountsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public ChatGPTEnterpriseIntegrationAccountsResponse() {} + + @JsonCreator + public ChatGPTEnterpriseIntegrationAccountsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (ChatGPTEnterpriseIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationAccountsResponse data( + List data) { + this.data = data; + for (ChatGPTEnterpriseIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ChatGPTEnterpriseIntegrationAccountsResponse addDataItem( + ChatGPTEnterpriseIntegrationAccountResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of ChatGPT Enterprise 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 (ChatGPTEnterpriseIntegrationAccountResponseData 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 ChatGPTEnterpriseIntegrationAccountsResponse + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationAccountsResponse putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationAccountsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationAccountsResponse chatGptEnterpriseIntegrationAccountsResponse = + (ChatGPTEnterpriseIntegrationAccountsResponse) o; + return Objects.equals(this.data, chatGptEnterpriseIntegrationAccountsResponse.data) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationAccountsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationAccountsResponse {\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/ChatGPTEnterpriseIntegrationDataflowsRequest.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationDataflowsRequest.java new file mode 100644 index 00000000000..ef405ea6e49 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationDataflowsRequest.java @@ -0,0 +1,147 @@ +/* + * 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 ChatGPT Enterprise, keyed by dataflow id. Each dataflow turns on a + * distinct kind of collection: set enabled to start or stop it. Defaults listed on + * each dataflow apply when the account is created; on update, omitted fields keep their current + * values. Every dataflow requires a ChatGPT Enterprise workspace with access to the OpenAI Costs + * API; a dataflow enabled without it is stored but collects no data. + */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationDataflowsRequest.JSON_PROPERTY_CHATGPT_ENTERPRISE_AGENT_CONSOLE, + ChatGPTEnterpriseIntegrationDataflowsRequest.JSON_PROPERTY_CHATGPT_ENTERPRISE_CLOUD_COST_DATA +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationDataflowsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CHATGPT_ENTERPRISE_AGENT_CONSOLE = + "chatgpt-enterprise-agent-console"; + private ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest chatgptEnterpriseAgentConsole; + + public static final String JSON_PROPERTY_CHATGPT_ENTERPRISE_CLOUD_COST_DATA = + "chatgpt-enterprise-cloud-cost-data"; + private ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest chatgptEnterpriseCloudCostData; + + public ChatGPTEnterpriseIntegrationDataflowsRequest chatgptEnterpriseAgentConsole( + ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest chatgptEnterpriseAgentConsole) { + this.chatgptEnterpriseAgentConsole = chatgptEnterpriseAgentConsole; + this.unparsed |= chatgptEnterpriseAgentConsole.unparsed; + return this; + } + + /** + * Activity, token consumption, credits, and estimated usage costs across ChatGPT Chat, ChatGPT + * Work, and Codex, shown in Agent Console with breakdowns by product, model, and user where + * OpenAI provides them. Data already available from OpenAI appears within 1 hour of enabling this + * dataflow. + * + * @return chatgptEnterpriseAgentConsole + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHATGPT_ENTERPRISE_AGENT_CONSOLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest + getChatgptEnterpriseAgentConsole() { + return chatgptEnterpriseAgentConsole; + } + + public void setChatgptEnterpriseAgentConsole( + ChatGPTEnterpriseAgentConsoleIntegrationDataflowRequest chatgptEnterpriseAgentConsole) { + this.chatgptEnterpriseAgentConsole = chatgptEnterpriseAgentConsole; + if (chatgptEnterpriseAgentConsole != null) { + this.unparsed |= chatgptEnterpriseAgentConsole.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationDataflowsRequest chatgptEnterpriseCloudCostData( + ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest chatgptEnterpriseCloudCostData) { + this.chatgptEnterpriseCloudCostData = chatgptEnterpriseCloudCostData; + this.unparsed |= chatgptEnterpriseCloudCostData.unparsed; + return this; + } + + /** + * ChatGPT Enterprise costs from the OpenAI Costs API, so that ChatGPT Enterprise spend can be + * analyzed in Cloud Cost + * Management. These costs are excluded from Cloud Cost Management spend-monitored billing. + * Reported costs are estimates, not final invoice amounts. + * + * @return chatgptEnterpriseCloudCostData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHATGPT_ENTERPRISE_CLOUD_COST_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest + getChatgptEnterpriseCloudCostData() { + return chatgptEnterpriseCloudCostData; + } + + public void setChatgptEnterpriseCloudCostData( + ChatGPTEnterpriseCloudCostDataIntegrationDataflowRequest chatgptEnterpriseCloudCostData) { + this.chatgptEnterpriseCloudCostData = chatgptEnterpriseCloudCostData; + if (chatgptEnterpriseCloudCostData != null) { + this.unparsed |= chatgptEnterpriseCloudCostData.unparsed; + } + } + + /** Return true if this ChatGPTEnterpriseIntegrationDataflowsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationDataflowsRequest chatGptEnterpriseIntegrationDataflowsRequest = + (ChatGPTEnterpriseIntegrationDataflowsRequest) o; + return Objects.equals( + this.chatgptEnterpriseAgentConsole, + chatGptEnterpriseIntegrationDataflowsRequest.chatgptEnterpriseAgentConsole) + && Objects.equals( + this.chatgptEnterpriseCloudCostData, + chatGptEnterpriseIntegrationDataflowsRequest.chatgptEnterpriseCloudCostData); + } + + @Override + public int hashCode() { + return Objects.hash(chatgptEnterpriseAgentConsole, chatgptEnterpriseCloudCostData); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationDataflowsRequest {\n"); + sb.append(" chatgptEnterpriseAgentConsole: ") + .append(toIndentedString(chatgptEnterpriseAgentConsole)) + .append("\n"); + sb.append(" chatgptEnterpriseCloudCostData: ") + .append(toIndentedString(chatgptEnterpriseCloudCostData)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/ChatGPTEnterpriseIntegrationDataflowsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationDataflowsResponse.java new file mode 100644 index 00000000000..f57df840825 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ChatGPTEnterpriseIntegrationDataflowsResponse.java @@ -0,0 +1,198 @@ +/* + * 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 ChatGPT Enterprise, keyed by dataflow id. */ +@JsonPropertyOrder({ + ChatGPTEnterpriseIntegrationDataflowsResponse.JSON_PROPERTY_CHATGPT_ENTERPRISE_AGENT_CONSOLE, + ChatGPTEnterpriseIntegrationDataflowsResponse.JSON_PROPERTY_CHATGPT_ENTERPRISE_CLOUD_COST_DATA +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ChatGPTEnterpriseIntegrationDataflowsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CHATGPT_ENTERPRISE_AGENT_CONSOLE = + "chatgpt-enterprise-agent-console"; + private ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse chatgptEnterpriseAgentConsole; + + public static final String JSON_PROPERTY_CHATGPT_ENTERPRISE_CLOUD_COST_DATA = + "chatgpt-enterprise-cloud-cost-data"; + private ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse chatgptEnterpriseCloudCostData; + + public ChatGPTEnterpriseIntegrationDataflowsResponse chatgptEnterpriseAgentConsole( + ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse chatgptEnterpriseAgentConsole) { + this.chatgptEnterpriseAgentConsole = chatgptEnterpriseAgentConsole; + this.unparsed |= chatgptEnterpriseAgentConsole.unparsed; + return this; + } + + /** + * Activity, token consumption, credits, and estimated usage costs across ChatGPT Chat, ChatGPT + * Work, and Codex, shown in Agent Console with breakdowns by product, model, and user where + * OpenAI provides them. + * + * @return chatgptEnterpriseAgentConsole + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHATGPT_ENTERPRISE_AGENT_CONSOLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse + getChatgptEnterpriseAgentConsole() { + return chatgptEnterpriseAgentConsole; + } + + public void setChatgptEnterpriseAgentConsole( + ChatGPTEnterpriseAgentConsoleIntegrationDataflowResponse chatgptEnterpriseAgentConsole) { + this.chatgptEnterpriseAgentConsole = chatgptEnterpriseAgentConsole; + if (chatgptEnterpriseAgentConsole != null) { + this.unparsed |= chatgptEnterpriseAgentConsole.unparsed; + } + } + + public ChatGPTEnterpriseIntegrationDataflowsResponse chatgptEnterpriseCloudCostData( + ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse chatgptEnterpriseCloudCostData) { + this.chatgptEnterpriseCloudCostData = chatgptEnterpriseCloudCostData; + this.unparsed |= chatgptEnterpriseCloudCostData.unparsed; + return this; + } + + /** + * ChatGPT Enterprise costs from the OpenAI Costs API, so that ChatGPT Enterprise spend can be + * analyzed in Cloud Cost + * Management. These costs are excluded from Cloud Cost Management spend-monitored billing. + * Reported costs are estimates, not final invoice amounts. + * + * @return chatgptEnterpriseCloudCostData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHATGPT_ENTERPRISE_CLOUD_COST_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse + getChatgptEnterpriseCloudCostData() { + return chatgptEnterpriseCloudCostData; + } + + public void setChatgptEnterpriseCloudCostData( + ChatGPTEnterpriseCloudCostDataIntegrationDataflowResponse chatgptEnterpriseCloudCostData) { + this.chatgptEnterpriseCloudCostData = chatgptEnterpriseCloudCostData; + if (chatgptEnterpriseCloudCostData != null) { + this.unparsed |= chatgptEnterpriseCloudCostData.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 ChatGPTEnterpriseIntegrationDataflowsResponse + */ + @JsonAnySetter + public ChatGPTEnterpriseIntegrationDataflowsResponse putAdditionalProperty( + String 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 ChatGPTEnterpriseIntegrationDataflowsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatGPTEnterpriseIntegrationDataflowsResponse chatGptEnterpriseIntegrationDataflowsResponse = + (ChatGPTEnterpriseIntegrationDataflowsResponse) o; + return Objects.equals( + this.chatgptEnterpriseAgentConsole, + chatGptEnterpriseIntegrationDataflowsResponse.chatgptEnterpriseAgentConsole) + && Objects.equals( + this.chatgptEnterpriseCloudCostData, + chatGptEnterpriseIntegrationDataflowsResponse.chatgptEnterpriseCloudCostData) + && Objects.equals( + this.additionalProperties, + chatGptEnterpriseIntegrationDataflowsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + chatgptEnterpriseAgentConsole, chatgptEnterpriseCloudCostData, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChatGPTEnterpriseIntegrationDataflowsResponse {\n"); + sb.append(" chatgptEnterpriseAgentConsole: ") + .append(toIndentedString(chatgptEnterpriseAgentConsole)) + .append("\n"); + sb.append(" chatgptEnterpriseCloudCostData: ") + .append(toIndentedString(chatgptEnterpriseCloudCostData)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/test/resources/com/datadog/api/client/v2/api/chatgpt_enterprise_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/chatgpt_enterprise_integration.feature new file mode 100644 index 00000000000..2b91aa60d66 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/chatgpt_enterprise_integration.feature @@ -0,0 +1,148 @@ +@endpoint(chatgpt-enterprise-integration) @endpoint(chatgpt-enterprise-integration-v2) +Feature: ChatGPT Enterprise Integration + Manage your Datadog ChatGPT Enterprise integration accounts and account + resources directly through the Datadog API. See the [ChatGPT Enterprise + integration page](https://docs.datadoghq.com/integrations/chatgpt- + enterprise/) for more information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ChatGPTEnterpriseIntegration" API + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create a ChatGPT Enterprise integration account returns "Bad Request" response + Given operation "CreateChatGPTEnterpriseIntegrationAccount" enabled + And new "CreateChatGPTEnterpriseIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"chatgpt-enterprise-agent-console": {"enabled": true}, "chatgpt-enterprise-cloud-cost-data": {"enabled": true}}, "name": "chatgpt-enterprise-acme", "settings": {"openai_org_id": "org-AbC123dEf456"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create a ChatGPT Enterprise integration account returns "Created" response + Given operation "CreateChatGPTEnterpriseIntegrationAccount" enabled + And new "CreateChatGPTEnterpriseIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"chatgpt-enterprise-agent-console": {"enabled": true}, "chatgpt-enterprise-cloud-cost-data": {"enabled": true}}, "name": "chatgpt-enterprise-acme", "settings": {"openai_org_id": "org-AbC123dEf456"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create a ChatGPT Enterprise integration account returns "Not Found" response + Given operation "CreateChatGPTEnterpriseIntegrationAccount" enabled + And new "CreateChatGPTEnterpriseIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"chatgpt-enterprise-agent-console": {"enabled": true}, "chatgpt-enterprise-cloud-cost-data": {"enabled": true}}, "name": "chatgpt-enterprise-acme", "settings": {"openai_org_id": "org-AbC123dEf456"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create a ChatGPT Enterprise integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "CreateChatGPTEnterpriseIntegrationAccount" enabled + And new "CreateChatGPTEnterpriseIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"chatgpt-enterprise-agent-console": {"enabled": true}, "chatgpt-enterprise-cloud-cost-data": {"enabled": true}}, "name": "chatgpt-enterprise-acme", "settings": {"openai_org_id": "org-AbC123dEf456"}}, "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:ddoghq/saas-integrations + Scenario: Delete a ChatGPT Enterprise integration account returns "Bad Request" response + Given operation "DeleteChatGPTEnterpriseIntegrationAccount" enabled + And new "DeleteChatGPTEnterpriseIntegrationAccount" 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:ddoghq/saas-integrations + Scenario: Delete a ChatGPT Enterprise integration account returns "Not Found" response + Given operation "DeleteChatGPTEnterpriseIntegrationAccount" enabled + And new "DeleteChatGPTEnterpriseIntegrationAccount" 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:ddoghq/saas-integrations + Scenario: Delete a ChatGPT Enterprise integration account returns "OK" response + Given operation "DeleteChatGPTEnterpriseIntegrationAccount" enabled + And new "DeleteChatGPTEnterpriseIntegrationAccount" 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:ddoghq/saas-integrations + Scenario: Get a ChatGPT Enterprise integration account returns "Bad Request" response + Given operation "GetChatGPTEnterpriseIntegrationAccount" enabled + And new "GetChatGPTEnterpriseIntegrationAccount" 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:ddoghq/saas-integrations + Scenario: Get a ChatGPT Enterprise integration account returns "Not Found" response + Given operation "GetChatGPTEnterpriseIntegrationAccount" enabled + And new "GetChatGPTEnterpriseIntegrationAccount" 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:ddoghq/saas-integrations + Scenario: Get a ChatGPT Enterprise integration account returns "OK" response + Given operation "GetChatGPTEnterpriseIntegrationAccount" enabled + And new "GetChatGPTEnterpriseIntegrationAccount" 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:ddoghq/saas-integrations + Scenario: List ChatGPT Enterprise integration accounts returns "Bad Request" response + Given operation "ListChatGPTEnterpriseIntegrationAccounts" enabled + And new "ListChatGPTEnterpriseIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/saas-integrations + Scenario: List ChatGPT Enterprise integration accounts returns "Not Found" response + Given operation "ListChatGPTEnterpriseIntegrationAccounts" enabled + And new "ListChatGPTEnterpriseIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/saas-integrations + Scenario: List ChatGPT Enterprise integration accounts returns "OK" response + Given operation "ListChatGPTEnterpriseIntegrationAccounts" enabled + And new "ListChatGPTEnterpriseIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update a ChatGPT Enterprise integration account returns "Bad Request" response + Given operation "UpdateChatGPTEnterpriseIntegrationAccount" enabled + And new "UpdateChatGPTEnterpriseIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"chatgpt-enterprise-agent-console": {"enabled": true}, "chatgpt-enterprise-cloud-cost-data": {"enabled": true}}, "name": "chatgpt-enterprise-acme", "settings": {"openai_org_id": "org-AbC123dEf456"}}, "id": "3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03", "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update a ChatGPT Enterprise integration account returns "Not Found" response + Given operation "UpdateChatGPTEnterpriseIntegrationAccount" enabled + And new "UpdateChatGPTEnterpriseIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"chatgpt-enterprise-agent-console": {"enabled": true}, "chatgpt-enterprise-cloud-cost-data": {"enabled": true}}, "name": "chatgpt-enterprise-acme", "settings": {"openai_org_id": "org-AbC123dEf456"}}, "id": "3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03", "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update a ChatGPT Enterprise integration account returns "OK" response + Given operation "UpdateChatGPTEnterpriseIntegrationAccount" enabled + And new "UpdateChatGPTEnterpriseIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"chatgpt-enterprise-agent-console": {"enabled": true}, "chatgpt-enterprise-cloud-cost-data": {"enabled": true}}, "name": "chatgpt-enterprise-acme", "settings": {"openai_org_id": "org-AbC123dEf456"}}, "id": "3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03", "type": "integration-account"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update a ChatGPT Enterprise integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "UpdateChatGPTEnterpriseIntegrationAccount" enabled + And new "UpdateChatGPTEnterpriseIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"chatgpt-enterprise-agent-console": {"enabled": true}, "chatgpt-enterprise-cloud-cost-data": {"enabled": true}}, "name": "chatgpt-enterprise-acme", "settings": {"openai_org_id": "org-AbC123dEf456"}}, "id": "3e8a1f6b-9c2d-4b7e-8a5f-6d1c4e9b2a03", "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index c8de5bd66d8..6ea3d29d938 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 @@ -4248,6 +4248,43 @@ "type": "safe" } }, + "ListChatGPTEnterpriseIntegrationAccounts": { + "tag": "ChatGPT Enterprise Integration", + "undo": { + "type": "safe" + } + }, + "CreateChatGPTEnterpriseIntegrationAccount": { + "tag": "ChatGPT Enterprise Integration", + "undo": { + "operationId": "DeleteChatGPTEnterpriseIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteChatGPTEnterpriseIntegrationAccount": { + "tag": "ChatGPT Enterprise Integration", + "undo": { + "type": "idempotent" + } + }, + "GetChatGPTEnterpriseIntegrationAccount": { + "tag": "ChatGPT Enterprise Integration", + "undo": { + "type": "safe" + } + }, + "UpdateChatGPTEnterpriseIntegrationAccount": { + "tag": "ChatGPT Enterprise Integration", + "undo": { + "type": "idempotent" + } + }, "ListDatabricksIntegrationAccounts": { "tag": "Databricks Integration", "undo": {