From b4a221e0b3d5b90ab517d465e5b3c3c7ec2a96dc Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 26 Nov 2026 15:35:48 +0000 Subject: [PATCH] Regenerate client from commit cd352d0 of spec repo --- .generator/schemas/v2/openapi.yaml | 544 +++++++++++ ...penAIModelInferenceIntegrationAccount.java | 69 ++ ...penAIModelInferenceIntegrationAccount.java | 28 + ...penAIModelInferenceIntegrationAccount.java | 30 + ...enAIModelInferenceIntegrationAccounts.java | 31 + ...penAIModelInferenceIntegrationAccount.java | 70 ++ .../com/datadog/api/client/ApiClient.java | 5 + .../OpenAiModelInferenceIntegrationApi.java | 861 ++++++++++++++++++ ...tegrationAccountAuthenticationRequest.java | 260 ++++++ ...egrationAccountAuthenticationResponse.java | 264 ++++++ ...ntegrationAccountAuthenticationUpdate.java | 259 ++++++ ...egrationAccountBearerTokenAuthRequest.java | 138 +++ ...grationAccountBearerTokenAuthResponse.java | 162 ++++ ...IntegrationAccountBearerTokenAuthType.java | 63 ++ ...tegrationAccountBearerTokenAuthUpdate.java | 138 +++ ...nceIntegrationAccountCreateAttributes.java | 264 ++++++ ...InferenceIntegrationAccountCreateData.java | 191 ++++ ...erenceIntegrationAccountCreateRequest.java | 157 ++++ ...elInferenceIntegrationAccountResponse.java | 155 ++++ ...eIntegrationAccountResponseAttributes.java | 257 ++++++ ...ferenceIntegrationAccountResponseData.java | 215 +++++ ...enceIntegrationAccountSettingsRequest.java | 89 ++ ...nceIntegrationAccountSettingsResponse.java | 147 +++ ...renceIntegrationAccountSettingsUpdate.java | 90 ++ ...nceIntegrationAccountUpdateAttributes.java | 256 ++++++ ...InferenceIntegrationAccountUpdateData.java | 222 +++++ ...erenceIntegrationAccountUpdateRequest.java | 157 ++++ ...lInferenceIntegrationAccountsResponse.java | 170 ++++ ...lInferenceIntegrationDataflowsRequest.java | 147 +++ ...InferenceIntegrationDataflowsResponse.java | 196 ++++ ...CompletionsIntegrationDataflowRequest.java | 95 ++ ...ompletionsIntegrationDataflowResponse.java | 168 ++++ ...oudCostDataIntegrationDataflowRequest.java | 95 ++ ...udCostDataIntegrationDataflowResponse.java | 171 ++++ ...openai_model_inference_integration.feature | 148 +++ .../com/datadog/api/client/v2/api/undo.json | 37 + 36 files changed, 6349 insertions(+) create mode 100644 examples/v2/openai-model-inference-integration/CreateOpenAIModelInferenceIntegrationAccount.java create mode 100644 examples/v2/openai-model-inference-integration/DeleteOpenAIModelInferenceIntegrationAccount.java create mode 100644 examples/v2/openai-model-inference-integration/GetOpenAIModelInferenceIntegrationAccount.java create mode 100644 examples/v2/openai-model-inference-integration/ListOpenAIModelInferenceIntegrationAccounts.java create mode 100644 examples/v2/openai-model-inference-integration/UpdateOpenAIModelInferenceIntegrationAccount.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/OpenAiModelInferenceIntegrationApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountAuthenticationRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountAuthenticationResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountAuthenticationUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponseAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationDataflowsRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationDataflowsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse.java create mode 100644 src/test/resources/com/datadog/api/client/v2/api/openai_model_inference_integration.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 23d3b7fb9b8..ccc8ce0550d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -107467,6 +107467,287 @@ components: required: - type type: object + OpenAIModelInferenceIntegrationAccountAuthenticationRequest: + description: Authentication for creating the OpenAI Model Inference integration account. Set exactly one method. + oneOf: + - $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest" + OpenAIModelInferenceIntegrationAccountAuthenticationResponse: + description: Authentication configured on the OpenAI Model Inference integration account. + oneOf: + - $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse" + OpenAIModelInferenceIntegrationAccountAuthenticationUpdate: + description: Authentication for updating the OpenAI Model Inference integration account. Set exactly one method. + oneOf: + - $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate" + OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest: + additionalProperties: false + description: >- + Bearer token authentication. Use a project-scoped OpenAI API key with Write permission for model capabilities. While `openai-llm-completions` is enabled, the API returns a `422` response for a key that cannot call the OpenAI chat completions endpoint. + properties: + auth_type: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountBearerTokenAuthType" + token: + description: Secret token used to authenticate with OpenAI. + example: your-token + type: string + writeOnly: true + required: + - auth_type + - token + type: object + OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse: + description: The bearer token authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountBearerTokenAuthType" + required: + - auth_type + type: object + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType: + default: bearer_token + description: The authentication method type. + enum: + - bearer_token + example: bearer_token + type: string + x-enum-varnames: + - BEARER_TOKEN + OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate: + additionalProperties: false + description: >- + Bearer token authentication. Use a project-scoped OpenAI API key with Write permission for model capabilities. While `openai-llm-completions` is enabled, the API returns a `422` response for a key that cannot call the OpenAI chat completions endpoint. Only the provided fields are changed. To keep the stored token, omit `token`. + properties: + auth_type: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountBearerTokenAuthType" + token: + description: Secret token used to authenticate with OpenAI. + example: your-token + type: string + writeOnly: true + required: + - auth_type + type: object + OpenAIModelInferenceIntegrationAccountCreateAttributes: + description: Writable attributes used to create an OpenAI Model Inference integration account. + properties: + authentication: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountAuthenticationRequest" + dataflows: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationDataflowsRequest" + name: + description: Human-readable name of the OpenAI Model Inference integration account. + example: openai-model-inference-acme + type: string + settings: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountSettingsRequest" + required: + - name + - authentication + - settings + type: object + OpenAIModelInferenceIntegrationAccountCreateData: + description: Data envelope for creating an OpenAI Model Inference integration account. + properties: + attributes: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountCreateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + OpenAIModelInferenceIntegrationAccountCreateRequest: + description: Request payload to create an OpenAI Model Inference integration account. + properties: + data: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountCreateData" + required: + - data + type: object + OpenAIModelInferenceIntegrationAccountResponse: + description: Response payload for a single OpenAI Model Inference integration account. + properties: + data: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountResponseData" + required: + - data + type: object + OpenAIModelInferenceIntegrationAccountResponseAttributes: + description: Attributes of an OpenAI Model Inference integration account returned in responses. + properties: + authentication: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountAuthenticationResponse" + dataflows: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationDataflowsResponse" + name: + description: Human-readable name of the OpenAI Model Inference integration account. + example: openai-model-inference-acme + type: string + settings: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountSettingsResponse" + required: + - name + - settings + type: object + OpenAIModelInferenceIntegrationAccountResponseData: + description: Data envelope of an OpenAI Model Inference integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountResponseAttributes" + id: + description: Server-generated unique identifier of the OpenAI Model Inference integration account. + example: 3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63 + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - attributes + - type + type: object + OpenAIModelInferenceIntegrationAccountSettingsRequest: + additionalProperties: false + description: Settings for creating the OpenAI Model Inference integration account. + properties: + custom_tags: + description: >- + Comma-separated list of custom tags applied to the data collected for this account, for example `team:ai,env:prod`. + example: team:ai,env:prod + type: string + type: object + OpenAIModelInferenceIntegrationAccountSettingsResponse: + description: Settings configured on the OpenAI Model Inference integration account. + properties: + custom_tags: + description: >- + Comma-separated list of custom tags applied to the data collected for this account, for example `team:ai,env:prod`. + example: team:ai,env:prod + type: string + type: object + OpenAIModelInferenceIntegrationAccountSettingsUpdate: + additionalProperties: false + description: >- + Settings for updating the OpenAI Model Inference integration account. Only the fields provided are changed. + properties: + custom_tags: + description: >- + Comma-separated list of custom tags applied to the data collected for this account, for example `team:ai,env:prod`. + example: team:ai,env:prod + type: string + type: object + OpenAIModelInferenceIntegrationAccountUpdateAttributes: + description: >- + Writable attributes used to update an OpenAI Model Inference integration account. Every field is optional. Only the provided fields are changed. When `dataflows` is provided, only the dataflow IDs in the request are modified. Dataflows omitted from the map keep their current configuration. + properties: + authentication: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountAuthenticationUpdate" + dataflows: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationDataflowsRequest" + name: + description: Human-readable name of the OpenAI Model Inference integration account. + example: openai-model-inference-acme + type: string + settings: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountSettingsUpdate" + type: object + OpenAIModelInferenceIntegrationAccountUpdateData: + description: Data envelope for updating an OpenAI Model Inference integration account. + properties: + attributes: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountUpdateAttributes" + id: + description: Unique identifier of the OpenAI Model Inference integration account to update. + example: 3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63 + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + OpenAIModelInferenceIntegrationAccountUpdateRequest: + description: Request payload to update an OpenAI Model Inference integration account. + properties: + data: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountUpdateData" + required: + - data + type: object + OpenAIModelInferenceIntegrationAccountsResponse: + description: Response payload for a list of OpenAI Model Inference integration accounts. + properties: + data: + description: List of OpenAI Model Inference integration accounts. + items: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountResponseData" + type: array + required: + - data + type: object + OpenAIModelInferenceIntegrationDataflowsRequest: + additionalProperties: false + description: >- + Data Datadog collects from OpenAI Model Inference, keyed by dataflow ID. Each dataflow turns on a distinct type of collection. Set `enabled` to start or stop a dataflow. The default for each dataflow applies when the account is created. On update, omitted fields keep their current values. + properties: + openai-llm-completions: + $ref: "#/components/schemas/OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest" + openai-project-cloud-cost-data: + $ref: "#/components/schemas/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest" + type: object + OpenAIModelInferenceIntegrationDataflowsResponse: + description: Data Datadog collects from OpenAI Model Inference, keyed by dataflow ID. + properties: + openai-llm-completions: + $ref: "#/components/schemas/OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse" + openai-project-cloud-cost-data: + $ref: "#/components/schemas/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse" + type: object + OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest: + additionalProperties: false + description: >- + Makes the key in `authentication` available to run evaluations in [LLM Observability](https://docs.datadoghq.com/llm_observability/). While this dataflow is enabled, the API returns a `422` response for a key that cannot call the OpenAI chat completions endpoint. + properties: + enabled: + description: >- + Whether Datadog collects this data. Defaults to `true`. Set to `false` to stop collection. + example: true + type: boolean + type: object + OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse: + description: >- + Makes the key in `authentication` available to run evaluations in [LLM Observability](https://docs.datadoghq.com/llm_observability/). + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest: + additionalProperties: false + description: >- + Costs of the OpenAI project that owns the key in `authentication`. Analyze these costs in [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). Cost data appears in Cloud Cost Management within 24 hours after you enable this dataflow. + properties: + enabled: + description: >- + Whether Datadog collects this data. Defaults to `false`. Set to `true` to start collection. + example: true + type: boolean + type: object + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse: + description: >- + Costs of the OpenAI project that owns the key in `authentication`. Analyze these costs in [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object OpenAPIEndpoint: description: Endpoint info extracted from an `OpenAPI` specification. properties: @@ -211412,6 +211693,260 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/openai-model-inference/accounts: + get: + description: List OpenAI Model Inference integration accounts. + operationId: ListOpenAIModelInferenceIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + auth_type: bearer_token + dataflows: + openai-llm-completions: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-project-cloud-cost-data: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: openai-model-inference-acme + settings: + custom_tags: team:ai,env:prod + id: 3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63 + type: integration-account + schema: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/IntegrationAccountBadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/IntegrationAccountNotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List OpenAI Model Inference accounts + tags: + - OpenAI Model Inference 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 Model Inference integration account. + operationId: CreateOpenAIModelInferenceIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + openai-llm-completions: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-project-cloud-cost-data: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: openai-model-inference-acme + settings: + custom_tags: team:ai,env:prod + id: 3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63 + type: integration-account + schema: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountResponse" + description: Created + "400": + $ref: "#/components/responses/IntegrationAccountBadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/IntegrationAccountNotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create an OpenAI Model Inference account + tags: + - OpenAI Model Inference 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-model-inference/accounts/{account_id}: + delete: + description: Delete an OpenAI Model Inference integration account. + operationId: DeleteOpenAIModelInferenceIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + description: OK + "400": + $ref: "#/components/responses/IntegrationAccountBadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/IntegrationAccountNotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete an OpenAI Model Inference account + tags: + - OpenAI Model Inference 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 Model Inference integration account. + operationId: GetOpenAIModelInferenceIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + openai-llm-completions: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-project-cloud-cost-data: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: openai-model-inference-acme + settings: + custom_tags: team:ai,env:prod + id: 3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63 + type: integration-account + schema: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/IntegrationAccountBadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/IntegrationAccountNotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an OpenAI Model Inference account + tags: + - OpenAI Model Inference 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 Model Inference integration account. Only the fields provided are changed. + operationId: UpdateOpenAIModelInferenceIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: bearer_token + dataflows: + openai-llm-completions: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + openai-project-cloud-cost-data: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-11-10T08:30:50Z" + name: openai-model-inference-acme + settings: + custom_tags: team:ai,env:prod + id: 3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63 + type: integration-account + schema: + $ref: "#/components/schemas/OpenAIModelInferenceIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/IntegrationAccountBadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/IntegrationAccountNotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update an OpenAI Model Inference account + tags: + - OpenAI Model Inference 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. @@ -288844,6 +289379,15 @@ tags: description: OpenAI Codex integration. url: https://docs.datadoghq.com/integrations/openai-codex/ name: OpenAI Codex Integration + - description: |- + Manage your Datadog OpenAI Model Inference integration accounts and account resources + directly through the Datadog API. See the + [OpenAI integration page](https://docs.datadoghq.com/integrations/openai/) for + more information. + externalDocs: + description: OpenAI integration. + url: https://docs.datadoghq.com/integrations/openai/ + name: OpenAI Model Inference Integration - description: |- Configure your [Datadog Opsgenie integration](https://docs.datadoghq.com/integrations/opsgenie/) directly through the Datadog API. diff --git a/examples/v2/openai-model-inference-integration/CreateOpenAIModelInferenceIntegrationAccount.java b/examples/v2/openai-model-inference-integration/CreateOpenAIModelInferenceIntegrationAccount.java new file mode 100644 index 00000000000..7acc4f57b70 --- /dev/null +++ b/examples/v2/openai-model-inference-integration/CreateOpenAIModelInferenceIntegrationAccount.java @@ -0,0 +1,69 @@ +// Create an OpenAI Model Inference account returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiModelInferenceIntegrationApi; +import com.datadog.api.client.v2.model.IntegrationAccountType; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountAuthenticationRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountBearerTokenAuthType; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountCreateAttributes; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountCreateData; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountCreateRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountResponse; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountSettingsRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationDataflowsRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled( + "v2.createOpenAIModelInferenceIntegrationAccount", true); + OpenAiModelInferenceIntegrationApi apiInstance = + new OpenAiModelInferenceIntegrationApi(defaultClient); + + OpenAIModelInferenceIntegrationAccountCreateRequest body = + new OpenAIModelInferenceIntegrationAccountCreateRequest() + .data( + new OpenAIModelInferenceIntegrationAccountCreateData() + .attributes( + new OpenAIModelInferenceIntegrationAccountCreateAttributes() + .authentication( + new OpenAIModelInferenceIntegrationAccountAuthenticationRequest( + new OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest() + .authType( + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType + .BEARER_TOKEN) + .token("your-token"))) + .dataflows( + new OpenAIModelInferenceIntegrationDataflowsRequest() + .openaiLlmCompletions( + new OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest() + .enabled(true)) + .openaiProjectCloudCostData( + new OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest() + .enabled(true))) + .name("openai-model-inference-acme") + .settings( + new OpenAIModelInferenceIntegrationAccountSettingsRequest() + .customTags("team:ai,env:prod"))) + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + OpenAIModelInferenceIntegrationAccountResponse result = + apiInstance.createOpenAIModelInferenceIntegrationAccount(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " OpenAiModelInferenceIntegrationApi#createOpenAIModelInferenceIntegrationAccount"); + 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-model-inference-integration/DeleteOpenAIModelInferenceIntegrationAccount.java b/examples/v2/openai-model-inference-integration/DeleteOpenAIModelInferenceIntegrationAccount.java new file mode 100644 index 00000000000..be196994c9a --- /dev/null +++ b/examples/v2/openai-model-inference-integration/DeleteOpenAIModelInferenceIntegrationAccount.java @@ -0,0 +1,28 @@ +// Delete an OpenAI Model Inference account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiModelInferenceIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled( + "v2.deleteOpenAIModelInferenceIntegrationAccount", true); + OpenAiModelInferenceIntegrationApi apiInstance = + new OpenAiModelInferenceIntegrationApi(defaultClient); + + try { + apiInstance.deleteOpenAIModelInferenceIntegrationAccount("account_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " OpenAiModelInferenceIntegrationApi#deleteOpenAIModelInferenceIntegrationAccount"); + 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-model-inference-integration/GetOpenAIModelInferenceIntegrationAccount.java b/examples/v2/openai-model-inference-integration/GetOpenAIModelInferenceIntegrationAccount.java new file mode 100644 index 00000000000..20f7986c740 --- /dev/null +++ b/examples/v2/openai-model-inference-integration/GetOpenAIModelInferenceIntegrationAccount.java @@ -0,0 +1,30 @@ +// Get an OpenAI Model Inference account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiModelInferenceIntegrationApi; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getOpenAIModelInferenceIntegrationAccount", true); + OpenAiModelInferenceIntegrationApi apiInstance = + new OpenAiModelInferenceIntegrationApi(defaultClient); + + try { + OpenAIModelInferenceIntegrationAccountResponse result = + apiInstance.getOpenAIModelInferenceIntegrationAccount("account_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " OpenAiModelInferenceIntegrationApi#getOpenAIModelInferenceIntegrationAccount"); + 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-model-inference-integration/ListOpenAIModelInferenceIntegrationAccounts.java b/examples/v2/openai-model-inference-integration/ListOpenAIModelInferenceIntegrationAccounts.java new file mode 100644 index 00000000000..6feec31a2b6 --- /dev/null +++ b/examples/v2/openai-model-inference-integration/ListOpenAIModelInferenceIntegrationAccounts.java @@ -0,0 +1,31 @@ +// List OpenAI Model Inference accounts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiModelInferenceIntegrationApi; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled( + "v2.listOpenAIModelInferenceIntegrationAccounts", true); + OpenAiModelInferenceIntegrationApi apiInstance = + new OpenAiModelInferenceIntegrationApi(defaultClient); + + try { + OpenAIModelInferenceIntegrationAccountsResponse result = + apiInstance.listOpenAIModelInferenceIntegrationAccounts(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " OpenAiModelInferenceIntegrationApi#listOpenAIModelInferenceIntegrationAccounts"); + 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-model-inference-integration/UpdateOpenAIModelInferenceIntegrationAccount.java b/examples/v2/openai-model-inference-integration/UpdateOpenAIModelInferenceIntegrationAccount.java new file mode 100644 index 00000000000..6850955b333 --- /dev/null +++ b/examples/v2/openai-model-inference-integration/UpdateOpenAIModelInferenceIntegrationAccount.java @@ -0,0 +1,70 @@ +// Update an OpenAI Model Inference account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OpenAiModelInferenceIntegrationApi; +import com.datadog.api.client.v2.model.IntegrationAccountType; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountAuthenticationUpdate; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountBearerTokenAuthType; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountResponse; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountSettingsUpdate; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountUpdateAttributes; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountUpdateData; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationDataflowsRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled( + "v2.updateOpenAIModelInferenceIntegrationAccount", true); + OpenAiModelInferenceIntegrationApi apiInstance = + new OpenAiModelInferenceIntegrationApi(defaultClient); + + OpenAIModelInferenceIntegrationAccountUpdateRequest body = + new OpenAIModelInferenceIntegrationAccountUpdateRequest() + .data( + new OpenAIModelInferenceIntegrationAccountUpdateData() + .attributes( + new OpenAIModelInferenceIntegrationAccountUpdateAttributes() + .authentication( + new OpenAIModelInferenceIntegrationAccountAuthenticationUpdate( + new OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate() + .authType( + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType + .BEARER_TOKEN) + .token("your-token"))) + .dataflows( + new OpenAIModelInferenceIntegrationDataflowsRequest() + .openaiLlmCompletions( + new OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest() + .enabled(true)) + .openaiProjectCloudCostData( + new OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest() + .enabled(true))) + .name("openai-model-inference-acme") + .settings( + new OpenAIModelInferenceIntegrationAccountSettingsUpdate() + .customTags("team:ai,env:prod"))) + .id("3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63") + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + OpenAIModelInferenceIntegrationAccountResponse result = + apiInstance.updateOpenAIModelInferenceIntegrationAccount("account_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling" + + " OpenAiModelInferenceIntegrationApi#updateOpenAIModelInferenceIntegrationAccount"); + 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 5044cdd7ee4..5c95b027589 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1586,6 +1586,11 @@ public class ApiClient { put("v2.getOpenAICodexIntegrationAccount", false); put("v2.listOpenAICodexIntegrationAccounts", false); put("v2.updateOpenAICodexIntegrationAccount", false); + put("v2.createOpenAIModelInferenceIntegrationAccount", false); + put("v2.deleteOpenAIModelInferenceIntegrationAccount", false); + put("v2.getOpenAIModelInferenceIntegrationAccount", false); + put("v2.listOpenAIModelInferenceIntegrationAccounts", false); + put("v2.updateOpenAIModelInferenceIntegrationAccount", 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/OpenAiModelInferenceIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/OpenAiModelInferenceIntegrationApi.java new file mode 100644 index 00000000000..b6daa492d2d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/OpenAiModelInferenceIntegrationApi.java @@ -0,0 +1,861 @@ +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.OpenAIModelInferenceIntegrationAccountCreateRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountResponse; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.OpenAIModelInferenceIntegrationAccountsResponse; +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 OpenAiModelInferenceIntegrationApi { + private ApiClient apiClient; + + public OpenAiModelInferenceIntegrationApi() { + this(ApiClient.getDefaultApiClient()); + } + + public OpenAiModelInferenceIntegrationApi(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 Model Inference account. + * + *

See {@link #createOpenAIModelInferenceIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return OpenAIModelInferenceIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public OpenAIModelInferenceIntegrationAccountResponse + createOpenAIModelInferenceIntegrationAccount( + OpenAIModelInferenceIntegrationAccountCreateRequest body) throws ApiException { + return createOpenAIModelInferenceIntegrationAccountWithHttpInfo(body).getData(); + } + + /** + * Create an OpenAI Model Inference account. + * + *

See {@link #createOpenAIModelInferenceIntegrationAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<OpenAIModelInferenceIntegrationAccountResponse> + */ + public CompletableFuture + createOpenAIModelInferenceIntegrationAccountAsync( + OpenAIModelInferenceIntegrationAccountCreateRequest body) { + return createOpenAIModelInferenceIntegrationAccountWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an OpenAI Model Inference integration account. + * + * @param body (required) + * @return ApiResponse<OpenAIModelInferenceIntegrationAccountResponse> + * @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 + createOpenAIModelInferenceIntegrationAccountWithHttpInfo( + OpenAIModelInferenceIntegrationAccountCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createOpenAIModelInferenceIntegrationAccount"; + 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" + + " createOpenAIModelInferenceIntegrationAccount"); + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/openai-model-inference/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OpenAiModelInferenceIntegrationApi.createOpenAIModelInferenceIntegrationAccount", + 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 Model Inference account. + * + *

See {@link #createOpenAIModelInferenceIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return + * CompletableFuture<ApiResponse<OpenAIModelInferenceIntegrationAccountResponse>> + */ + public CompletableFuture> + createOpenAIModelInferenceIntegrationAccountWithHttpInfoAsync( + OpenAIModelInferenceIntegrationAccountCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createOpenAIModelInferenceIntegrationAccount"; + 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" + + " createOpenAIModelInferenceIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/openai-model-inference/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OpenAiModelInferenceIntegrationApi.createOpenAIModelInferenceIntegrationAccount", + 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 Model Inference account. + * + *

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

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

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

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

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

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

See {@link #listOpenAIModelInferenceIntegrationAccountsWithHttpInfo}. + * + * @return OpenAIModelInferenceIntegrationAccountsResponse + * @throws ApiException if fails to make API call + */ + public OpenAIModelInferenceIntegrationAccountsResponse + listOpenAIModelInferenceIntegrationAccounts() throws ApiException { + return listOpenAIModelInferenceIntegrationAccountsWithHttpInfo().getData(); + } + + /** + * List OpenAI Model Inference accounts. + * + *

See {@link #listOpenAIModelInferenceIntegrationAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<OpenAIModelInferenceIntegrationAccountsResponse> + */ + public CompletableFuture + listOpenAIModelInferenceIntegrationAccountsAsync() { + return listOpenAIModelInferenceIntegrationAccountsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List OpenAI Model Inference integration accounts. + * + * @return ApiResponse<OpenAIModelInferenceIntegrationAccountsResponse> + * @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 + listOpenAIModelInferenceIntegrationAccountsWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listOpenAIModelInferenceIntegrationAccounts"; + 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-model-inference/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OpenAiModelInferenceIntegrationApi.listOpenAIModelInferenceIntegrationAccounts", + 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 Model Inference accounts. + * + *

See {@link #listOpenAIModelInferenceIntegrationAccountsWithHttpInfo}. + * + * @return + * CompletableFuture<ApiResponse<OpenAIModelInferenceIntegrationAccountsResponse>> + */ + public CompletableFuture> + listOpenAIModelInferenceIntegrationAccountsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listOpenAIModelInferenceIntegrationAccounts"; + 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-model-inference/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OpenAiModelInferenceIntegrationApi.listOpenAIModelInferenceIntegrationAccounts", + 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 Model Inference account. + * + *

See {@link #updateOpenAIModelInferenceIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return OpenAIModelInferenceIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public OpenAIModelInferenceIntegrationAccountResponse + updateOpenAIModelInferenceIntegrationAccount( + String accountId, OpenAIModelInferenceIntegrationAccountUpdateRequest body) + throws ApiException { + return updateOpenAIModelInferenceIntegrationAccountWithHttpInfo(accountId, body).getData(); + } + + /** + * Update an OpenAI Model Inference account. + * + *

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

See {@link #updateOpenAIModelInferenceIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return + * CompletableFuture<ApiResponse<OpenAIModelInferenceIntegrationAccountResponse>> + */ + public CompletableFuture> + updateOpenAIModelInferenceIntegrationAccountWithHttpInfoAsync( + String accountId, OpenAIModelInferenceIntegrationAccountUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateOpenAIModelInferenceIntegrationAccount"; + 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" + + " updateOpenAIModelInferenceIntegrationAccount")); + 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" + + " updateOpenAIModelInferenceIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/openai-model-inference/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OpenAiModelInferenceIntegrationApi.updateOpenAIModelInferenceIntegrationAccount", + 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/OpenAIModelInferenceIntegrationAccountAuthenticationRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountAuthenticationRequest.java new file mode 100644 index 00000000000..4cf0af7bd6b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountAuthenticationRequest.java @@ -0,0 +1,260 @@ +/* + * 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 = + OpenAIModelInferenceIntegrationAccountAuthenticationRequest + .OpenAIModelInferenceIntegrationAccountAuthenticationRequestDeserializer.class) +@JsonSerialize( + using = + OpenAIModelInferenceIntegrationAccountAuthenticationRequest + .OpenAIModelInferenceIntegrationAccountAuthenticationRequestSerializer.class) +public class OpenAIModelInferenceIntegrationAccountAuthenticationRequest + extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(OpenAIModelInferenceIntegrationAccountAuthenticationRequest.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class OpenAIModelInferenceIntegrationAccountAuthenticationRequestSerializer + extends StdSerializer { + public OpenAIModelInferenceIntegrationAccountAuthenticationRequestSerializer( + Class t) { + super(t); + } + + public OpenAIModelInferenceIntegrationAccountAuthenticationRequestSerializer() { + this(null); + } + + @Override + public void serialize( + OpenAIModelInferenceIntegrationAccountAuthenticationRequest value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class OpenAIModelInferenceIntegrationAccountAuthenticationRequestDeserializer + extends StdDeserializer { + public OpenAIModelInferenceIntegrationAccountAuthenticationRequestDeserializer() { + this(OpenAIModelInferenceIntegrationAccountAuthenticationRequest.class); + } + + public OpenAIModelInferenceIntegrationAccountAuthenticationRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public OpenAIModelInferenceIntegrationAccountAuthenticationRequest 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 OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals(Integer.class) + || OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals(Long.class) + || OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals( + Float.class) + || OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals( + Double.class) + || OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals( + Boolean.class) + || OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals( + Integer.class) + || OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals( + Float.class) + || OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.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 (!((OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest'", + e); + } + + OpenAIModelInferenceIntegrationAccountAuthenticationRequest ret = + new OpenAIModelInferenceIntegrationAccountAuthenticationRequest(); + 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 OpenAIModelInferenceIntegrationAccountAuthenticationRequest getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), + "OpenAIModelInferenceIntegrationAccountAuthenticationRequest cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public OpenAIModelInferenceIntegrationAccountAuthenticationRequest() { + super("oneOf", Boolean.FALSE); + } + + public OpenAIModelInferenceIntegrationAccountAuthenticationRequest( + OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest", + new GenericType() {}); + JSON.registerDescendants( + OpenAIModelInferenceIntegrationAccountAuthenticationRequest.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return OpenAIModelInferenceIntegrationAccountAuthenticationRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest + * + *

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

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

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( + OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate.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" + + " OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate"); + } + + /** + * Get the actual instance, which can be the following: + * OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate + * + * @return The actual instance (OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate`. If + * the actual instance is not `OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate` + * @throws ClassCastException if the instance is not + * `OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate` + */ + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate + getOpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate() throws ClassCastException { + return (OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.java new file mode 100644 index 00000000000..8603f01ee2f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.java @@ -0,0 +1,138 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Bearer token authentication. Use a project-scoped OpenAI API key with Write permission for model + * capabilities. While openai-llm-completions is enabled, the API returns a 422 + * response for a key that cannot call the OpenAI chat completions endpoint. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.JSON_PROPERTY_AUTH_TYPE, + OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private OpenAIModelInferenceIntegrationAccountBearerTokenAuthType authType = + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType authType, + @JsonProperty(required = true, value = JSON_PROPERTY_TOKEN) String token) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + this.token = token; + } + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest authType( + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType 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 OpenAIModelInferenceIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(OpenAIModelInferenceIntegrationAccountBearerTokenAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest token(String token) { + this.token = token; + return this; + } + + /** + * Secret token used to authenticate with OpenAI. + * + * @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 OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest + openAiModelInferenceIntegrationAccountBearerTokenAuthRequest = + (OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest) o; + return Objects.equals( + this.authType, openAiModelInferenceIntegrationAccountBearerTokenAuthRequest.authType) + && Objects.equals( + this.token, openAiModelInferenceIntegrationAccountBearerTokenAuthRequest.token); + } + + @Override + public int hashCode() { + return Objects.hash(authType, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountBearerTokenAuthRequest {\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/OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse.java new file mode 100644 index 00000000000..7354a676c7f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse.java @@ -0,0 +1,162 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The bearer token authentication method configured on the account. */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse.JSON_PROPERTY_AUTH_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private OpenAIModelInferenceIntegrationAccountBearerTokenAuthType authType = + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse authType( + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType 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 OpenAIModelInferenceIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(OpenAIModelInferenceIntegrationAccountBearerTokenAuthType 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 OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse 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 OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse + openAiModelInferenceIntegrationAccountBearerTokenAuthResponse = + (OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse) o; + return Objects.equals( + this.authType, openAiModelInferenceIntegrationAccountBearerTokenAuthResponse.authType) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountBearerTokenAuthResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountBearerTokenAuthResponse {\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/OpenAIModelInferenceIntegrationAccountBearerTokenAuthType.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthType.java new file mode 100644 index 00000000000..4a4a0a6b527 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthType.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 = + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType + .OpenAIModelInferenceIntegrationAccountBearerTokenAuthTypeSerializer.class) +public class OpenAIModelInferenceIntegrationAccountBearerTokenAuthType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("bearer_token")); + + public static final OpenAIModelInferenceIntegrationAccountBearerTokenAuthType BEARER_TOKEN = + new OpenAIModelInferenceIntegrationAccountBearerTokenAuthType("bearer_token"); + + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType(String value) { + super(value, allowedValues); + } + + public static class OpenAIModelInferenceIntegrationAccountBearerTokenAuthTypeSerializer + extends StdSerializer { + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthTypeSerializer( + Class t) { + super(t); + } + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OpenAIModelInferenceIntegrationAccountBearerTokenAuthType fromValue(String value) { + return new OpenAIModelInferenceIntegrationAccountBearerTokenAuthType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate.java new file mode 100644 index 00000000000..7f3c98614a5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate.java @@ -0,0 +1,138 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Bearer token authentication. Use a project-scoped OpenAI API key with Write permission for model + * capabilities. While openai-llm-completions is enabled, the API returns a 422 + * response for a key that cannot call the OpenAI chat completions endpoint. Only the + * provided fields are changed. To keep the stored token, omit token. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate.JSON_PROPERTY_AUTH_TYPE, + OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH_TYPE = "auth_type"; + private OpenAIModelInferenceIntegrationAccountBearerTokenAuthType authType = + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType.BEARER_TOKEN; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_TYPE) + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType authType) { + this.authType = authType; + this.unparsed |= !authType.isValid(); + } + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate authType( + OpenAIModelInferenceIntegrationAccountBearerTokenAuthType 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 OpenAIModelInferenceIntegrationAccountBearerTokenAuthType getAuthType() { + return authType; + } + + public void setAuthType(OpenAIModelInferenceIntegrationAccountBearerTokenAuthType authType) { + if (!authType.isValid()) { + this.unparsed = true; + } + this.authType = authType; + } + + public OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate token(String token) { + this.token = token; + return this; + } + + /** + * Secret token used to authenticate with OpenAI. + * + * @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 OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate + openAiModelInferenceIntegrationAccountBearerTokenAuthUpdate = + (OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate) o; + return Objects.equals( + this.authType, openAiModelInferenceIntegrationAccountBearerTokenAuthUpdate.authType) + && Objects.equals( + this.token, openAiModelInferenceIntegrationAccountBearerTokenAuthUpdate.token); + } + + @Override + public int hashCode() { + return Objects.hash(authType, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountBearerTokenAuthUpdate {\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/OpenAIModelInferenceIntegrationAccountCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateAttributes.java new file mode 100644 index 00000000000..d4be54564f4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateAttributes.java @@ -0,0 +1,264 @@ +/* + * 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 Model Inference integration account. */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountCreateAttributes.JSON_PROPERTY_AUTHENTICATION, + OpenAIModelInferenceIntegrationAccountCreateAttributes.JSON_PROPERTY_DATAFLOWS, + OpenAIModelInferenceIntegrationAccountCreateAttributes.JSON_PROPERTY_NAME, + OpenAIModelInferenceIntegrationAccountCreateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private OpenAIModelInferenceIntegrationAccountAuthenticationRequest authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private OpenAIModelInferenceIntegrationDataflowsRequest dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private OpenAIModelInferenceIntegrationAccountSettingsRequest settings; + + public OpenAIModelInferenceIntegrationAccountCreateAttributes() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTHENTICATION) + OpenAIModelInferenceIntegrationAccountAuthenticationRequest authentication, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) + OpenAIModelInferenceIntegrationAccountSettingsRequest settings) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + this.name = name; + this.settings = settings; + this.unparsed |= settings.unparsed; + } + + public OpenAIModelInferenceIntegrationAccountCreateAttributes authentication( + OpenAIModelInferenceIntegrationAccountAuthenticationRequest authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for creating the OpenAI Model Inference integration account. Set exactly one + * method. + * + * @return authentication + */ + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAIModelInferenceIntegrationAccountAuthenticationRequest getAuthentication() { + return authentication; + } + + public void setAuthentication( + OpenAIModelInferenceIntegrationAccountAuthenticationRequest authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountCreateAttributes dataflows( + OpenAIModelInferenceIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from OpenAI Model Inference, keyed by dataflow ID. Each dataflow turns on + * a distinct type of collection. Set enabled to start or stop a dataflow. The + * default for each dataflow applies when the account is created. On update, omitted fields keep + * their current values. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceIntegrationDataflowsRequest getDataflows() { + return dataflows; + } + + public void setDataflows(OpenAIModelInferenceIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the OpenAI Model Inference 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 OpenAIModelInferenceIntegrationAccountCreateAttributes settings( + OpenAIModelInferenceIntegrationAccountSettingsRequest settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for creating the OpenAI Model Inference integration account. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAIModelInferenceIntegrationAccountSettingsRequest getSettings() { + return settings; + } + + public void setSettings(OpenAIModelInferenceIntegrationAccountSettingsRequest 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 OpenAIModelInferenceIntegrationAccountCreateAttributes + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountCreateAttributes 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 OpenAIModelInferenceIntegrationAccountCreateAttributes object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountCreateAttributes + openAiModelInferenceIntegrationAccountCreateAttributes = + (OpenAIModelInferenceIntegrationAccountCreateAttributes) o; + return Objects.equals( + this.authentication, + openAiModelInferenceIntegrationAccountCreateAttributes.authentication) + && Objects.equals( + this.dataflows, openAiModelInferenceIntegrationAccountCreateAttributes.dataflows) + && Objects.equals(this.name, openAiModelInferenceIntegrationAccountCreateAttributes.name) + && Objects.equals( + this.settings, openAiModelInferenceIntegrationAccountCreateAttributes.settings) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountCreateAttributes {\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/OpenAIModelInferenceIntegrationAccountCreateData.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateData.java new file mode 100644 index 00000000000..bbfbfa0fb87 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateData.java @@ -0,0 +1,191 @@ +/* + * 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 Model Inference integration account. */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountCreateData.JSON_PROPERTY_ATTRIBUTES, + OpenAIModelInferenceIntegrationAccountCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OpenAIModelInferenceIntegrationAccountCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public OpenAIModelInferenceIntegrationAccountCreateData() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OpenAIModelInferenceIntegrationAccountCreateAttributes 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 OpenAIModelInferenceIntegrationAccountCreateData attributes( + OpenAIModelInferenceIntegrationAccountCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Writable attributes used to create an OpenAI Model Inference integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAIModelInferenceIntegrationAccountCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OpenAIModelInferenceIntegrationAccountCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountCreateData 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 OpenAIModelInferenceIntegrationAccountCreateData + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountCreateData 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 OpenAIModelInferenceIntegrationAccountCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountCreateData + openAiModelInferenceIntegrationAccountCreateData = + (OpenAIModelInferenceIntegrationAccountCreateData) o; + return Objects.equals( + this.attributes, openAiModelInferenceIntegrationAccountCreateData.attributes) + && Objects.equals(this.type, openAiModelInferenceIntegrationAccountCreateData.type) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountCreateData {\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/OpenAIModelInferenceIntegrationAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateRequest.java new file mode 100644 index 00000000000..46fd7f806d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountCreateRequest.java @@ -0,0 +1,157 @@ +/* + * 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 Model Inference integration account. */ +@JsonPropertyOrder({OpenAIModelInferenceIntegrationAccountCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OpenAIModelInferenceIntegrationAccountCreateData data; + + public OpenAIModelInferenceIntegrationAccountCreateRequest() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OpenAIModelInferenceIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OpenAIModelInferenceIntegrationAccountCreateRequest data( + OpenAIModelInferenceIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for creating an OpenAI Model Inference integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAIModelInferenceIntegrationAccountCreateData getData() { + return data; + } + + public void setData(OpenAIModelInferenceIntegrationAccountCreateData 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 OpenAIModelInferenceIntegrationAccountCreateRequest + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountCreateRequest 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 OpenAIModelInferenceIntegrationAccountCreateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountCreateRequest + openAiModelInferenceIntegrationAccountCreateRequest = + (OpenAIModelInferenceIntegrationAccountCreateRequest) o; + return Objects.equals(this.data, openAiModelInferenceIntegrationAccountCreateRequest.data) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountCreateRequest {\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/OpenAIModelInferenceIntegrationAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponse.java new file mode 100644 index 00000000000..fc0c9312381 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponse.java @@ -0,0 +1,155 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response payload for a single OpenAI Model Inference integration account. */ +@JsonPropertyOrder({OpenAIModelInferenceIntegrationAccountResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OpenAIModelInferenceIntegrationAccountResponseData data; + + public OpenAIModelInferenceIntegrationAccountResponse() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OpenAIModelInferenceIntegrationAccountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OpenAIModelInferenceIntegrationAccountResponse data( + OpenAIModelInferenceIntegrationAccountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope of an OpenAI Model Inference integration account, including server-assigned + * identity. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAIModelInferenceIntegrationAccountResponseData getData() { + return data; + } + + public void setData(OpenAIModelInferenceIntegrationAccountResponseData 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 OpenAIModelInferenceIntegrationAccountResponse + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountResponse 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 OpenAIModelInferenceIntegrationAccountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountResponse openAiModelInferenceIntegrationAccountResponse = + (OpenAIModelInferenceIntegrationAccountResponse) o; + return Objects.equals(this.data, openAiModelInferenceIntegrationAccountResponse.data) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountResponse {\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/OpenAIModelInferenceIntegrationAccountResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponseAttributes.java new file mode 100644 index 00000000000..86f3b829c86 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponseAttributes.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; + +/** Attributes of an OpenAI Model Inference integration account returned in responses. */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountResponseAttributes.JSON_PROPERTY_AUTHENTICATION, + OpenAIModelInferenceIntegrationAccountResponseAttributes.JSON_PROPERTY_DATAFLOWS, + OpenAIModelInferenceIntegrationAccountResponseAttributes.JSON_PROPERTY_NAME, + OpenAIModelInferenceIntegrationAccountResponseAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private OpenAIModelInferenceIntegrationAccountAuthenticationResponse authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private OpenAIModelInferenceIntegrationDataflowsResponse dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private OpenAIModelInferenceIntegrationAccountSettingsResponse settings; + + public OpenAIModelInferenceIntegrationAccountResponseAttributes() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SETTINGS) + OpenAIModelInferenceIntegrationAccountSettingsResponse settings) { + this.name = name; + this.settings = settings; + this.unparsed |= settings.unparsed; + } + + public OpenAIModelInferenceIntegrationAccountResponseAttributes authentication( + OpenAIModelInferenceIntegrationAccountAuthenticationResponse authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication configured on the OpenAI Model Inference integration account. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceIntegrationAccountAuthenticationResponse getAuthentication() { + return authentication; + } + + public void setAuthentication( + OpenAIModelInferenceIntegrationAccountAuthenticationResponse authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountResponseAttributes dataflows( + OpenAIModelInferenceIntegrationDataflowsResponse dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from OpenAI Model Inference, keyed by dataflow ID. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceIntegrationDataflowsResponse getDataflows() { + return dataflows; + } + + public void setDataflows(OpenAIModelInferenceIntegrationDataflowsResponse dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountResponseAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the OpenAI Model Inference 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 OpenAIModelInferenceIntegrationAccountResponseAttributes settings( + OpenAIModelInferenceIntegrationAccountSettingsResponse settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings configured on the OpenAI Model Inference integration account. + * + * @return settings + */ + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAIModelInferenceIntegrationAccountSettingsResponse getSettings() { + return settings; + } + + public void setSettings(OpenAIModelInferenceIntegrationAccountSettingsResponse 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 OpenAIModelInferenceIntegrationAccountResponseAttributes + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountResponseAttributes 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 OpenAIModelInferenceIntegrationAccountResponseAttributes object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountResponseAttributes + openAiModelInferenceIntegrationAccountResponseAttributes = + (OpenAIModelInferenceIntegrationAccountResponseAttributes) o; + return Objects.equals( + this.authentication, + openAiModelInferenceIntegrationAccountResponseAttributes.authentication) + && Objects.equals( + this.dataflows, openAiModelInferenceIntegrationAccountResponseAttributes.dataflows) + && Objects.equals(this.name, openAiModelInferenceIntegrationAccountResponseAttributes.name) + && Objects.equals( + this.settings, openAiModelInferenceIntegrationAccountResponseAttributes.settings) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountResponseAttributes {\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/OpenAIModelInferenceIntegrationAccountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponseData.java new file mode 100644 index 00000000000..a9042b5c35a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountResponseData.java @@ -0,0 +1,215 @@ +/* + * 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 Model Inference integration account, including server-assigned + * identity. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountResponseData.JSON_PROPERTY_ATTRIBUTES, + OpenAIModelInferenceIntegrationAccountResponseData.JSON_PROPERTY_ID, + OpenAIModelInferenceIntegrationAccountResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OpenAIModelInferenceIntegrationAccountResponseAttributes 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 OpenAIModelInferenceIntegrationAccountResponseData() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OpenAIModelInferenceIntegrationAccountResponseAttributes 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 OpenAIModelInferenceIntegrationAccountResponseData attributes( + OpenAIModelInferenceIntegrationAccountResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an OpenAI Model Inference integration account returned in responses. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAIModelInferenceIntegrationAccountResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OpenAIModelInferenceIntegrationAccountResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + /** + * Server-generated unique identifier of the OpenAI Model Inference integration account. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public OpenAIModelInferenceIntegrationAccountResponseData 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 OpenAIModelInferenceIntegrationAccountResponseData + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountResponseData 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 OpenAIModelInferenceIntegrationAccountResponseData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountResponseData + openAiModelInferenceIntegrationAccountResponseData = + (OpenAIModelInferenceIntegrationAccountResponseData) o; + return Objects.equals( + this.attributes, openAiModelInferenceIntegrationAccountResponseData.attributes) + && Objects.equals(this.id, openAiModelInferenceIntegrationAccountResponseData.id) + && Objects.equals(this.type, openAiModelInferenceIntegrationAccountResponseData.type) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountResponseData {\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/OpenAIModelInferenceIntegrationAccountSettingsRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsRequest.java new file mode 100644 index 00000000000..f19895d7e1f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsRequest.java @@ -0,0 +1,89 @@ +/* + * 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 creating the OpenAI Model Inference integration account. */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountSettingsRequest.JSON_PROPERTY_CUSTOM_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountSettingsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags"; + private String customTags; + + public OpenAIModelInferenceIntegrationAccountSettingsRequest customTags(String customTags) { + this.customTags = customTags; + return this; + } + + /** + * Comma-separated list of custom tags applied to the data collected for this account, for example + * team:ai,env:prod. + * + * @return customTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomTags() { + return customTags; + } + + public void setCustomTags(String customTags) { + this.customTags = customTags; + } + + /** + * Return true if this OpenAIModelInferenceIntegrationAccountSettingsRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountSettingsRequest + openAiModelInferenceIntegrationAccountSettingsRequest = + (OpenAIModelInferenceIntegrationAccountSettingsRequest) o; + return Objects.equals( + this.customTags, openAiModelInferenceIntegrationAccountSettingsRequest.customTags); + } + + @Override + public int hashCode() { + return Objects.hash(customTags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountSettingsRequest {\n"); + sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/OpenAIModelInferenceIntegrationAccountSettingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsResponse.java new file mode 100644 index 00000000000..2e0216d1abd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Settings configured on the OpenAI Model Inference integration account. */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountSettingsResponse.JSON_PROPERTY_CUSTOM_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountSettingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags"; + private String customTags; + + public OpenAIModelInferenceIntegrationAccountSettingsResponse customTags(String customTags) { + this.customTags = customTags; + return this; + } + + /** + * Comma-separated list of custom tags applied to the data collected for this account, for example + * team:ai,env:prod. + * + * @return customTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomTags() { + return customTags; + } + + public void setCustomTags(String customTags) { + this.customTags = customTags; + } + + /** + * 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 OpenAIModelInferenceIntegrationAccountSettingsResponse + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountSettingsResponse 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 OpenAIModelInferenceIntegrationAccountSettingsResponse object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountSettingsResponse + openAiModelInferenceIntegrationAccountSettingsResponse = + (OpenAIModelInferenceIntegrationAccountSettingsResponse) o; + return Objects.equals( + this.customTags, openAiModelInferenceIntegrationAccountSettingsResponse.customTags) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountSettingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(customTags, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountSettingsResponse {\n"); + sb.append(" customTags: ").append(toIndentedString(customTags)).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/OpenAIModelInferenceIntegrationAccountSettingsUpdate.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsUpdate.java new file mode 100644 index 00000000000..6663bfb00b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountSettingsUpdate.java @@ -0,0 +1,90 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Settings for updating the OpenAI Model Inference integration account. Only the fields provided + * are changed. + */ +@JsonPropertyOrder({OpenAIModelInferenceIntegrationAccountSettingsUpdate.JSON_PROPERTY_CUSTOM_TAGS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountSettingsUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags"; + private String customTags; + + public OpenAIModelInferenceIntegrationAccountSettingsUpdate customTags(String customTags) { + this.customTags = customTags; + return this; + } + + /** + * Comma-separated list of custom tags applied to the data collected for this account, for example + * team:ai,env:prod. + * + * @return customTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomTags() { + return customTags; + } + + public void setCustomTags(String customTags) { + this.customTags = customTags; + } + + /** + * Return true if this OpenAIModelInferenceIntegrationAccountSettingsUpdate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountSettingsUpdate + openAiModelInferenceIntegrationAccountSettingsUpdate = + (OpenAIModelInferenceIntegrationAccountSettingsUpdate) o; + return Objects.equals( + this.customTags, openAiModelInferenceIntegrationAccountSettingsUpdate.customTags); + } + + @Override + public int hashCode() { + return Objects.hash(customTags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountSettingsUpdate {\n"); + sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/OpenAIModelInferenceIntegrationAccountUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateAttributes.java new file mode 100644 index 00000000000..1a51e263488 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateAttributes.java @@ -0,0 +1,256 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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 Model Inference integration account. Every field is + * optional. Only the provided fields are changed. When dataflows is provided, only the + * dataflow IDs in the request are modified. Dataflows omitted from the map keep their current + * configuration. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountUpdateAttributes.JSON_PROPERTY_AUTHENTICATION, + OpenAIModelInferenceIntegrationAccountUpdateAttributes.JSON_PROPERTY_DATAFLOWS, + OpenAIModelInferenceIntegrationAccountUpdateAttributes.JSON_PROPERTY_NAME, + OpenAIModelInferenceIntegrationAccountUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private OpenAIModelInferenceIntegrationAccountAuthenticationUpdate authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private OpenAIModelInferenceIntegrationDataflowsRequest dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private OpenAIModelInferenceIntegrationAccountSettingsUpdate settings; + + public OpenAIModelInferenceIntegrationAccountUpdateAttributes authentication( + OpenAIModelInferenceIntegrationAccountAuthenticationUpdate authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for updating the OpenAI Model Inference integration account. Set exactly one + * method. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceIntegrationAccountAuthenticationUpdate getAuthentication() { + return authentication; + } + + public void setAuthentication( + OpenAIModelInferenceIntegrationAccountAuthenticationUpdate authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountUpdateAttributes dataflows( + OpenAIModelInferenceIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Data Datadog collects from OpenAI Model Inference, keyed by dataflow ID. Each dataflow turns on + * a distinct type of collection. Set enabled to start or stop a dataflow. The + * default for each dataflow applies when the account is created. On update, omitted fields keep + * their current values. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceIntegrationDataflowsRequest getDataflows() { + return dataflows; + } + + public void setDataflows(OpenAIModelInferenceIntegrationDataflowsRequest dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the OpenAI Model Inference 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 OpenAIModelInferenceIntegrationAccountUpdateAttributes settings( + OpenAIModelInferenceIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for updating the OpenAI Model Inference integration account. Only the fields provided + * are changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceIntegrationAccountSettingsUpdate getSettings() { + return settings; + } + + public void setSettings(OpenAIModelInferenceIntegrationAccountSettingsUpdate 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 OpenAIModelInferenceIntegrationAccountUpdateAttributes + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountUpdateAttributes 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 OpenAIModelInferenceIntegrationAccountUpdateAttributes object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountUpdateAttributes + openAiModelInferenceIntegrationAccountUpdateAttributes = + (OpenAIModelInferenceIntegrationAccountUpdateAttributes) o; + return Objects.equals( + this.authentication, + openAiModelInferenceIntegrationAccountUpdateAttributes.authentication) + && Objects.equals( + this.dataflows, openAiModelInferenceIntegrationAccountUpdateAttributes.dataflows) + && Objects.equals(this.name, openAiModelInferenceIntegrationAccountUpdateAttributes.name) + && Objects.equals( + this.settings, openAiModelInferenceIntegrationAccountUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountUpdateAttributes {\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/OpenAIModelInferenceIntegrationAccountUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateData.java new file mode 100644 index 00000000000..335963b89d1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateData.java @@ -0,0 +1,222 @@ +/* + * 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 Model Inference integration account. */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationAccountUpdateData.JSON_PROPERTY_ATTRIBUTES, + OpenAIModelInferenceIntegrationAccountUpdateData.JSON_PROPERTY_ID, + OpenAIModelInferenceIntegrationAccountUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OpenAIModelInferenceIntegrationAccountUpdateAttributes 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 OpenAIModelInferenceIntegrationAccountUpdateData() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OpenAIModelInferenceIntegrationAccountUpdateAttributes 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 OpenAIModelInferenceIntegrationAccountUpdateData attributes( + OpenAIModelInferenceIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Writable attributes used to update an OpenAI Model Inference integration account. Every field + * is optional. Only the provided fields are changed. When dataflows is provided, + * only the dataflow IDs 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 OpenAIModelInferenceIntegrationAccountUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OpenAIModelInferenceIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the OpenAI Model Inference 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 OpenAIModelInferenceIntegrationAccountUpdateData 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 OpenAIModelInferenceIntegrationAccountUpdateData + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountUpdateData 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 OpenAIModelInferenceIntegrationAccountUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountUpdateData + openAiModelInferenceIntegrationAccountUpdateData = + (OpenAIModelInferenceIntegrationAccountUpdateData) o; + return Objects.equals( + this.attributes, openAiModelInferenceIntegrationAccountUpdateData.attributes) + && Objects.equals(this.id, openAiModelInferenceIntegrationAccountUpdateData.id) + && Objects.equals(this.type, openAiModelInferenceIntegrationAccountUpdateData.type) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountUpdateData {\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/OpenAIModelInferenceIntegrationAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateRequest.java new file mode 100644 index 00000000000..18e34f81364 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountUpdateRequest.java @@ -0,0 +1,157 @@ +/* + * 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 Model Inference integration account. */ +@JsonPropertyOrder({OpenAIModelInferenceIntegrationAccountUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OpenAIModelInferenceIntegrationAccountUpdateData data; + + public OpenAIModelInferenceIntegrationAccountUpdateRequest() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OpenAIModelInferenceIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OpenAIModelInferenceIntegrationAccountUpdateRequest data( + OpenAIModelInferenceIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for updating an OpenAI Model Inference integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OpenAIModelInferenceIntegrationAccountUpdateData getData() { + return data; + } + + public void setData(OpenAIModelInferenceIntegrationAccountUpdateData 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 OpenAIModelInferenceIntegrationAccountUpdateRequest + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountUpdateRequest 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 OpenAIModelInferenceIntegrationAccountUpdateRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountUpdateRequest + openAiModelInferenceIntegrationAccountUpdateRequest = + (OpenAIModelInferenceIntegrationAccountUpdateRequest) o; + return Objects.equals(this.data, openAiModelInferenceIntegrationAccountUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountUpdateRequest {\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/OpenAIModelInferenceIntegrationAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountsResponse.java new file mode 100644 index 00000000000..88d5f27c333 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationAccountsResponse.java @@ -0,0 +1,170 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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 Model Inference integration accounts. */ +@JsonPropertyOrder({OpenAIModelInferenceIntegrationAccountsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationAccountsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public OpenAIModelInferenceIntegrationAccountsResponse() {} + + @JsonCreator + public OpenAIModelInferenceIntegrationAccountsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (OpenAIModelInferenceIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + } + + public OpenAIModelInferenceIntegrationAccountsResponse data( + List data) { + this.data = data; + for (OpenAIModelInferenceIntegrationAccountResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public OpenAIModelInferenceIntegrationAccountsResponse addDataItem( + OpenAIModelInferenceIntegrationAccountResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of OpenAI Model Inference 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 (OpenAIModelInferenceIntegrationAccountResponseData 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 OpenAIModelInferenceIntegrationAccountsResponse + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationAccountsResponse 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 OpenAIModelInferenceIntegrationAccountsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationAccountsResponse + openAiModelInferenceIntegrationAccountsResponse = + (OpenAIModelInferenceIntegrationAccountsResponse) o; + return Objects.equals(this.data, openAiModelInferenceIntegrationAccountsResponse.data) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationAccountsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationAccountsResponse {\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/OpenAIModelInferenceIntegrationDataflowsRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationDataflowsRequest.java new file mode 100644 index 00000000000..dfc0795bf49 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationDataflowsRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Data Datadog collects from OpenAI Model Inference, keyed by dataflow ID. Each dataflow turns on a + * distinct type of collection. Set enabled to start or stop a dataflow. The default + * for each dataflow applies when the account is created. On update, omitted fields keep their + * current values. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationDataflowsRequest.JSON_PROPERTY_OPENAI_LLM_COMPLETIONS, + OpenAIModelInferenceIntegrationDataflowsRequest.JSON_PROPERTY_OPENAI_PROJECT_CLOUD_COST_DATA +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationDataflowsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OPENAI_LLM_COMPLETIONS = "openai-llm-completions"; + private OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest openaiLlmCompletions; + + public static final String JSON_PROPERTY_OPENAI_PROJECT_CLOUD_COST_DATA = + "openai-project-cloud-cost-data"; + private OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest + openaiProjectCloudCostData; + + public OpenAIModelInferenceIntegrationDataflowsRequest openaiLlmCompletions( + OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest openaiLlmCompletions) { + this.openaiLlmCompletions = openaiLlmCompletions; + this.unparsed |= openaiLlmCompletions.unparsed; + return this; + } + + /** + * Makes the key in authentication available to run evaluations in LLM Observability. While this dataflow + * is enabled, the API returns a 422 response for a key that cannot call the OpenAI + * chat completions endpoint. + * + * @return openaiLlmCompletions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_LLM_COMPLETIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest getOpenaiLlmCompletions() { + return openaiLlmCompletions; + } + + public void setOpenaiLlmCompletions( + OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest openaiLlmCompletions) { + this.openaiLlmCompletions = openaiLlmCompletions; + if (openaiLlmCompletions != null) { + this.unparsed |= openaiLlmCompletions.unparsed; + } + } + + public OpenAIModelInferenceIntegrationDataflowsRequest openaiProjectCloudCostData( + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest + openaiProjectCloudCostData) { + this.openaiProjectCloudCostData = openaiProjectCloudCostData; + this.unparsed |= openaiProjectCloudCostData.unparsed; + return this; + } + + /** + * Costs of the OpenAI project that owns the key in authentication. Analyze these + * costs in Cloud Cost Management. + * Cost data appears in Cloud Cost Management within 24 hours after you enable this dataflow. + * + * @return openaiProjectCloudCostData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_PROJECT_CLOUD_COST_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest + getOpenaiProjectCloudCostData() { + return openaiProjectCloudCostData; + } + + public void setOpenaiProjectCloudCostData( + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest + openaiProjectCloudCostData) { + this.openaiProjectCloudCostData = openaiProjectCloudCostData; + if (openaiProjectCloudCostData != null) { + this.unparsed |= openaiProjectCloudCostData.unparsed; + } + } + + /** Return true if this OpenAIModelInferenceIntegrationDataflowsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationDataflowsRequest + openAiModelInferenceIntegrationDataflowsRequest = + (OpenAIModelInferenceIntegrationDataflowsRequest) o; + return Objects.equals( + this.openaiLlmCompletions, + openAiModelInferenceIntegrationDataflowsRequest.openaiLlmCompletions) + && Objects.equals( + this.openaiProjectCloudCostData, + openAiModelInferenceIntegrationDataflowsRequest.openaiProjectCloudCostData); + } + + @Override + public int hashCode() { + return Objects.hash(openaiLlmCompletions, openaiProjectCloudCostData); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationDataflowsRequest {\n"); + sb.append(" openaiLlmCompletions: ") + .append(toIndentedString(openaiLlmCompletions)) + .append("\n"); + sb.append(" openaiProjectCloudCostData: ") + .append(toIndentedString(openaiProjectCloudCostData)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line 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/OpenAIModelInferenceIntegrationDataflowsResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationDataflowsResponse.java new file mode 100644 index 00000000000..cabf09c839a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceIntegrationDataflowsResponse.java @@ -0,0 +1,196 @@ +/* + * 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 Model Inference, keyed by dataflow ID. */ +@JsonPropertyOrder({ + OpenAIModelInferenceIntegrationDataflowsResponse.JSON_PROPERTY_OPENAI_LLM_COMPLETIONS, + OpenAIModelInferenceIntegrationDataflowsResponse.JSON_PROPERTY_OPENAI_PROJECT_CLOUD_COST_DATA +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceIntegrationDataflowsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OPENAI_LLM_COMPLETIONS = "openai-llm-completions"; + private OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse openaiLlmCompletions; + + public static final String JSON_PROPERTY_OPENAI_PROJECT_CLOUD_COST_DATA = + "openai-project-cloud-cost-data"; + private OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse + openaiProjectCloudCostData; + + public OpenAIModelInferenceIntegrationDataflowsResponse openaiLlmCompletions( + OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse openaiLlmCompletions) { + this.openaiLlmCompletions = openaiLlmCompletions; + this.unparsed |= openaiLlmCompletions.unparsed; + return this; + } + + /** + * Makes the key in authentication available to run evaluations in LLM Observability. + * + * @return openaiLlmCompletions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_LLM_COMPLETIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse getOpenaiLlmCompletions() { + return openaiLlmCompletions; + } + + public void setOpenaiLlmCompletions( + OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse openaiLlmCompletions) { + this.openaiLlmCompletions = openaiLlmCompletions; + if (openaiLlmCompletions != null) { + this.unparsed |= openaiLlmCompletions.unparsed; + } + } + + public OpenAIModelInferenceIntegrationDataflowsResponse openaiProjectCloudCostData( + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse + openaiProjectCloudCostData) { + this.openaiProjectCloudCostData = openaiProjectCloudCostData; + this.unparsed |= openaiProjectCloudCostData.unparsed; + return this; + } + + /** + * Costs of the OpenAI project that owns the key in authentication. Analyze these + * costs in Cloud Cost Management. + * + * @return openaiProjectCloudCostData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPENAI_PROJECT_CLOUD_COST_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse + getOpenaiProjectCloudCostData() { + return openaiProjectCloudCostData; + } + + public void setOpenaiProjectCloudCostData( + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse + openaiProjectCloudCostData) { + this.openaiProjectCloudCostData = openaiProjectCloudCostData; + if (openaiProjectCloudCostData != null) { + this.unparsed |= openaiProjectCloudCostData.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 OpenAIModelInferenceIntegrationDataflowsResponse + */ + @JsonAnySetter + public OpenAIModelInferenceIntegrationDataflowsResponse 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 OpenAIModelInferenceIntegrationDataflowsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceIntegrationDataflowsResponse + openAiModelInferenceIntegrationDataflowsResponse = + (OpenAIModelInferenceIntegrationDataflowsResponse) o; + return Objects.equals( + this.openaiLlmCompletions, + openAiModelInferenceIntegrationDataflowsResponse.openaiLlmCompletions) + && Objects.equals( + this.openaiProjectCloudCostData, + openAiModelInferenceIntegrationDataflowsResponse.openaiProjectCloudCostData) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceIntegrationDataflowsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(openaiLlmCompletions, openaiProjectCloudCostData, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceIntegrationDataflowsResponse {\n"); + sb.append(" openaiLlmCompletions: ") + .append(toIndentedString(openaiLlmCompletions)) + .append("\n"); + sb.append(" openaiProjectCloudCostData: ") + .append(toIndentedString(openaiProjectCloudCostData)) + .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/OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest.java new file mode 100644 index 00000000000..23925f3d03e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest.java @@ -0,0 +1,95 @@ +/* + * 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; + +/** + * Makes the key in authentication available to run evaluations in LLM Observability. While this dataflow + * is enabled, the API returns a 422 response for a key that cannot call the OpenAI + * chat completions endpoint. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest.JSON_PROPERTY_ENABLED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest 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 OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest + openAiModelInferenceLlmCompletionsIntegrationDataflowRequest = + (OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, openAiModelInferenceLlmCompletionsIntegrationDataflowRequest.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceLLMCompletionsIntegrationDataflowRequest {\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/OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse.java new file mode 100644 index 00000000000..888ce0c079b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse.java @@ -0,0 +1,168 @@ +/* + * 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; + +/** + * Makes the key in authentication available to run evaluations in LLM Observability. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse { + @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 OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse 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 OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse + */ + @JsonAnySetter + public OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse 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 OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse + openAiModelInferenceLlmCompletionsIntegrationDataflowResponse = + (OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, openAiModelInferenceLlmCompletionsIntegrationDataflowResponse.enabled) + && Objects.equals( + this.status, openAiModelInferenceLlmCompletionsIntegrationDataflowResponse.status) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceLlmCompletionsIntegrationDataflowResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceLLMCompletionsIntegrationDataflowResponse {\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/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest.java new file mode 100644 index 00000000000..bd17ea99731 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest.java @@ -0,0 +1,95 @@ +/* + * 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; + +/** + * Costs of the OpenAI project that owns the key in authentication. Analyze these costs + * in Cloud Cost Management. Cost + * data appears in Cloud Cost Management within 24 hours after you enable this dataflow. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest.JSON_PROPERTY_ENABLED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest 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 OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest + openAiModelInferenceProjectCloudCostDataIntegrationDataflowRequest = + (OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest) o; + return Objects.equals( + this.enabled, openAiModelInferenceProjectCloudCostDataIntegrationDataflowRequest.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowRequest {\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/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse.java new file mode 100644 index 00000000000..4cd320de4e9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse.java @@ -0,0 +1,171 @@ +/* + * 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; + +/** + * Costs of the OpenAI project that owns the key in authentication. Analyze these costs + * in Cloud Cost Management. + */ +@JsonPropertyOrder({ + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse.JSON_PROPERTY_ENABLED, + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse { + @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 OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse 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 OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse + */ + @JsonAnySetter + public OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse 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 OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse + openAiModelInferenceProjectCloudCostDataIntegrationDataflowResponse = + (OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse) o; + return Objects.equals( + this.enabled, + openAiModelInferenceProjectCloudCostDataIntegrationDataflowResponse.enabled) + && Objects.equals( + this.status, openAiModelInferenceProjectCloudCostDataIntegrationDataflowResponse.status) + && Objects.equals( + this.additionalProperties, + openAiModelInferenceProjectCloudCostDataIntegrationDataflowResponse + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenAIModelInferenceProjectCloudCostDataIntegrationDataflowResponse {\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_model_inference_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/openai_model_inference_integration.feature new file mode 100644 index 00000000000..08675f2672f --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/openai_model_inference_integration.feature @@ -0,0 +1,148 @@ +@endpoint(openai-model-inference-integration) @endpoint(openai-model-inference-integration-v2) +Feature: OpenAI Model Inference Integration + Manage your Datadog OpenAI Model Inference integration accounts and + account resources directly through the Datadog API. See the [OpenAI + integration page](https://docs.datadoghq.com/integrations/openai/) for + more information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "OpenAIModelInferenceIntegration" API + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Create an OpenAI Model Inference account returns "Bad Request" response + Given operation "CreateOpenAIModelInferenceIntegrationAccount" enabled + And new "CreateOpenAIModelInferenceIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-llm-completions": {"enabled": true}, "openai-project-cloud-cost-data": {"enabled": true}}, "name": "openai-model-inference-acme", "settings": {"custom_tags": "team:ai,env:prod"}}, "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 Model Inference account returns "Created" response + Given operation "CreateOpenAIModelInferenceIntegrationAccount" enabled + And new "CreateOpenAIModelInferenceIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-llm-completions": {"enabled": true}, "openai-project-cloud-cost-data": {"enabled": true}}, "name": "openai-model-inference-acme", "settings": {"custom_tags": "team:ai,env:prod"}}, "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 Model Inference account returns "Not Found" response + Given operation "CreateOpenAIModelInferenceIntegrationAccount" enabled + And new "CreateOpenAIModelInferenceIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-llm-completions": {"enabled": true}, "openai-project-cloud-cost-data": {"enabled": true}}, "name": "openai-model-inference-acme", "settings": {"custom_tags": "team:ai,env:prod"}}, "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 Model Inference account returns "The server cannot process the request because it contains invalid data." response + Given operation "CreateOpenAIModelInferenceIntegrationAccount" enabled + And new "CreateOpenAIModelInferenceIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-llm-completions": {"enabled": true}, "openai-project-cloud-cost-data": {"enabled": true}}, "name": "openai-model-inference-acme", "settings": {"custom_tags": "team:ai,env:prod"}}, "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 Model Inference account returns "Bad Request" response + Given operation "DeleteOpenAIModelInferenceIntegrationAccount" enabled + And new "DeleteOpenAIModelInferenceIntegrationAccount" 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 Model Inference account returns "Not Found" response + Given operation "DeleteOpenAIModelInferenceIntegrationAccount" enabled + And new "DeleteOpenAIModelInferenceIntegrationAccount" 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 Model Inference account returns "OK" response + Given operation "DeleteOpenAIModelInferenceIntegrationAccount" enabled + And new "DeleteOpenAIModelInferenceIntegrationAccount" 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 Model Inference account returns "Bad Request" response + Given operation "GetOpenAIModelInferenceIntegrationAccount" enabled + And new "GetOpenAIModelInferenceIntegrationAccount" 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 Model Inference account returns "Not Found" response + Given operation "GetOpenAIModelInferenceIntegrationAccount" enabled + And new "GetOpenAIModelInferenceIntegrationAccount" 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 Model Inference account returns "OK" response + Given operation "GetOpenAIModelInferenceIntegrationAccount" enabled + And new "GetOpenAIModelInferenceIntegrationAccount" 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 Model Inference accounts returns "Bad Request" response + Given operation "ListOpenAIModelInferenceIntegrationAccounts" enabled + And new "ListOpenAIModelInferenceIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/saas-integrations + Scenario: List OpenAI Model Inference accounts returns "Not Found" response + Given operation "ListOpenAIModelInferenceIntegrationAccounts" enabled + And new "ListOpenAIModelInferenceIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/saas-integrations + Scenario: List OpenAI Model Inference accounts returns "OK" response + Given operation "ListOpenAIModelInferenceIntegrationAccounts" enabled + And new "ListOpenAIModelInferenceIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/saas-integrations + Scenario: Update an OpenAI Model Inference account returns "Bad Request" response + Given operation "UpdateOpenAIModelInferenceIntegrationAccount" enabled + And new "UpdateOpenAIModelInferenceIntegrationAccount" 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-llm-completions": {"enabled": true}, "openai-project-cloud-cost-data": {"enabled": true}}, "name": "openai-model-inference-acme", "settings": {"custom_tags": "team:ai,env:prod"}}, "id": "3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63", "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 Model Inference account returns "Not Found" response + Given operation "UpdateOpenAIModelInferenceIntegrationAccount" enabled + And new "UpdateOpenAIModelInferenceIntegrationAccount" 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-llm-completions": {"enabled": true}, "openai-project-cloud-cost-data": {"enabled": true}}, "name": "openai-model-inference-acme", "settings": {"custom_tags": "team:ai,env:prod"}}, "id": "3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63", "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 Model Inference account returns "OK" response + Given operation "UpdateOpenAIModelInferenceIntegrationAccount" enabled + And new "UpdateOpenAIModelInferenceIntegrationAccount" 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-llm-completions": {"enabled": true}, "openai-project-cloud-cost-data": {"enabled": true}}, "name": "openai-model-inference-acme", "settings": {"custom_tags": "team:ai,env:prod"}}, "id": "3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63", "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 Model Inference account returns "The server cannot process the request because it contains invalid data." response + Given operation "UpdateOpenAIModelInferenceIntegrationAccount" enabled + And new "UpdateOpenAIModelInferenceIntegrationAccount" 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-llm-completions": {"enabled": true}, "openai-project-cloud-cost-data": {"enabled": true}}, "name": "openai-model-inference-acme", "settings": {"custom_tags": "team:ai,env:prod"}}, "id": "3f8b2c1d-6e4a-4b9f-8c2d-1a7e5b9c0f63", "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 294d6dfb418..d2d31590386 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 @@ -2306,6 +2306,19 @@ "type": "unsafe" } }, + "CreateOpenAIModelInferenceIntegrationAccount": { + "tag": "OpenAI Model Inference Integration", + "undo": { + "operationId": "DeleteOpenAIModelInferenceIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, "CreateOpenAPI": { "tag": "API Management", "undo": { @@ -4470,6 +4483,12 @@ "type": "idempotent" } }, + "DeleteOpenAIModelInferenceIntegrationAccount": { + "tag": "OpenAI Model Inference Integration", + "undo": { + "type": "idempotent" + } + }, "DeleteOpenAPI": { "tag": "API Management", "undo": { @@ -6703,6 +6722,12 @@ "type": "safe" } }, + "GetOpenAIModelInferenceIntegrationAccount": { + "tag": "OpenAI Model Inference Integration", + "undo": { + "type": "safe" + } + }, "GetOpenAPI": { "tag": "API Management", "undo": { @@ -9088,6 +9113,12 @@ "type": "safe" } }, + "ListOpenAIModelInferenceIntegrationAccounts": { + "tag": "OpenAI Model Inference Integration", + "undo": { + "type": "safe" + } + }, "ListOpsgenieAccounts": { "tag": "Opsgenie Integration", "undo": { @@ -11835,6 +11866,12 @@ "type": "idempotent" } }, + "UpdateOpenAIModelInferenceIntegrationAccount": { + "tag": "OpenAI Model Inference Integration", + "undo": { + "type": "idempotent" + } + }, "UpdateOpenAPI": { "tag": "API Management", "undo": {