From 819d94a733b27a7d24e26515923ce29c0f7cb2d8 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 11 Nov 2026 13:34:22 +0000 Subject: [PATCH] Regenerate client from commit e0b88bb of spec repo --- .generator/schemas/v2/openapi.yaml | 579 ++++++++++++ .../CreateOpenAICodexIntegrationAccount.java | 66 ++ .../DeleteOpenAICodexIntegrationAccount.java | 25 + .../GetOpenAICodexIntegrationAccount.java | 28 + .../ListOpenAICodexIntegrationAccounts.java | 28 + .../UpdateOpenAICodexIntegrationAccount.java | 67 ++ .../com/datadog/api/client/ApiClient.java | 5 + .../v2/api/OpenAiCodexIntegrationApi.java | 849 ++++++++++++++++++ ...AICodexDoraIntegrationDataflowRequest.java | 87 ++ ...ICodexDoraIntegrationDataflowResponse.java | 163 ++++ ...tegrationAccountAuthenticationRequest.java | 248 +++++ ...egrationAccountAuthenticationResponse.java | 248 +++++ ...ntegrationAccountAuthenticationUpdate.java | 247 +++++ ...egrationAccountBearerTokenAuthRequest.java | 135 +++ ...grationAccountBearerTokenAuthResponse.java | 159 ++++ ...IntegrationAccountBearerTokenAuthType.java | 63 ++ ...tegrationAccountBearerTokenAuthUpdate.java | 135 +++ ...dexIntegrationAccountCreateAttributes.java | 257 ++++++ ...enAICodexIntegrationAccountCreateData.java | 188 ++++ ...ICodexIntegrationAccountCreateRequest.java | 154 ++++ ...OpenAICodexIntegrationAccountResponse.java | 152 ++++ ...xIntegrationAccountResponseAttributes.java | 251 ++++++ ...AICodexIntegrationAccountResponseData.java | 207 +++++ ...odexIntegrationAccountSettingsRequest.java | 92 ++ ...dexIntegrationAccountSettingsResponse.java | 149 +++ ...CodexIntegrationAccountSettingsUpdate.java | 85 ++ ...dexIntegrationAccountUpdateAttributes.java | 249 +++++ ...enAICodexIntegrationAccountUpdateData.java | 219 +++++ ...ICodexIntegrationAccountUpdateRequest.java | 154 ++++ ...penAICodexIntegrationAccountsResponse.java | 167 ++++ ...penAICodexIntegrationDataflowsRequest.java | 141 +++ ...enAICodexIntegrationDataflowsResponse.java | 228 +++++ ...dexMetricsIntegrationDataflowResponse.java | 156 ++++ ...TurnMetricsIntegrationDataflowRequest.java | 91 ++ ...urnMetricsIntegrationDataflowResponse.java | 167 ++++ .../v2/api/openai_codex_integration.feature | 148 +++ .../com/datadog/api/client/v2/api/undo.json | 37 + 37 files changed, 6424 insertions(+) create mode 100644 examples/v2/openai-codex-integration/CreateOpenAICodexIntegrationAccount.java create mode 100644 examples/v2/openai-codex-integration/DeleteOpenAICodexIntegrationAccount.java create mode 100644 examples/v2/openai-codex-integration/GetOpenAICodexIntegrationAccount.java create mode 100644 examples/v2/openai-codex-integration/ListOpenAICodexIntegrationAccounts.java create mode 100644 examples/v2/openai-codex-integration/UpdateOpenAICodexIntegrationAccount.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/OpenAiCodexIntegrationApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexDoraIntegrationDataflowRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexDoraIntegrationDataflowResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountAuthenticationRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountAuthenticationResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountAuthenticationUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponseAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationDataflowsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationDataflowsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexMetricsIntegrationDataflowResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexTurnMetricsIntegrationDataflowRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAICodexTurnMetricsIntegrationDataflowResponse.java create mode 100644 src/test/resources/com/datadog/api/client/v2/api/openai_codex_integration.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6325ee4e374..833ccc1b077 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -100262,6 +100262,302 @@ components: oneOf: - $ref: "#/components/schemas/ActionConnectionLiteralValue" - $ref: "#/components/schemas/ActionConnectionAWSSecretsManagerReference" + OpenAICodexDoraIntegrationDataflowRequest: + additionalProperties: false + description: >- + A daily per-engineer engagement signal that [AI Impact](https://docs.datadoghq.com/delivery_performance/ai_impact/) uses to attribute AI-assisted pull requests. + properties: + enabled: + description: >- + Whether Datadog collects this data. Defaults to `true`; set to `false` to stop collection. + example: true + type: boolean + type: object + OpenAICodexDoraIntegrationDataflowResponse: + description: >- + A daily per-engineer engagement signal that [AI Impact](https://docs.datadoghq.com/delivery_performance/ai_impact/) uses to attribute AI-assisted pull requests. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + OpenAICodexIntegrationAccountAuthenticationRequest: + description: Authentication for creating the OpenAI Codex integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthRequest" + OpenAICodexIntegrationAccountAuthenticationResponse: + description: Authentication configured on the OpenAI Codex integration account. + oneOf: + - $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthResponse" + OpenAICodexIntegrationAccountAuthenticationUpdate: + description: Authentication for updating the OpenAI Codex integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthUpdate" + OpenAICodexIntegrationAccountBearerTokenAuthRequest: + additionalProperties: false + description: >- + Bearer token authentication. Use a workspace-scoped OpenAI Admin key with the `codex.enterprise.analytics.read` scope. + properties: + auth_type: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthType" + token: + description: Secret token used to authenticate with OpenAI Codex. + example: your-token + type: string + writeOnly: true + required: + - auth_type + - token + type: object + OpenAICodexIntegrationAccountBearerTokenAuthResponse: + description: The bearer token authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthType" + required: + - auth_type + type: object + OpenAICodexIntegrationAccountBearerTokenAuthType: + default: bearer_token + description: The authentication method type. + enum: + - bearer_token + example: bearer_token + type: string + x-enum-varnames: + - BEARER_TOKEN + OpenAICodexIntegrationAccountBearerTokenAuthUpdate: + additionalProperties: false + description: >- + Bearer token authentication. Use a workspace-scoped OpenAI Admin key with the `codex.enterprise.analytics.read` scope. Only the fields provided are changed; omit `token` to keep the stored one. + properties: + auth_type: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthType" + token: + description: Secret token used to authenticate with OpenAI Codex. + example: your-token + type: string + writeOnly: true + required: + - auth_type + type: object + OpenAICodexIntegrationAccountCreateAttributes: + description: Writable attributes used to create an OpenAI Codex integration account. + properties: + authentication: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountAuthenticationRequest" + dataflows: + $ref: "#/components/schemas/OpenAICodexIntegrationDataflowsRequest" + name: + description: Human-readable name of the OpenAI Codex integration account. + example: openai-codex-acme + type: string + settings: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountSettingsRequest" + required: + - name + - authentication + - settings + type: object + OpenAICodexIntegrationAccountCreateData: + description: Data envelope for creating an OpenAI Codex integration account. + properties: + attributes: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountCreateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + OpenAICodexIntegrationAccountCreateRequest: + description: Request payload to create an OpenAI Codex integration account. + properties: + data: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountCreateData" + required: + - data + type: object + OpenAICodexIntegrationAccountResponse: + description: Response payload for a single OpenAI Codex integration account. + properties: + data: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponseData" + required: + - data + type: object + OpenAICodexIntegrationAccountResponseAttributes: + description: Attributes of an OpenAI Codex integration account returned in responses. + properties: + authentication: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountAuthenticationResponse" + dataflows: + $ref: "#/components/schemas/OpenAICodexIntegrationDataflowsResponse" + name: + description: Human-readable name of the OpenAI Codex integration account. + example: openai-codex-acme + type: string + settings: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountSettingsResponse" + required: + - name + - settings + type: object + OpenAICodexIntegrationAccountResponseData: + description: Data envelope of an OpenAI Codex integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponseAttributes" + id: + description: Server-generated unique identifier of the OpenAI Codex integration account. + example: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47 + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - attributes + - type + type: object + OpenAICodexIntegrationAccountSettingsRequest: + additionalProperties: false + description: Settings for creating the OpenAI Codex integration account. + properties: + codex_workspace_id: + description: ID of the Codex workspace to collect data from. + example: your-workspace-id + type: string + required: + - codex_workspace_id + type: object + OpenAICodexIntegrationAccountSettingsResponse: + description: Settings configured on the OpenAI Codex integration account. + properties: + codex_workspace_id: + description: ID of the Codex workspace to collect data from. + example: your-workspace-id + type: string + required: + - codex_workspace_id + type: object + OpenAICodexIntegrationAccountSettingsUpdate: + additionalProperties: false + description: >- + Settings for updating the OpenAI Codex integration account. Only the fields provided are changed. + properties: + codex_workspace_id: + description: ID of the Codex workspace to collect data from. + example: your-workspace-id + type: string + type: object + OpenAICodexIntegrationAccountUpdateAttributes: + description: >- + Writable attributes used to update an OpenAI Codex 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/OpenAICodexIntegrationAccountAuthenticationUpdate" + dataflows: + $ref: "#/components/schemas/OpenAICodexIntegrationDataflowsRequest" + name: + description: Human-readable name of the OpenAI Codex integration account. + example: openai-codex-acme + type: string + settings: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountSettingsUpdate" + type: object + OpenAICodexIntegrationAccountUpdateData: + description: Data envelope for updating an OpenAI Codex integration account. + properties: + attributes: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountUpdateAttributes" + id: + description: Unique identifier of the OpenAI Codex integration account to update. + example: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47 + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + OpenAICodexIntegrationAccountUpdateRequest: + description: Request payload to update an OpenAI Codex integration account. + properties: + data: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountUpdateData" + required: + - data + type: object + OpenAICodexIntegrationAccountsResponse: + description: Response payload for a list of OpenAI Codex integration accounts. + properties: + data: + description: List of OpenAI Codex integration accounts. + items: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponseData" + type: array + required: + - data + type: object + OpenAICodexIntegrationDataflowsRequest: + additionalProperties: false + description: >- + Data Datadog collects from OpenAI Codex, keyed by dataflow id. Daily Codex analytics metrics are always collected; each dataflow here adds a further kind of collection on top of that baseline, so 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 an OpenAI enterprise subscription with Codex enabled; a dataflow enabled without it is stored but collects no data. + properties: + openai-codex-dora: + $ref: "#/components/schemas/OpenAICodexDoraIntegrationDataflowRequest" + openai-codex-turn-metrics: + $ref: "#/components/schemas/OpenAICodexTurnMetricsIntegrationDataflowRequest" + type: object + OpenAICodexIntegrationDataflowsResponse: + description: Data Datadog collects from OpenAI Codex, keyed by dataflow id. + properties: + openai-codex-dora: + $ref: "#/components/schemas/OpenAICodexDoraIntegrationDataflowResponse" + openai-codex-metrics: + $ref: "#/components/schemas/OpenAICodexMetricsIntegrationDataflowResponse" + openai-codex-turn-metrics: + $ref: "#/components/schemas/OpenAICodexTurnMetricsIntegrationDataflowResponse" + type: object + OpenAICodexMetricsIntegrationDataflowResponse: + description: >- + Daily Codex analytics metrics under the `openai.codex.*` namespace: usage totals, token counts by model, thread and turn counts by client, lines of code attributable to Codex, and code reviews. This dataflow is always on and cannot be turned off, which is why it appears in responses only. + properties: + enabled: + description: Whether Datadog collects this data. Always `true`, because this collection cannot be turned off. + example: true + readOnly: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + OpenAICodexTurnMetricsIntegrationDataflowRequest: + additionalProperties: false + description: >- + Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session identity, Work Insights classification, token usage, credits, estimated cost, duration, and skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from invoiced charges. Requires the `chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read` scope on the key in `authentication`; without it this dataflow collects no data. + properties: + enabled: + description: >- + Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + type: object + OpenAICodexTurnMetricsIntegrationDataflowResponse: + description: >- + Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session identity, Work Insights classification, token usage, credits, estimated cost, duration, and skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from invoiced charges. Requires the `chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read` scope on the key in `authentication`; without it this dataflow collects no data. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object OpenAICredentials: description: The definition of the `OpenAICredentials` object. oneOf: @@ -198229,6 +198525,280 @@ 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/openai-codex/accounts: + get: + description: List OpenAI Codex integration accounts. + operationId: ListOpenAICodexIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + auth_type: bearer_token + dataflows: + openai-codex-dora: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-codex-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-codex-turn-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: openai-codex-acme + settings: + codex_workspace_id: your-workspace-id + id: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47 + type: integration-account + schema: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List OpenAI Codex integration accounts + tags: + - OpenAI Codex 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 an OpenAI Codex integration account. + operationId: CreateOpenAICodexIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + openai-codex-dora: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-codex-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-codex-turn-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: openai-codex-acme + settings: + codex_workspace_id: your-workspace-id + id: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47 + type: integration-account + schema: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponse" + 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 an OpenAI Codex integration account + tags: + - OpenAI Codex 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/openai-codex/accounts/{account_id}: + delete: + description: Delete an OpenAI Codex integration account. + operationId: DeleteOpenAICodexIntegrationAccount + 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 an OpenAI Codex integration account + tags: + - OpenAI Codex 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 an OpenAI Codex integration account. + operationId: GetOpenAICodexIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + openai-codex-dora: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-codex-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-codex-turn-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: openai-codex-acme + settings: + codex_workspace_id: your-workspace-id + id: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47 + type: integration-account + schema: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an OpenAI Codex integration account + tags: + - OpenAI Codex 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 an OpenAI Codex integration account. Only the fields provided are changed. + operationId: UpdateOpenAICodexIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + openai-codex-dora: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-codex-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-codex-turn-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: openai-codex-acme + settings: + codex_workspace_id: your-workspace-id + id: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47 + type: integration-account + schema: + $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponse" + 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 an OpenAI Codex integration account + tags: + - OpenAI Codex 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/snowflake/accounts: get: description: List Snowflake integration accounts. @@ -273083,6 +273653,15 @@ tags: externalDocs: url: https://docs.datadoghq.com/service_management/on-call/ name: On-Call Paging + - description: |- + Manage your Datadog OpenAI Codex integration accounts and account resources + directly through the Datadog API. See the + [OpenAI Codex integration page](https://docs.datadoghq.com/integrations/openai-codex/) for + more information. + externalDocs: + description: OpenAI Codex integration. + url: https://docs.datadoghq.com/integrations/openai-codex/ + name: OpenAI Codex Integration - description: |- Configure your [Datadog Opsgenie integration](https://docs.datadoghq.com/integrations/opsgenie/) directly through the Datadog API. diff --git a/examples/v2/openai-codex-integration/CreateOpenAICodexIntegrationAccount.java b/examples/v2/openai-codex-integration/CreateOpenAICodexIntegrationAccount.java new file mode 100644 index 00000000000..a4a20c89def --- /dev/null +++ b/examples/v2/openai-codex-integration/CreateOpenAICodexIntegrationAccount.java @@ -0,0 +1,66 @@ +// Create an OpenAI Codex integration account returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiCodexIntegrationApi; +import com.datadog.api.client.v2.model.IntegrationAccountType; +import com.datadog.api.client.v2.model.OpenAICodexDoraIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountAuthenticationRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountBearerTokenAuthRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountBearerTokenAuthType; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountCreateAttributes; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountCreateData; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountCreateRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountResponse; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountSettingsRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationDataflowsRequest; +import com.datadog.api.client.v2.model.OpenAICodexTurnMetricsIntegrationDataflowRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.createOpenAICodexIntegrationAccount", true); + OpenAiCodexIntegrationApi apiInstance = new OpenAiCodexIntegrationApi(defaultClient); + + OpenAICodexIntegrationAccountCreateRequest body = + new OpenAICodexIntegrationAccountCreateRequest() + .data( + new OpenAICodexIntegrationAccountCreateData() + .attributes( + new OpenAICodexIntegrationAccountCreateAttributes() + .authentication( + new OpenAICodexIntegrationAccountAuthenticationRequest( + new OpenAICodexIntegrationAccountBearerTokenAuthRequest() + .authType( + OpenAICodexIntegrationAccountBearerTokenAuthType + .BEARER_TOKEN) + .token("your-token"))) + .dataflows( + new OpenAICodexIntegrationDataflowsRequest() + .openaiCodexDora( + new OpenAICodexDoraIntegrationDataflowRequest() + .enabled(true)) + .openaiCodexTurnMetrics( + new OpenAICodexTurnMetricsIntegrationDataflowRequest() + .enabled(true))) + .name("openai-codex-acme") + .settings( + new OpenAICodexIntegrationAccountSettingsRequest() + .codexWorkspaceId("your-workspace-id"))) + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + OpenAICodexIntegrationAccountResponse result = + apiInstance.createOpenAICodexIntegrationAccount(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling OpenAiCodexIntegrationApi#createOpenAICodexIntegrationAccount"); + 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/openai-codex-integration/DeleteOpenAICodexIntegrationAccount.java b/examples/v2/openai-codex-integration/DeleteOpenAICodexIntegrationAccount.java new file mode 100644 index 00000000000..921482ca717 --- /dev/null +++ b/examples/v2/openai-codex-integration/DeleteOpenAICodexIntegrationAccount.java @@ -0,0 +1,25 @@ +// Delete an OpenAI Codex integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiCodexIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteOpenAICodexIntegrationAccount", true); + OpenAiCodexIntegrationApi apiInstance = new OpenAiCodexIntegrationApi(defaultClient); + + try { + apiInstance.deleteOpenAICodexIntegrationAccount("account_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling OpenAiCodexIntegrationApi#deleteOpenAICodexIntegrationAccount"); + 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/openai-codex-integration/GetOpenAICodexIntegrationAccount.java b/examples/v2/openai-codex-integration/GetOpenAICodexIntegrationAccount.java new file mode 100644 index 00000000000..bdff72b7208 --- /dev/null +++ b/examples/v2/openai-codex-integration/GetOpenAICodexIntegrationAccount.java @@ -0,0 +1,28 @@ +// Get an OpenAI Codex integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiCodexIntegrationApi; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getOpenAICodexIntegrationAccount", true); + OpenAiCodexIntegrationApi apiInstance = new OpenAiCodexIntegrationApi(defaultClient); + + try { + OpenAICodexIntegrationAccountResponse result = + apiInstance.getOpenAICodexIntegrationAccount("account_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling OpenAiCodexIntegrationApi#getOpenAICodexIntegrationAccount"); + 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/openai-codex-integration/ListOpenAICodexIntegrationAccounts.java b/examples/v2/openai-codex-integration/ListOpenAICodexIntegrationAccounts.java new file mode 100644 index 00000000000..4438d213cd8 --- /dev/null +++ b/examples/v2/openai-codex-integration/ListOpenAICodexIntegrationAccounts.java @@ -0,0 +1,28 @@ +// List OpenAI Codex integration accounts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiCodexIntegrationApi; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.listOpenAICodexIntegrationAccounts", true); + OpenAiCodexIntegrationApi apiInstance = new OpenAiCodexIntegrationApi(defaultClient); + + try { + OpenAICodexIntegrationAccountsResponse result = + apiInstance.listOpenAICodexIntegrationAccounts(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling OpenAiCodexIntegrationApi#listOpenAICodexIntegrationAccounts"); + 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/openai-codex-integration/UpdateOpenAICodexIntegrationAccount.java b/examples/v2/openai-codex-integration/UpdateOpenAICodexIntegrationAccount.java new file mode 100644 index 00000000000..64382109b6b --- /dev/null +++ b/examples/v2/openai-codex-integration/UpdateOpenAICodexIntegrationAccount.java @@ -0,0 +1,67 @@ +// Update an OpenAI Codex integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiCodexIntegrationApi; +import com.datadog.api.client.v2.model.IntegrationAccountType; +import com.datadog.api.client.v2.model.OpenAICodexDoraIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountAuthenticationUpdate; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountBearerTokenAuthType; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountBearerTokenAuthUpdate; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountResponse; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountSettingsUpdate; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountUpdateAttributes; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountUpdateData; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationDataflowsRequest; +import com.datadog.api.client.v2.model.OpenAICodexTurnMetricsIntegrationDataflowRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateOpenAICodexIntegrationAccount", true); + OpenAiCodexIntegrationApi apiInstance = new OpenAiCodexIntegrationApi(defaultClient); + + OpenAICodexIntegrationAccountUpdateRequest body = + new OpenAICodexIntegrationAccountUpdateRequest() + .data( + new OpenAICodexIntegrationAccountUpdateData() + .attributes( + new OpenAICodexIntegrationAccountUpdateAttributes() + .authentication( + new OpenAICodexIntegrationAccountAuthenticationUpdate( + new OpenAICodexIntegrationAccountBearerTokenAuthUpdate() + .authType( + OpenAICodexIntegrationAccountBearerTokenAuthType + .BEARER_TOKEN) + .token("your-token"))) + .dataflows( + new OpenAICodexIntegrationDataflowsRequest() + .openaiCodexDora( + new OpenAICodexDoraIntegrationDataflowRequest() + .enabled(true)) + .openaiCodexTurnMetrics( + new OpenAICodexTurnMetricsIntegrationDataflowRequest() + .enabled(true))) + .name("openai-codex-acme") + .settings( + new OpenAICodexIntegrationAccountSettingsUpdate() + .codexWorkspaceId("your-workspace-id"))) + .id("7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47") + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + OpenAICodexIntegrationAccountResponse result = + apiInstance.updateOpenAICodexIntegrationAccount("account_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling OpenAiCodexIntegrationApi#updateOpenAICodexIntegrationAccount"); + 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..36f25b80e9c 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1540,6 +1540,11 @@ public class ApiClient { put("v2.getElasticCloudIntegrationAccount", false); put("v2.listElasticCloudIntegrationAccounts", false); put("v2.updateElasticCloudIntegrationAccount", false); + put("v2.createOpenAICodexIntegrationAccount", false); + put("v2.deleteOpenAICodexIntegrationAccount", false); + put("v2.getOpenAICodexIntegrationAccount", false); + put("v2.listOpenAICodexIntegrationAccounts", false); + put("v2.updateOpenAICodexIntegrationAccount", false); put("v2.createSnowflakeIntegrationAccount", false); put("v2.deleteSnowflakeIntegrationAccount", false); put("v2.getSnowflakeIntegrationAccount", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/OpenAiCodexIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/OpenAiCodexIntegrationApi.java new file mode 100644 index 00000000000..ecd8cac3369 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/OpenAiCodexIntegrationApi.java @@ -0,0 +1,849 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountCreateRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountResponse; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.OpenAICodexIntegrationAccountsResponse; +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 OpenAiCodexIntegrationApi { + private ApiClient apiClient; + + public OpenAiCodexIntegrationApi() { + this(ApiClient.getDefaultApiClient()); + } + + public OpenAiCodexIntegrationApi(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 an OpenAI Codex integration account. + * + *

See {@link #createOpenAICodexIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return OpenAICodexIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public OpenAICodexIntegrationAccountResponse createOpenAICodexIntegrationAccount( + OpenAICodexIntegrationAccountCreateRequest body) throws ApiException { + return createOpenAICodexIntegrationAccountWithHttpInfo(body).getData(); + } + + /** + * Create an OpenAI Codex integration account. + * + *

See {@link #createOpenAICodexIntegrationAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<OpenAICodexIntegrationAccountResponse> + */ + public CompletableFuture + createOpenAICodexIntegrationAccountAsync(OpenAICodexIntegrationAccountCreateRequest body) { + return createOpenAICodexIntegrationAccountWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an OpenAI Codex integration account. + * + * @param body (required) + * @return ApiResponse<OpenAICodexIntegrationAccountResponse> + * @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 + createOpenAICodexIntegrationAccountWithHttpInfo( + OpenAICodexIntegrationAccountCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createOpenAICodexIntegrationAccount"; + 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 createOpenAICodexIntegrationAccount"); + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/openai-codex/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.createOpenAICodexIntegrationAccount", + 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 an OpenAI Codex integration account. + * + *

See {@link #createOpenAICodexIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<OpenAICodexIntegrationAccountResponse>> + */ + public CompletableFuture> + createOpenAICodexIntegrationAccountWithHttpInfoAsync( + OpenAICodexIntegrationAccountCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createOpenAICodexIntegrationAccount"; + 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" + + " createOpenAICodexIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/openai-codex/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.createOpenAICodexIntegrationAccount", + 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 an OpenAI Codex integration account. + * + *

See {@link #deleteOpenAICodexIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @throws ApiException if fails to make API call + */ + public void deleteOpenAICodexIntegrationAccount(String accountId) throws ApiException { + deleteOpenAICodexIntegrationAccountWithHttpInfo(accountId); + } + + /** + * Delete an OpenAI Codex integration account. + * + *

See {@link #deleteOpenAICodexIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteOpenAICodexIntegrationAccountAsync(String accountId) { + return deleteOpenAICodexIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an OpenAI Codex 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 deleteOpenAICodexIntegrationAccountWithHttpInfo(String accountId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteOpenAICodexIntegrationAccount"; + 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" + + " deleteOpenAICodexIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.deleteOpenAICodexIntegrationAccount", + 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 an OpenAI Codex integration account. + * + *

See {@link #deleteOpenAICodexIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteOpenAICodexIntegrationAccountWithHttpInfoAsync( + String accountId) { + // Check if unstable operation is enabled + String operationId = "deleteOpenAICodexIntegrationAccount"; + 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" + + " deleteOpenAICodexIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.deleteOpenAICodexIntegrationAccount", + 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 an OpenAI Codex integration account. + * + *

See {@link #getOpenAICodexIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return OpenAICodexIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public OpenAICodexIntegrationAccountResponse getOpenAICodexIntegrationAccount(String accountId) + throws ApiException { + return getOpenAICodexIntegrationAccountWithHttpInfo(accountId).getData(); + } + + /** + * Get an OpenAI Codex integration account. + * + *

See {@link #getOpenAICodexIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<OpenAICodexIntegrationAccountResponse> + */ + public CompletableFuture + getOpenAICodexIntegrationAccountAsync(String accountId) { + return getOpenAICodexIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an OpenAI Codex integration account. + * + * @param accountId Unique identifier of the integration account. (required) + * @return ApiResponse<OpenAICodexIntegrationAccountResponse> + * @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 + getOpenAICodexIntegrationAccountWithHttpInfo(String accountId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getOpenAICodexIntegrationAccount"; + 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" + + " getOpenAICodexIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.getOpenAICodexIntegrationAccount", + 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 an OpenAI Codex integration account. + * + *

See {@link #getOpenAICodexIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<OpenAICodexIntegrationAccountResponse>> + */ + public CompletableFuture> + getOpenAICodexIntegrationAccountWithHttpInfoAsync(String accountId) { + // Check if unstable operation is enabled + String operationId = "getOpenAICodexIntegrationAccount"; + 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" + + " getOpenAICodexIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.getOpenAICodexIntegrationAccount", + 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 OpenAI Codex integration accounts. + * + *

See {@link #listOpenAICodexIntegrationAccountsWithHttpInfo}. + * + * @return OpenAICodexIntegrationAccountsResponse + * @throws ApiException if fails to make API call + */ + public OpenAICodexIntegrationAccountsResponse listOpenAICodexIntegrationAccounts() + throws ApiException { + return listOpenAICodexIntegrationAccountsWithHttpInfo().getData(); + } + + /** + * List OpenAI Codex integration accounts. + * + *

See {@link #listOpenAICodexIntegrationAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<OpenAICodexIntegrationAccountsResponse> + */ + public CompletableFuture + listOpenAICodexIntegrationAccountsAsync() { + return listOpenAICodexIntegrationAccountsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List OpenAI Codex integration accounts. + * + * @return ApiResponse<OpenAICodexIntegrationAccountsResponse> + * @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 + listOpenAICodexIntegrationAccountsWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listOpenAICodexIntegrationAccounts"; + 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/openai-codex/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.listOpenAICodexIntegrationAccounts", + 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 OpenAI Codex integration accounts. + * + *

See {@link #listOpenAICodexIntegrationAccountsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<OpenAICodexIntegrationAccountsResponse>> + */ + public CompletableFuture> + listOpenAICodexIntegrationAccountsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listOpenAICodexIntegrationAccounts"; + 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/openai-codex/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.listOpenAICodexIntegrationAccounts", + 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 an OpenAI Codex integration account. + * + *

See {@link #updateOpenAICodexIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return OpenAICodexIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public OpenAICodexIntegrationAccountResponse updateOpenAICodexIntegrationAccount( + String accountId, OpenAICodexIntegrationAccountUpdateRequest body) throws ApiException { + return updateOpenAICodexIntegrationAccountWithHttpInfo(accountId, body).getData(); + } + + /** + * Update an OpenAI Codex integration account. + * + *

See {@link #updateOpenAICodexIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<OpenAICodexIntegrationAccountResponse> + */ + public CompletableFuture + updateOpenAICodexIntegrationAccountAsync( + String accountId, OpenAICodexIntegrationAccountUpdateRequest body) { + return updateOpenAICodexIntegrationAccountWithHttpInfoAsync(accountId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an OpenAI Codex integration account. Only the fields provided are changed. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return ApiResponse<OpenAICodexIntegrationAccountResponse> + * @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 + updateOpenAICodexIntegrationAccountWithHttpInfo( + String accountId, OpenAICodexIntegrationAccountUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateOpenAICodexIntegrationAccount"; + 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" + + " updateOpenAICodexIntegrationAccount"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling updateOpenAICodexIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.updateOpenAICodexIntegrationAccount", + 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 an OpenAI Codex integration account. + * + *

See {@link #updateOpenAICodexIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<OpenAICodexIntegrationAccountResponse>> + */ + public CompletableFuture> + updateOpenAICodexIntegrationAccountWithHttpInfoAsync( + String accountId, OpenAICodexIntegrationAccountUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateOpenAICodexIntegrationAccount"; + 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" + + " updateOpenAICodexIntegrationAccount")); + 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" + + " updateOpenAICodexIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OpenAiCodexIntegrationApi.updateOpenAICodexIntegrationAccount", + 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/OpenAICodexDoraIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexDoraIntegrationDataflowRequest.java new file mode 100644 index 00000000000..0dadf515073 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexDoraIntegrationDataflowRequest.java @@ -0,0 +1,87 @@ +/* + * 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; + +/** + * A daily per-engineer engagement signal that AI Impact uses to attribute + * AI-assisted pull requests. + */ +@JsonPropertyOrder({OpenAICodexDoraIntegrationDataflowRequest.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexDoraIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public OpenAICodexDoraIntegrationDataflowRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether Datadog collects this data. Defaults to true; set to false to + * stop collection. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** Return true if this OpenAICodexDoraIntegrationDataflowRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexDoraIntegrationDataflowRequest openAiCodexDoraIntegrationDataflowRequest = + (OpenAICodexDoraIntegrationDataflowRequest) o; + return Objects.equals(this.enabled, openAiCodexDoraIntegrationDataflowRequest.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexDoraIntegrationDataflowRequest {\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/OpenAICodexDoraIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexDoraIntegrationDataflowResponse.java new file mode 100644 index 00000000000..a48e2f7d55a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexDoraIntegrationDataflowResponse.java @@ -0,0 +1,163 @@ +/* + * 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; + +/** + * A daily per-engineer engagement signal that AI Impact uses to attribute + * AI-assisted pull requests. + */ +@JsonPropertyOrder({ + OpenAICodexDoraIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + OpenAICodexDoraIntegrationDataflowResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexDoraIntegrationDataflowResponse { + @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 OpenAICodexDoraIntegrationDataflowResponse 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 OpenAICodexDoraIntegrationDataflowResponse + */ + @JsonAnySetter + public OpenAICodexDoraIntegrationDataflowResponse 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 OpenAICodexDoraIntegrationDataflowResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexDoraIntegrationDataflowResponse openAiCodexDoraIntegrationDataflowResponse = + (OpenAICodexDoraIntegrationDataflowResponse) o; + return Objects.equals(this.enabled, openAiCodexDoraIntegrationDataflowResponse.enabled) + && Objects.equals(this.status, openAiCodexDoraIntegrationDataflowResponse.status) + && Objects.equals( + this.additionalProperties, + openAiCodexDoraIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexDoraIntegrationDataflowResponse {\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/OpenAICodexIntegrationAccountAuthenticationRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountAuthenticationRequest.java new file mode 100644 index 00000000000..1d32b7d70d1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountAuthenticationRequest.java @@ -0,0 +1,248 @@ +/* + * 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 = + OpenAICodexIntegrationAccountAuthenticationRequest + .OpenAICodexIntegrationAccountAuthenticationRequestDeserializer.class) +@JsonSerialize( + using = + OpenAICodexIntegrationAccountAuthenticationRequest + .OpenAICodexIntegrationAccountAuthenticationRequestSerializer.class) +public class OpenAICodexIntegrationAccountAuthenticationRequest extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(OpenAICodexIntegrationAccountAuthenticationRequest.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class OpenAICodexIntegrationAccountAuthenticationRequestSerializer + extends StdSerializer { + public OpenAICodexIntegrationAccountAuthenticationRequestSerializer( + Class t) { + super(t); + } + + public OpenAICodexIntegrationAccountAuthenticationRequestSerializer() { + this(null); + } + + @Override + public void serialize( + OpenAICodexIntegrationAccountAuthenticationRequest value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class OpenAICodexIntegrationAccountAuthenticationRequestDeserializer + extends StdDeserializer { + public OpenAICodexIntegrationAccountAuthenticationRequestDeserializer() { + this(OpenAICodexIntegrationAccountAuthenticationRequest.class); + } + + public OpenAICodexIntegrationAccountAuthenticationRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public OpenAICodexIntegrationAccountAuthenticationRequest 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 OpenAICodexIntegrationAccountBearerTokenAuthRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(Integer.class) + || OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(Long.class) + || OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(Float.class) + || OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(Double.class) + || OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(Boolean.class) + || OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(Integer.class) + || OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(Float.class) + || OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OpenAICodexIntegrationAccountBearerTokenAuthRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(OpenAICodexIntegrationAccountBearerTokenAuthRequest.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 (!((OpenAICodexIntegrationAccountBearerTokenAuthRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'OpenAICodexIntegrationAccountBearerTokenAuthRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'OpenAICodexIntegrationAccountBearerTokenAuthRequest'", + e); + } + + OpenAICodexIntegrationAccountAuthenticationRequest ret = + new OpenAICodexIntegrationAccountAuthenticationRequest(); + 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 OpenAICodexIntegrationAccountAuthenticationRequest getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "OpenAICodexIntegrationAccountAuthenticationRequest cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public OpenAICodexIntegrationAccountAuthenticationRequest() { + super("oneOf", Boolean.FALSE); + } + + public OpenAICodexIntegrationAccountAuthenticationRequest( + OpenAICodexIntegrationAccountBearerTokenAuthRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "OpenAICodexIntegrationAccountBearerTokenAuthRequest", + new GenericType() {}); + JSON.registerDescendants( + OpenAICodexIntegrationAccountAuthenticationRequest.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return OpenAICodexIntegrationAccountAuthenticationRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: OpenAICodexIntegrationAccountBearerTokenAuthRequest + * + *

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

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

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( + OpenAICodexIntegrationAccountBearerTokenAuthUpdate.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 OpenAICodexIntegrationAccountBearerTokenAuthUpdate"); + } + + /** + * Get the actual instance, which can be the following: + * OpenAICodexIntegrationAccountBearerTokenAuthUpdate + * + * @return The actual instance (OpenAICodexIntegrationAccountBearerTokenAuthUpdate) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `OpenAICodexIntegrationAccountBearerTokenAuthUpdate`. If the actual + * instance is not `OpenAICodexIntegrationAccountBearerTokenAuthUpdate`, the ClassCastException + * will be thrown. + * + * @return The actual instance of `OpenAICodexIntegrationAccountBearerTokenAuthUpdate` + * @throws ClassCastException if the instance is not + * `OpenAICodexIntegrationAccountBearerTokenAuthUpdate` + */ + public OpenAICodexIntegrationAccountBearerTokenAuthUpdate + getOpenAICodexIntegrationAccountBearerTokenAuthUpdate() throws ClassCastException { + return (OpenAICodexIntegrationAccountBearerTokenAuthUpdate) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthRequest.java new file mode 100644 index 00000000000..ae83903dfba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthRequest.java @@ -0,0 +1,135 @@ +/* + * 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 a workspace-scoped OpenAI Admin key with the + * codex.enterprise.analytics.read scope. + */ +@JsonPropertyOrder({ + OpenAICodexIntegrationAccountBearerTokenAuthRequest.JSON_PROPERTY_AUTH_TYPE, + OpenAICodexIntegrationAccountBearerTokenAuthRequest.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountBearerTokenAuthRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private OpenAICodexIntegrationAccountBearerTokenAuthType authType = + OpenAICodexIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public OpenAICodexIntegrationAccountBearerTokenAuthRequest() {} + + @JsonCreator + public OpenAICodexIntegrationAccountBearerTokenAuthRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + OpenAICodexIntegrationAccountBearerTokenAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_TOKEN) String token) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.token = token; + } + + public OpenAICodexIntegrationAccountBearerTokenAuthRequest authType( + OpenAICodexIntegrationAccountBearerTokenAuthType 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 OpenAICodexIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(OpenAICodexIntegrationAccountBearerTokenAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public OpenAICodexIntegrationAccountBearerTokenAuthRequest token(String token) { + this.token = token; + return this; + } + + /** + * Secret token used to authenticate with OpenAI Codex. + * + * @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 OpenAICodexIntegrationAccountBearerTokenAuthRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountBearerTokenAuthRequest + openAiCodexIntegrationAccountBearerTokenAuthRequest = + (OpenAICodexIntegrationAccountBearerTokenAuthRequest) o; + return Objects.equals( + this.authType, openAiCodexIntegrationAccountBearerTokenAuthRequest.authType) + && Objects.equals(this.token, openAiCodexIntegrationAccountBearerTokenAuthRequest.token); + } + + @Override + public int hashCode() { + return Objects.hash(authType, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountBearerTokenAuthRequest {\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/OpenAICodexIntegrationAccountBearerTokenAuthResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthResponse.java new file mode 100644 index 00000000000..671cea64271 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthResponse.java @@ -0,0 +1,159 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The bearer token authentication method configured on the account. */ +@JsonPropertyOrder({OpenAICodexIntegrationAccountBearerTokenAuthResponse.JSON_PROPERTY_AUTH_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountBearerTokenAuthResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private OpenAICodexIntegrationAccountBearerTokenAuthType authType = + OpenAICodexIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public OpenAICodexIntegrationAccountBearerTokenAuthResponse() {} + + @JsonCreator + public OpenAICodexIntegrationAccountBearerTokenAuthResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + OpenAICodexIntegrationAccountBearerTokenAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public OpenAICodexIntegrationAccountBearerTokenAuthResponse authType( + OpenAICodexIntegrationAccountBearerTokenAuthType 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 OpenAICodexIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(OpenAICodexIntegrationAccountBearerTokenAuthType 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 OpenAICodexIntegrationAccountBearerTokenAuthResponse + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountBearerTokenAuthResponse 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 OpenAICodexIntegrationAccountBearerTokenAuthResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountBearerTokenAuthResponse + openAiCodexIntegrationAccountBearerTokenAuthResponse = + (OpenAICodexIntegrationAccountBearerTokenAuthResponse) o; + return Objects.equals( + this.authType, openAiCodexIntegrationAccountBearerTokenAuthResponse.authType) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountBearerTokenAuthResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountBearerTokenAuthResponse {\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/OpenAICodexIntegrationAccountBearerTokenAuthType.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthType.java new file mode 100644 index 00000000000..342935d05b4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthType.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 = + OpenAICodexIntegrationAccountBearerTokenAuthType + .OpenAICodexIntegrationAccountBearerTokenAuthTypeSerializer.class) +public class OpenAICodexIntegrationAccountBearerTokenAuthType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("bearer_token")); + + public static final OpenAICodexIntegrationAccountBearerTokenAuthType BEARER_TOKEN = + new OpenAICodexIntegrationAccountBearerTokenAuthType("bearer_token"); + + OpenAICodexIntegrationAccountBearerTokenAuthType(String value) { + super(value, allowedValues); + } + + public static class OpenAICodexIntegrationAccountBearerTokenAuthTypeSerializer + extends StdSerializer { + public OpenAICodexIntegrationAccountBearerTokenAuthTypeSerializer( + Class t) { + super(t); + } + + public OpenAICodexIntegrationAccountBearerTokenAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OpenAICodexIntegrationAccountBearerTokenAuthType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OpenAICodexIntegrationAccountBearerTokenAuthType fromValue(String value) { + return new OpenAICodexIntegrationAccountBearerTokenAuthType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthUpdate.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthUpdate.java new file mode 100644 index 00000000000..7be8292e013 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountBearerTokenAuthUpdate.java @@ -0,0 +1,135 @@ +/* + * 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 a workspace-scoped OpenAI Admin key with the + * codex.enterprise.analytics.read scope. Only the fields provided are changed; omit + * token to keep the stored one. + */ +@JsonPropertyOrder({ + OpenAICodexIntegrationAccountBearerTokenAuthUpdate.JSON_PROPERTY_AUTH_TYPE, + OpenAICodexIntegrationAccountBearerTokenAuthUpdate.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountBearerTokenAuthUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private OpenAICodexIntegrationAccountBearerTokenAuthType authType = + OpenAICodexIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public OpenAICodexIntegrationAccountBearerTokenAuthUpdate() {} + + @JsonCreator + public OpenAICodexIntegrationAccountBearerTokenAuthUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + OpenAICodexIntegrationAccountBearerTokenAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public OpenAICodexIntegrationAccountBearerTokenAuthUpdate authType( + OpenAICodexIntegrationAccountBearerTokenAuthType 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 OpenAICodexIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(OpenAICodexIntegrationAccountBearerTokenAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public OpenAICodexIntegrationAccountBearerTokenAuthUpdate token(String token) { + this.token = token; + return this; + } + + /** + * Secret token used to authenticate with OpenAI Codex. + * + * @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 OpenAICodexIntegrationAccountBearerTokenAuthUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountBearerTokenAuthUpdate + openAiCodexIntegrationAccountBearerTokenAuthUpdate = + (OpenAICodexIntegrationAccountBearerTokenAuthUpdate) o; + return Objects.equals( + this.authType, openAiCodexIntegrationAccountBearerTokenAuthUpdate.authType) + && Objects.equals(this.token, openAiCodexIntegrationAccountBearerTokenAuthUpdate.token); + } + + @Override + public int hashCode() { + return Objects.hash(authType, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountBearerTokenAuthUpdate {\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/OpenAICodexIntegrationAccountCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateAttributes.java new file mode 100644 index 00000000000..fc06b4faa8c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateAttributes.java @@ -0,0 +1,257 @@ +/* + * 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 an OpenAI Codex integration account. */ +@JsonPropertyOrder({ + OpenAICodexIntegrationAccountCreateAttributes.JSON_PROPERTY_AUTHENTICATION, + OpenAICodexIntegrationAccountCreateAttributes.JSON_PROPERTY_DATAFLOWS, + OpenAICodexIntegrationAccountCreateAttributes.JSON_PROPERTY_NAME, + OpenAICodexIntegrationAccountCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private OpenAICodexIntegrationAccountAuthenticationRequest authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private OpenAICodexIntegrationDataflowsRequest dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private OpenAICodexIntegrationAccountSettingsRequest settings; + + public OpenAICodexIntegrationAccountCreateAttributes() {} + + @JsonCreator + public OpenAICodexIntegrationAccountCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTHENTICATION) + OpenAICodexIntegrationAccountAuthenticationRequest authentication, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) + OpenAICodexIntegrationAccountSettingsRequest settings) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + this.name = name; + this.settings = settings; + this.unparsed |= settings.unparsed; + } + + public OpenAICodexIntegrationAccountCreateAttributes authentication( + OpenAICodexIntegrationAccountAuthenticationRequest authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for creating the OpenAI Codex integration account. Exactly one method is set. + * + * @return authentication + */ + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAICodexIntegrationAccountAuthenticationRequest getAuthentication() { + return authentication; + } + + public void setAuthentication(OpenAICodexIntegrationAccountAuthenticationRequest authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public OpenAICodexIntegrationAccountCreateAttributes dataflows( + OpenAICodexIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from OpenAI Codex, keyed by dataflow id. Daily Codex analytics metrics + * are always collected; each dataflow here adds a further kind of collection on top of that + * baseline, so 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 an OpenAI enterprise subscription with Codex enabled; 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 OpenAICodexIntegrationDataflowsRequest getDataflows() { + return dataflows; + } + + public void setDataflows(OpenAICodexIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public OpenAICodexIntegrationAccountCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the OpenAI Codex 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 OpenAICodexIntegrationAccountCreateAttributes settings( + OpenAICodexIntegrationAccountSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for creating the OpenAI Codex integration account. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAICodexIntegrationAccountSettingsRequest getSettings() { + return settings; + } + + public void setSettings(OpenAICodexIntegrationAccountSettingsRequest 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 OpenAICodexIntegrationAccountCreateAttributes + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountCreateAttributes 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 OpenAICodexIntegrationAccountCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountCreateAttributes openAiCodexIntegrationAccountCreateAttributes = + (OpenAICodexIntegrationAccountCreateAttributes) o; + return Objects.equals( + this.authentication, openAiCodexIntegrationAccountCreateAttributes.authentication) + && Objects.equals(this.dataflows, openAiCodexIntegrationAccountCreateAttributes.dataflows) + && Objects.equals(this.name, openAiCodexIntegrationAccountCreateAttributes.name) + && Objects.equals(this.settings, openAiCodexIntegrationAccountCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountCreateAttributes {\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/OpenAICodexIntegrationAccountCreateData.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateData.java new file mode 100644 index 00000000000..d4df17205c8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateData.java @@ -0,0 +1,188 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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 an OpenAI Codex integration account. */ +@JsonPropertyOrder({ + OpenAICodexIntegrationAccountCreateData.JSON_PROPERTY_ATTRIBUTES, + OpenAICodexIntegrationAccountCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OpenAICodexIntegrationAccountCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public OpenAICodexIntegrationAccountCreateData() {} + + @JsonCreator + public OpenAICodexIntegrationAccountCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OpenAICodexIntegrationAccountCreateAttributes 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 OpenAICodexIntegrationAccountCreateData attributes( + OpenAICodexIntegrationAccountCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Writable attributes used to create an OpenAI Codex integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAICodexIntegrationAccountCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OpenAICodexIntegrationAccountCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public OpenAICodexIntegrationAccountCreateData 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 OpenAICodexIntegrationAccountCreateData + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountCreateData 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 OpenAICodexIntegrationAccountCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountCreateData openAiCodexIntegrationAccountCreateData = + (OpenAICodexIntegrationAccountCreateData) o; + return Objects.equals(this.attributes, openAiCodexIntegrationAccountCreateData.attributes) + && Objects.equals(this.type, openAiCodexIntegrationAccountCreateData.type) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountCreateData {\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/OpenAICodexIntegrationAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateRequest.java new file mode 100644 index 00000000000..a268aab2b6e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountCreateRequest.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; + +/** Request payload to create an OpenAI Codex integration account. */ +@JsonPropertyOrder({OpenAICodexIntegrationAccountCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OpenAICodexIntegrationAccountCreateData data; + + public OpenAICodexIntegrationAccountCreateRequest() {} + + @JsonCreator + public OpenAICodexIntegrationAccountCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OpenAICodexIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OpenAICodexIntegrationAccountCreateRequest data( + OpenAICodexIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for creating an OpenAI Codex integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAICodexIntegrationAccountCreateData getData() { + return data; + } + + public void setData(OpenAICodexIntegrationAccountCreateData 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 OpenAICodexIntegrationAccountCreateRequest + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountCreateRequest 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 OpenAICodexIntegrationAccountCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountCreateRequest openAiCodexIntegrationAccountCreateRequest = + (OpenAICodexIntegrationAccountCreateRequest) o; + return Objects.equals(this.data, openAiCodexIntegrationAccountCreateRequest.data) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountCreateRequest {\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/OpenAICodexIntegrationAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponse.java new file mode 100644 index 00000000000..813a52b8d93 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponse.java @@ -0,0 +1,152 @@ +/* + * 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 OpenAI Codex integration account. */ +@JsonPropertyOrder({OpenAICodexIntegrationAccountResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OpenAICodexIntegrationAccountResponseData data; + + public OpenAICodexIntegrationAccountResponse() {} + + @JsonCreator + public OpenAICodexIntegrationAccountResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OpenAICodexIntegrationAccountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OpenAICodexIntegrationAccountResponse data( + OpenAICodexIntegrationAccountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope of an OpenAI Codex integration account, including server-assigned identity. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAICodexIntegrationAccountResponseData getData() { + return data; + } + + public void setData(OpenAICodexIntegrationAccountResponseData 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 OpenAICodexIntegrationAccountResponse + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountResponse 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 OpenAICodexIntegrationAccountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountResponse openAiCodexIntegrationAccountResponse = + (OpenAICodexIntegrationAccountResponse) o; + return Objects.equals(this.data, openAiCodexIntegrationAccountResponse.data) + && Objects.equals( + this.additionalProperties, openAiCodexIntegrationAccountResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountResponse {\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/OpenAICodexIntegrationAccountResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponseAttributes.java new file mode 100644 index 00000000000..c302ed6e8be --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponseAttributes.java @@ -0,0 +1,251 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an OpenAI Codex integration account returned in responses. */ +@JsonPropertyOrder({ + OpenAICodexIntegrationAccountResponseAttributes.JSON_PROPERTY_AUTHENTICATION, + OpenAICodexIntegrationAccountResponseAttributes.JSON_PROPERTY_DATAFLOWS, + OpenAICodexIntegrationAccountResponseAttributes.JSON_PROPERTY_NAME, + OpenAICodexIntegrationAccountResponseAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private OpenAICodexIntegrationAccountAuthenticationResponse authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private OpenAICodexIntegrationDataflowsResponse dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private OpenAICodexIntegrationAccountSettingsResponse settings; + + public OpenAICodexIntegrationAccountResponseAttributes() {} + + @JsonCreator + public OpenAICodexIntegrationAccountResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) + OpenAICodexIntegrationAccountSettingsResponse settings) { + this.name = name; + this.settings = settings; + this.unparsed |= settings.unparsed; + } + + public OpenAICodexIntegrationAccountResponseAttributes authentication( + OpenAICodexIntegrationAccountAuthenticationResponse authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication configured on the OpenAI Codex integration account. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexIntegrationAccountAuthenticationResponse getAuthentication() { + return authentication; + } + + public void setAuthentication( + OpenAICodexIntegrationAccountAuthenticationResponse authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public OpenAICodexIntegrationAccountResponseAttributes dataflows( + OpenAICodexIntegrationDataflowsResponse dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from OpenAI Codex, keyed by dataflow id. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexIntegrationDataflowsResponse getDataflows() { + return dataflows; + } + + public void setDataflows(OpenAICodexIntegrationDataflowsResponse dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public OpenAICodexIntegrationAccountResponseAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the OpenAI Codex 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 OpenAICodexIntegrationAccountResponseAttributes settings( + OpenAICodexIntegrationAccountSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings configured on the OpenAI Codex integration account. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAICodexIntegrationAccountSettingsResponse getSettings() { + return settings; + } + + public void setSettings(OpenAICodexIntegrationAccountSettingsResponse 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 OpenAICodexIntegrationAccountResponseAttributes + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountResponseAttributes 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 OpenAICodexIntegrationAccountResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountResponseAttributes + openAiCodexIntegrationAccountResponseAttributes = + (OpenAICodexIntegrationAccountResponseAttributes) o; + return Objects.equals( + this.authentication, openAiCodexIntegrationAccountResponseAttributes.authentication) + && Objects.equals(this.dataflows, openAiCodexIntegrationAccountResponseAttributes.dataflows) + && Objects.equals(this.name, openAiCodexIntegrationAccountResponseAttributes.name) + && Objects.equals(this.settings, openAiCodexIntegrationAccountResponseAttributes.settings) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountResponseAttributes {\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/OpenAICodexIntegrationAccountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponseData.java new file mode 100644 index 00000000000..f8946768b79 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountResponseData.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope of an OpenAI Codex integration account, including server-assigned identity. */ +@JsonPropertyOrder({ + OpenAICodexIntegrationAccountResponseData.JSON_PROPERTY_ATTRIBUTES, + OpenAICodexIntegrationAccountResponseData.JSON_PROPERTY_ID, + OpenAICodexIntegrationAccountResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OpenAICodexIntegrationAccountResponseAttributes 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 OpenAICodexIntegrationAccountResponseData() {} + + @JsonCreator + public OpenAICodexIntegrationAccountResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OpenAICodexIntegrationAccountResponseAttributes 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 OpenAICodexIntegrationAccountResponseData attributes( + OpenAICodexIntegrationAccountResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an OpenAI Codex integration account returned in responses. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAICodexIntegrationAccountResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OpenAICodexIntegrationAccountResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + /** + * Server-generated unique identifier of the OpenAI Codex integration account. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public OpenAICodexIntegrationAccountResponseData 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 OpenAICodexIntegrationAccountResponseData + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountResponseData 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 OpenAICodexIntegrationAccountResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountResponseData openAiCodexIntegrationAccountResponseData = + (OpenAICodexIntegrationAccountResponseData) o; + return Objects.equals(this.attributes, openAiCodexIntegrationAccountResponseData.attributes) + && Objects.equals(this.id, openAiCodexIntegrationAccountResponseData.id) + && Objects.equals(this.type, openAiCodexIntegrationAccountResponseData.type) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountResponseData {\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/OpenAICodexIntegrationAccountSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsRequest.java new file mode 100644 index 00000000000..9ef27c2efa2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsRequest.java @@ -0,0 +1,92 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.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 OpenAI Codex integration account. */ +@JsonPropertyOrder({OpenAICodexIntegrationAccountSettingsRequest.JSON_PROPERTY_CODEX_WORKSPACE_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountSettingsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CODEX_WORKSPACE_ID = "codex_workspace_id"; + private String codexWorkspaceId; + + public OpenAICodexIntegrationAccountSettingsRequest() {} + + @JsonCreator + public OpenAICodexIntegrationAccountSettingsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_CODEX_WORKSPACE_ID) + String codexWorkspaceId) { + this.codexWorkspaceId = codexWorkspaceId; + } + + public OpenAICodexIntegrationAccountSettingsRequest codexWorkspaceId(String codexWorkspaceId) { + this.codexWorkspaceId = codexWorkspaceId; + return this; + } + + /** + * ID of the Codex workspace to collect data from. + * + * @return codexWorkspaceId + */ + @JsonProperty(JSON_PROPERTY_CODEX_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCodexWorkspaceId() { + return codexWorkspaceId; + } + + public void setCodexWorkspaceId(String codexWorkspaceId) { + this.codexWorkspaceId = codexWorkspaceId; + } + + /** Return true if this OpenAICodexIntegrationAccountSettingsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountSettingsRequest openAiCodexIntegrationAccountSettingsRequest = + (OpenAICodexIntegrationAccountSettingsRequest) o; + return Objects.equals( + this.codexWorkspaceId, openAiCodexIntegrationAccountSettingsRequest.codexWorkspaceId); + } + + @Override + public int hashCode() { + return Objects.hash(codexWorkspaceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountSettingsRequest {\n"); + sb.append(" codexWorkspaceId: ").append(toIndentedString(codexWorkspaceId)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/OpenAICodexIntegrationAccountSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsResponse.java new file mode 100644 index 00000000000..8953ccb963c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsResponse.java @@ -0,0 +1,149 @@ +/* + * 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 OpenAI Codex integration account. */ +@JsonPropertyOrder({OpenAICodexIntegrationAccountSettingsResponse.JSON_PROPERTY_CODEX_WORKSPACE_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountSettingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CODEX_WORKSPACE_ID = "codex_workspace_id"; + private String codexWorkspaceId; + + public OpenAICodexIntegrationAccountSettingsResponse() {} + + @JsonCreator + public OpenAICodexIntegrationAccountSettingsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CODEX_WORKSPACE_ID) + String codexWorkspaceId) { + this.codexWorkspaceId = codexWorkspaceId; + } + + public OpenAICodexIntegrationAccountSettingsResponse codexWorkspaceId(String codexWorkspaceId) { + this.codexWorkspaceId = codexWorkspaceId; + return this; + } + + /** + * ID of the Codex workspace to collect data from. + * + * @return codexWorkspaceId + */ + @JsonProperty(JSON_PROPERTY_CODEX_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCodexWorkspaceId() { + return codexWorkspaceId; + } + + public void setCodexWorkspaceId(String codexWorkspaceId) { + this.codexWorkspaceId = codexWorkspaceId; + } + + /** + * 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 OpenAICodexIntegrationAccountSettingsResponse + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountSettingsResponse 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 OpenAICodexIntegrationAccountSettingsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountSettingsResponse openAiCodexIntegrationAccountSettingsResponse = + (OpenAICodexIntegrationAccountSettingsResponse) o; + return Objects.equals( + this.codexWorkspaceId, openAiCodexIntegrationAccountSettingsResponse.codexWorkspaceId) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountSettingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(codexWorkspaceId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountSettingsResponse {\n"); + sb.append(" codexWorkspaceId: ").append(toIndentedString(codexWorkspaceId)).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/OpenAICodexIntegrationAccountSettingsUpdate.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsUpdate.java new file mode 100644 index 00000000000..cd3331b9f2f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountSettingsUpdate.java @@ -0,0 +1,85 @@ +/* + * 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 OpenAI Codex integration account. Only the fields provided are changed. + */ +@JsonPropertyOrder({OpenAICodexIntegrationAccountSettingsUpdate.JSON_PROPERTY_CODEX_WORKSPACE_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountSettingsUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CODEX_WORKSPACE_ID = "codex_workspace_id"; + private String codexWorkspaceId; + + public OpenAICodexIntegrationAccountSettingsUpdate codexWorkspaceId(String codexWorkspaceId) { + this.codexWorkspaceId = codexWorkspaceId; + return this; + } + + /** + * ID of the Codex workspace to collect data from. + * + * @return codexWorkspaceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODEX_WORKSPACE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCodexWorkspaceId() { + return codexWorkspaceId; + } + + public void setCodexWorkspaceId(String codexWorkspaceId) { + this.codexWorkspaceId = codexWorkspaceId; + } + + /** Return true if this OpenAICodexIntegrationAccountSettingsUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountSettingsUpdate openAiCodexIntegrationAccountSettingsUpdate = + (OpenAICodexIntegrationAccountSettingsUpdate) o; + return Objects.equals( + this.codexWorkspaceId, openAiCodexIntegrationAccountSettingsUpdate.codexWorkspaceId); + } + + @Override + public int hashCode() { + return Objects.hash(codexWorkspaceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountSettingsUpdate {\n"); + sb.append(" codexWorkspaceId: ").append(toIndentedString(codexWorkspaceId)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/OpenAICodexIntegrationAccountUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateAttributes.java new file mode 100644 index 00000000000..feeeb0f42c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateAttributes.java @@ -0,0 +1,249 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Writable attributes used to update an OpenAI Codex 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({ + OpenAICodexIntegrationAccountUpdateAttributes.JSON_PROPERTY_AUTHENTICATION, + OpenAICodexIntegrationAccountUpdateAttributes.JSON_PROPERTY_DATAFLOWS, + OpenAICodexIntegrationAccountUpdateAttributes.JSON_PROPERTY_NAME, + OpenAICodexIntegrationAccountUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private OpenAICodexIntegrationAccountAuthenticationUpdate authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private OpenAICodexIntegrationDataflowsRequest dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private OpenAICodexIntegrationAccountSettingsUpdate settings; + + public OpenAICodexIntegrationAccountUpdateAttributes authentication( + OpenAICodexIntegrationAccountAuthenticationUpdate authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for updating the OpenAI Codex integration account. Exactly one method is set. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexIntegrationAccountAuthenticationUpdate getAuthentication() { + return authentication; + } + + public void setAuthentication(OpenAICodexIntegrationAccountAuthenticationUpdate authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public OpenAICodexIntegrationAccountUpdateAttributes dataflows( + OpenAICodexIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from OpenAI Codex, keyed by dataflow id. Daily Codex analytics metrics + * are always collected; each dataflow here adds a further kind of collection on top of that + * baseline, so 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 an OpenAI enterprise subscription with Codex enabled; 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 OpenAICodexIntegrationDataflowsRequest getDataflows() { + return dataflows; + } + + public void setDataflows(OpenAICodexIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public OpenAICodexIntegrationAccountUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the OpenAI Codex 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 OpenAICodexIntegrationAccountUpdateAttributes settings( + OpenAICodexIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for updating the OpenAI Codex integration account. Only the fields provided are + * changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexIntegrationAccountSettingsUpdate getSettings() { + return settings; + } + + public void setSettings(OpenAICodexIntegrationAccountSettingsUpdate 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 OpenAICodexIntegrationAccountUpdateAttributes + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountUpdateAttributes 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 OpenAICodexIntegrationAccountUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountUpdateAttributes openAiCodexIntegrationAccountUpdateAttributes = + (OpenAICodexIntegrationAccountUpdateAttributes) o; + return Objects.equals( + this.authentication, openAiCodexIntegrationAccountUpdateAttributes.authentication) + && Objects.equals(this.dataflows, openAiCodexIntegrationAccountUpdateAttributes.dataflows) + && Objects.equals(this.name, openAiCodexIntegrationAccountUpdateAttributes.name) + && Objects.equals(this.settings, openAiCodexIntegrationAccountUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountUpdateAttributes {\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/OpenAICodexIntegrationAccountUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateData.java new file mode 100644 index 00000000000..bc62624ea88 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateData.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope for updating an OpenAI Codex integration account. */ +@JsonPropertyOrder({ + OpenAICodexIntegrationAccountUpdateData.JSON_PROPERTY_ATTRIBUTES, + OpenAICodexIntegrationAccountUpdateData.JSON_PROPERTY_ID, + OpenAICodexIntegrationAccountUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OpenAICodexIntegrationAccountUpdateAttributes 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 OpenAICodexIntegrationAccountUpdateData() {} + + @JsonCreator + public OpenAICodexIntegrationAccountUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OpenAICodexIntegrationAccountUpdateAttributes 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 OpenAICodexIntegrationAccountUpdateData attributes( + OpenAICodexIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Writable attributes used to update an OpenAI Codex 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 OpenAICodexIntegrationAccountUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OpenAICodexIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public OpenAICodexIntegrationAccountUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the OpenAI Codex 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 OpenAICodexIntegrationAccountUpdateData 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 OpenAICodexIntegrationAccountUpdateData + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountUpdateData 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 OpenAICodexIntegrationAccountUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountUpdateData openAiCodexIntegrationAccountUpdateData = + (OpenAICodexIntegrationAccountUpdateData) o; + return Objects.equals(this.attributes, openAiCodexIntegrationAccountUpdateData.attributes) + && Objects.equals(this.id, openAiCodexIntegrationAccountUpdateData.id) + && Objects.equals(this.type, openAiCodexIntegrationAccountUpdateData.type) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountUpdateData {\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/OpenAICodexIntegrationAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateRequest.java new file mode 100644 index 00000000000..dab8b7ec9fc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountUpdateRequest.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; + +/** Request payload to update an OpenAI Codex integration account. */ +@JsonPropertyOrder({OpenAICodexIntegrationAccountUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OpenAICodexIntegrationAccountUpdateData data; + + public OpenAICodexIntegrationAccountUpdateRequest() {} + + @JsonCreator + public OpenAICodexIntegrationAccountUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OpenAICodexIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OpenAICodexIntegrationAccountUpdateRequest data( + OpenAICodexIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for updating an OpenAI Codex integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAICodexIntegrationAccountUpdateData getData() { + return data; + } + + public void setData(OpenAICodexIntegrationAccountUpdateData 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 OpenAICodexIntegrationAccountUpdateRequest + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountUpdateRequest 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 OpenAICodexIntegrationAccountUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountUpdateRequest openAiCodexIntegrationAccountUpdateRequest = + (OpenAICodexIntegrationAccountUpdateRequest) o; + return Objects.equals(this.data, openAiCodexIntegrationAccountUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationAccountUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountUpdateRequest {\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/OpenAICodexIntegrationAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountsResponse.java new file mode 100644 index 00000000000..eae553c0597 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationAccountsResponse.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response payload for a list of OpenAI Codex integration accounts. */ +@JsonPropertyOrder({OpenAICodexIntegrationAccountsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationAccountsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public OpenAICodexIntegrationAccountsResponse() {} + + @JsonCreator + public OpenAICodexIntegrationAccountsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (OpenAICodexIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + + public OpenAICodexIntegrationAccountsResponse data( + List data) { + this.data = data; + for (OpenAICodexIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public OpenAICodexIntegrationAccountsResponse addDataItem( + OpenAICodexIntegrationAccountResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of OpenAI Codex 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 (OpenAICodexIntegrationAccountResponseData 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 OpenAICodexIntegrationAccountsResponse + */ + @JsonAnySetter + public OpenAICodexIntegrationAccountsResponse 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 OpenAICodexIntegrationAccountsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationAccountsResponse openAiCodexIntegrationAccountsResponse = + (OpenAICodexIntegrationAccountsResponse) o; + return Objects.equals(this.data, openAiCodexIntegrationAccountsResponse.data) + && Objects.equals( + this.additionalProperties, openAiCodexIntegrationAccountsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationAccountsResponse {\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/OpenAICodexIntegrationDataflowsRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationDataflowsRequest.java new file mode 100644 index 00000000000..ff8519b74f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationDataflowsRequest.java @@ -0,0 +1,141 @@ +/* + * 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 OpenAI Codex, keyed by dataflow id. Daily Codex analytics metrics are + * always collected; each dataflow here adds a further kind of collection on top of that baseline, + * so 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 + * an OpenAI enterprise subscription with Codex enabled; a dataflow enabled without it is stored but + * collects no data. + */ +@JsonPropertyOrder({ + OpenAICodexIntegrationDataflowsRequest.JSON_PROPERTY_OPENAI_CODEX_DORA, + OpenAICodexIntegrationDataflowsRequest.JSON_PROPERTY_OPENAI_CODEX_TURN_METRICS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationDataflowsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OPENAI_CODEX_DORA = "openai-codex-dora"; + private OpenAICodexDoraIntegrationDataflowRequest openaiCodexDora; + + public static final String JSON_PROPERTY_OPENAI_CODEX_TURN_METRICS = "openai-codex-turn-metrics"; + private OpenAICodexTurnMetricsIntegrationDataflowRequest openaiCodexTurnMetrics; + + public OpenAICodexIntegrationDataflowsRequest openaiCodexDora( + OpenAICodexDoraIntegrationDataflowRequest openaiCodexDora) { + this.openaiCodexDora = openaiCodexDora; + this.unparsed |= openaiCodexDora.unparsed; + return this; + } + + /** + * A daily per-engineer engagement signal that AI Impact uses to + * attribute AI-assisted pull requests. + * + * @return openaiCodexDora + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_CODEX_DORA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexDoraIntegrationDataflowRequest getOpenaiCodexDora() { + return openaiCodexDora; + } + + public void setOpenaiCodexDora(OpenAICodexDoraIntegrationDataflowRequest openaiCodexDora) { + this.openaiCodexDora = openaiCodexDora; + if (openaiCodexDora != null) { + this.unparsed |= openaiCodexDora.unparsed; + } + } + + public OpenAICodexIntegrationDataflowsRequest openaiCodexTurnMetrics( + OpenAICodexTurnMetricsIntegrationDataflowRequest openaiCodexTurnMetrics) { + this.openaiCodexTurnMetrics = openaiCodexTurnMetrics; + this.unparsed |= openaiCodexTurnMetrics.unparsed; + return this; + } + + /** + * Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session + * identity, Work Insights classification, token usage, credits, estimated cost, duration, and + * skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from + * invoiced charges. Requires the + * chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read scope on the key in + * authentication; without it this dataflow collects no data. + * + * @return openaiCodexTurnMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_CODEX_TURN_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexTurnMetricsIntegrationDataflowRequest getOpenaiCodexTurnMetrics() { + return openaiCodexTurnMetrics; + } + + public void setOpenaiCodexTurnMetrics( + OpenAICodexTurnMetricsIntegrationDataflowRequest openaiCodexTurnMetrics) { + this.openaiCodexTurnMetrics = openaiCodexTurnMetrics; + if (openaiCodexTurnMetrics != null) { + this.unparsed |= openaiCodexTurnMetrics.unparsed; + } + } + + /** Return true if this OpenAICodexIntegrationDataflowsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationDataflowsRequest openAiCodexIntegrationDataflowsRequest = + (OpenAICodexIntegrationDataflowsRequest) o; + return Objects.equals( + this.openaiCodexDora, openAiCodexIntegrationDataflowsRequest.openaiCodexDora) + && Objects.equals( + this.openaiCodexTurnMetrics, + openAiCodexIntegrationDataflowsRequest.openaiCodexTurnMetrics); + } + + @Override + public int hashCode() { + return Objects.hash(openaiCodexDora, openaiCodexTurnMetrics); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationDataflowsRequest {\n"); + sb.append(" openaiCodexDora: ").append(toIndentedString(openaiCodexDora)).append("\n"); + sb.append(" openaiCodexTurnMetrics: ") + .append(toIndentedString(openaiCodexTurnMetrics)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/OpenAICodexIntegrationDataflowsResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationDataflowsResponse.java new file mode 100644 index 00000000000..86fab165adb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexIntegrationDataflowsResponse.java @@ -0,0 +1,228 @@ +/* + * 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 OpenAI Codex, keyed by dataflow id. */ +@JsonPropertyOrder({ + OpenAICodexIntegrationDataflowsResponse.JSON_PROPERTY_OPENAI_CODEX_DORA, + OpenAICodexIntegrationDataflowsResponse.JSON_PROPERTY_OPENAI_CODEX_METRICS, + OpenAICodexIntegrationDataflowsResponse.JSON_PROPERTY_OPENAI_CODEX_TURN_METRICS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexIntegrationDataflowsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OPENAI_CODEX_DORA = "openai-codex-dora"; + private OpenAICodexDoraIntegrationDataflowResponse openaiCodexDora; + + public static final String JSON_PROPERTY_OPENAI_CODEX_METRICS = "openai-codex-metrics"; + private OpenAICodexMetricsIntegrationDataflowResponse openaiCodexMetrics; + + public static final String JSON_PROPERTY_OPENAI_CODEX_TURN_METRICS = "openai-codex-turn-metrics"; + private OpenAICodexTurnMetricsIntegrationDataflowResponse openaiCodexTurnMetrics; + + public OpenAICodexIntegrationDataflowsResponse openaiCodexDora( + OpenAICodexDoraIntegrationDataflowResponse openaiCodexDora) { + this.openaiCodexDora = openaiCodexDora; + this.unparsed |= openaiCodexDora.unparsed; + return this; + } + + /** + * A daily per-engineer engagement signal that AI Impact uses to + * attribute AI-assisted pull requests. + * + * @return openaiCodexDora + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_CODEX_DORA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexDoraIntegrationDataflowResponse getOpenaiCodexDora() { + return openaiCodexDora; + } + + public void setOpenaiCodexDora(OpenAICodexDoraIntegrationDataflowResponse openaiCodexDora) { + this.openaiCodexDora = openaiCodexDora; + if (openaiCodexDora != null) { + this.unparsed |= openaiCodexDora.unparsed; + } + } + + public OpenAICodexIntegrationDataflowsResponse openaiCodexMetrics( + OpenAICodexMetricsIntegrationDataflowResponse openaiCodexMetrics) { + this.openaiCodexMetrics = openaiCodexMetrics; + this.unparsed |= openaiCodexMetrics.unparsed; + return this; + } + + /** + * Daily Codex analytics metrics under the openai.codex.* namespace: usage totals, + * token counts by model, thread and turn counts by client, lines of code attributable to Codex, + * and code reviews. This dataflow is always on and cannot be turned off, which is why it appears + * in responses only. + * + * @return openaiCodexMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_CODEX_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexMetricsIntegrationDataflowResponse getOpenaiCodexMetrics() { + return openaiCodexMetrics; + } + + public void setOpenaiCodexMetrics( + OpenAICodexMetricsIntegrationDataflowResponse openaiCodexMetrics) { + this.openaiCodexMetrics = openaiCodexMetrics; + if (openaiCodexMetrics != null) { + this.unparsed |= openaiCodexMetrics.unparsed; + } + } + + public OpenAICodexIntegrationDataflowsResponse openaiCodexTurnMetrics( + OpenAICodexTurnMetricsIntegrationDataflowResponse openaiCodexTurnMetrics) { + this.openaiCodexTurnMetrics = openaiCodexTurnMetrics; + this.unparsed |= openaiCodexTurnMetrics.unparsed; + return this; + } + + /** + * Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session + * identity, Work Insights classification, token usage, credits, estimated cost, duration, and + * skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from + * invoiced charges. Requires the + * chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read scope on the key in + * authentication; without it this dataflow collects no data. + * + * @return openaiCodexTurnMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_CODEX_TURN_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAICodexTurnMetricsIntegrationDataflowResponse getOpenaiCodexTurnMetrics() { + return openaiCodexTurnMetrics; + } + + public void setOpenaiCodexTurnMetrics( + OpenAICodexTurnMetricsIntegrationDataflowResponse openaiCodexTurnMetrics) { + this.openaiCodexTurnMetrics = openaiCodexTurnMetrics; + if (openaiCodexTurnMetrics != null) { + this.unparsed |= openaiCodexTurnMetrics.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 OpenAICodexIntegrationDataflowsResponse + */ + @JsonAnySetter + public OpenAICodexIntegrationDataflowsResponse 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 OpenAICodexIntegrationDataflowsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexIntegrationDataflowsResponse openAiCodexIntegrationDataflowsResponse = + (OpenAICodexIntegrationDataflowsResponse) o; + return Objects.equals( + this.openaiCodexDora, openAiCodexIntegrationDataflowsResponse.openaiCodexDora) + && Objects.equals( + this.openaiCodexMetrics, openAiCodexIntegrationDataflowsResponse.openaiCodexMetrics) + && Objects.equals( + this.openaiCodexTurnMetrics, + openAiCodexIntegrationDataflowsResponse.openaiCodexTurnMetrics) + && Objects.equals( + this.additionalProperties, + openAiCodexIntegrationDataflowsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + openaiCodexDora, openaiCodexMetrics, openaiCodexTurnMetrics, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexIntegrationDataflowsResponse {\n"); + sb.append(" openaiCodexDora: ").append(toIndentedString(openaiCodexDora)).append("\n"); + sb.append(" openaiCodexMetrics: ").append(toIndentedString(openaiCodexMetrics)).append("\n"); + sb.append(" openaiCodexTurnMetrics: ") + .append(toIndentedString(openaiCodexTurnMetrics)) + .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/OpenAICodexMetricsIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexMetricsIntegrationDataflowResponse.java new file mode 100644 index 00000000000..f7bafa1bd0b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexMetricsIntegrationDataflowResponse.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.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; + +/** + * Daily Codex analytics metrics under the openai.codex.* namespace: usage totals, + * token counts by model, thread and turn counts by client, lines of code attributable to Codex, and + * code reviews. This dataflow is always on and cannot be turned off, which is why it appears in + * responses only. + */ +@JsonPropertyOrder({ + OpenAICodexMetricsIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + OpenAICodexMetricsIntegrationDataflowResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexMetricsIntegrationDataflowResponse { + @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; + + /** + * Whether Datadog collects this data. Always true, because this collection cannot be + * turned off. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return 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 OpenAICodexMetricsIntegrationDataflowResponse + */ + @JsonAnySetter + public OpenAICodexMetricsIntegrationDataflowResponse 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 OpenAICodexMetricsIntegrationDataflowResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexMetricsIntegrationDataflowResponse openAiCodexMetricsIntegrationDataflowResponse = + (OpenAICodexMetricsIntegrationDataflowResponse) o; + return Objects.equals(this.enabled, openAiCodexMetricsIntegrationDataflowResponse.enabled) + && Objects.equals(this.status, openAiCodexMetricsIntegrationDataflowResponse.status) + && Objects.equals( + this.additionalProperties, + openAiCodexMetricsIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexMetricsIntegrationDataflowResponse {\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/OpenAICodexTurnMetricsIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexTurnMetricsIntegrationDataflowRequest.java new file mode 100644 index 00000000000..6faa634bd98 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexTurnMetricsIntegrationDataflowRequest.java @@ -0,0 +1,91 @@ +/* + * 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; + +/** + * Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session + * identity, Work Insights classification, token usage, credits, estimated cost, duration, and + * skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from + * invoiced charges. Requires the + * chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read scope on the key in + * authentication; without it this dataflow collects no data. + */ +@JsonPropertyOrder({OpenAICodexTurnMetricsIntegrationDataflowRequest.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexTurnMetricsIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public OpenAICodexTurnMetricsIntegrationDataflowRequest 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 OpenAICodexTurnMetricsIntegrationDataflowRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexTurnMetricsIntegrationDataflowRequest + openAiCodexTurnMetricsIntegrationDataflowRequest = + (OpenAICodexTurnMetricsIntegrationDataflowRequest) o; + return Objects.equals(this.enabled, openAiCodexTurnMetricsIntegrationDataflowRequest.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexTurnMetricsIntegrationDataflowRequest {\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/OpenAICodexTurnMetricsIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexTurnMetricsIntegrationDataflowResponse.java new file mode 100644 index 00000000000..5dbdb80950c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAICodexTurnMetricsIntegrationDataflowResponse.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** + * Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session + * identity, Work Insights classification, token usage, credits, estimated cost, duration, and + * skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from + * invoiced charges. Requires the + * chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read scope on the key in + * authentication; without it this dataflow collects no data. + */ +@JsonPropertyOrder({ + OpenAICodexTurnMetricsIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + OpenAICodexTurnMetricsIntegrationDataflowResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAICodexTurnMetricsIntegrationDataflowResponse { + @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 OpenAICodexTurnMetricsIntegrationDataflowResponse 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 OpenAICodexTurnMetricsIntegrationDataflowResponse + */ + @JsonAnySetter + public OpenAICodexTurnMetricsIntegrationDataflowResponse 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 OpenAICodexTurnMetricsIntegrationDataflowResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAICodexTurnMetricsIntegrationDataflowResponse + openAiCodexTurnMetricsIntegrationDataflowResponse = + (OpenAICodexTurnMetricsIntegrationDataflowResponse) o; + return Objects.equals(this.enabled, openAiCodexTurnMetricsIntegrationDataflowResponse.enabled) + && Objects.equals(this.status, openAiCodexTurnMetricsIntegrationDataflowResponse.status) + && Objects.equals( + this.additionalProperties, + openAiCodexTurnMetricsIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAICodexTurnMetricsIntegrationDataflowResponse {\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/test/resources/com/datadog/api/client/v2/api/openai_codex_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/openai_codex_integration.feature new file mode 100644 index 00000000000..4e8f7a24b9c --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/openai_codex_integration.feature @@ -0,0 +1,148 @@ +@endpoint(openai-codex-integration) @endpoint(openai-codex-integration-v2) +Feature: OpenAI Codex Integration + Manage your Datadog OpenAI Codex integration accounts and account + resources directly through the Datadog API. See the [OpenAI Codex + integration page](https://docs.datadoghq.com/integrations/openai-codex/) + for more information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "OpenAICodexIntegration" API + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create an OpenAI Codex integration account returns "Bad Request" response + Given operation "CreateOpenAICodexIntegrationAccount" enabled + And new "CreateOpenAICodexIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create an OpenAI Codex integration account returns "Created" response + Given operation "CreateOpenAICodexIntegrationAccount" enabled + And new "CreateOpenAICodexIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create an OpenAI Codex integration account returns "Not Found" response + Given operation "CreateOpenAICodexIntegrationAccount" enabled + And new "CreateOpenAICodexIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create an OpenAI Codex integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "CreateOpenAICodexIntegrationAccount" enabled + And new "CreateOpenAICodexIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "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 an OpenAI Codex integration account returns "Bad Request" response + Given operation "DeleteOpenAICodexIntegrationAccount" enabled + And new "DeleteOpenAICodexIntegrationAccount" 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 an OpenAI Codex integration account returns "Not Found" response + Given operation "DeleteOpenAICodexIntegrationAccount" enabled + And new "DeleteOpenAICodexIntegrationAccount" 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 an OpenAI Codex integration account returns "OK" response + Given operation "DeleteOpenAICodexIntegrationAccount" enabled + And new "DeleteOpenAICodexIntegrationAccount" 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 an OpenAI Codex integration account returns "Bad Request" response + Given operation "GetOpenAICodexIntegrationAccount" enabled + And new "GetOpenAICodexIntegrationAccount" 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 an OpenAI Codex integration account returns "Not Found" response + Given operation "GetOpenAICodexIntegrationAccount" enabled + And new "GetOpenAICodexIntegrationAccount" 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 an OpenAI Codex integration account returns "OK" response + Given operation "GetOpenAICodexIntegrationAccount" enabled + And new "GetOpenAICodexIntegrationAccount" 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 OpenAI Codex integration accounts returns "Bad Request" response + Given operation "ListOpenAICodexIntegrationAccounts" enabled + And new "ListOpenAICodexIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/saas-integrations + Scenario: List OpenAI Codex integration accounts returns "Not Found" response + Given operation "ListOpenAICodexIntegrationAccounts" enabled + And new "ListOpenAICodexIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/saas-integrations + Scenario: List OpenAI Codex integration accounts returns "OK" response + Given operation "ListOpenAICodexIntegrationAccounts" enabled + And new "ListOpenAICodexIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update an OpenAI Codex integration account returns "Bad Request" response + Given operation "UpdateOpenAICodexIntegrationAccount" enabled + And new "UpdateOpenAICodexIntegrationAccount" 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": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "id": "7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47", "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update an OpenAI Codex integration account returns "Not Found" response + Given operation "UpdateOpenAICodexIntegrationAccount" enabled + And new "UpdateOpenAICodexIntegrationAccount" 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": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "id": "7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47", "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update an OpenAI Codex integration account returns "OK" response + Given operation "UpdateOpenAICodexIntegrationAccount" enabled + And new "UpdateOpenAICodexIntegrationAccount" 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": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "id": "7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47", "type": "integration-account"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update an OpenAI Codex integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "UpdateOpenAICodexIntegrationAccount" enabled + And new "UpdateOpenAICodexIntegrationAccount" 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": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "id": "7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47", "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..d0529b63e5a 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 @@ -4322,6 +4322,43 @@ "type": "idempotent" } }, + "ListOpenAICodexIntegrationAccounts": { + "tag": "OpenAI Codex Integration", + "undo": { + "type": "safe" + } + }, + "CreateOpenAICodexIntegrationAccount": { + "tag": "OpenAI Codex Integration", + "undo": { + "operationId": "DeleteOpenAICodexIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteOpenAICodexIntegrationAccount": { + "tag": "OpenAI Codex Integration", + "undo": { + "type": "idempotent" + } + }, + "GetOpenAICodexIntegrationAccount": { + "tag": "OpenAI Codex Integration", + "undo": { + "type": "safe" + } + }, + "UpdateOpenAICodexIntegrationAccount": { + "tag": "OpenAI Codex Integration", + "undo": { + "type": "idempotent" + } + }, "ListSnowflakeIntegrationAccounts": { "tag": "Snowflake Integration", "undo": {