diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 23d3b7fb9b8..ae50edda97e 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -107467,6 +107467,275 @@ components:
required:
- type
type: object
+ OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest:
+ additionalProperties: false
+ description: >-
+ OpenAI organization costs, which you can analyze in [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). See [collected data](https://docs.datadoghq.com/cloud_cost_management/saas_costs/?tab=openai#data-collected) for what is included. 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
+ OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse:
+ description: >-
+ OpenAI organization costs, which you can analyze in [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). See [collected data](https://docs.datadoghq.com/cloud_cost_management/saas_costs/?tab=openai#data-collected) for what is included.
+ properties:
+ enabled:
+ description: Whether Datadog collects this data.
+ example: true
+ type: boolean
+ status:
+ $ref: "#/components/schemas/IntegrationAccountDataflowStatus"
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest:
+ description: Authentication for creating the OpenAI Usage and Costs integration account. Set exactly one method.
+ oneOf:
+ - $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest"
+ OpenAIUsageAndCostsIntegrationAccountAuthenticationResponse:
+ description: Authentication configured on the OpenAI Usage and Costs integration account.
+ oneOf:
+ - $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthResponse"
+ OpenAIUsageAndCostsIntegrationAccountAuthenticationUpdate:
+ description: Authentication for updating the OpenAI Usage and Costs integration account. Set exactly one method.
+ oneOf:
+ - $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthUpdate"
+ OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest:
+ additionalProperties: false
+ description: >-
+ Bearer token authentication. Use an admin-scoped OpenAI API key. Project-scoped and standard keys cannot read organization usage or costs. Requests with an invalid key, or with a key that is not an admin key, return a `422` response.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthType"
+ token:
+ description: Secret token used to authenticate with OpenAI.
+ example: your-token
+ type: string
+ writeOnly: true
+ required:
+ - auth_type
+ - token
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthResponse:
+ description: The bearer token authentication method configured on the account.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthType"
+ required:
+ - auth_type
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthType:
+ default: bearer_token
+ description: The authentication method type.
+ enum:
+ - bearer_token
+ example: bearer_token
+ type: string
+ x-enum-varnames:
+ - BEARER_TOKEN
+ OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthUpdate:
+ additionalProperties: false
+ description: >-
+ Bearer token authentication. Use an admin-scoped OpenAI API key. Project-scoped and standard keys cannot read organization usage or costs. Requests with an invalid key, or with a key that is not an admin key, return a `422` response. Only the provided fields are changed. To keep the stored token, omit `token`.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthType"
+ token:
+ description: Secret token used to authenticate with OpenAI.
+ example: your-token
+ type: string
+ writeOnly: true
+ required:
+ - auth_type
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountCreateAttributes:
+ description: Writable attributes used to create an OpenAI Usage and Costs integration account.
+ properties:
+ authentication:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest"
+ dataflows:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationDataflowsRequest"
+ name:
+ description: Human-readable name of the OpenAI Usage and Costs integration account.
+ example: openai-usage-and-costs-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountSettingsRequest"
+ required:
+ - name
+ - authentication
+ - settings
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountCreateData:
+ description: Data envelope for creating an OpenAI Usage and Costs integration account.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountCreateAttributes"
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - type
+ - attributes
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountCreateRequest:
+ description: Request payload to create an OpenAI Usage and Costs integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountCreateData"
+ required:
+ - data
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountResponse:
+ description: Response payload for a single OpenAI Usage and Costs integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountResponseData"
+ required:
+ - data
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountResponseAttributes:
+ description: Attributes of an OpenAI Usage and Costs integration account returned in responses.
+ properties:
+ authentication:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountAuthenticationResponse"
+ dataflows:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationDataflowsResponse"
+ name:
+ description: Human-readable name of the OpenAI Usage and Costs integration account.
+ example: openai-usage-and-costs-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountSettingsResponse"
+ required:
+ - name
+ - settings
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountResponseData:
+ description: Data envelope of an OpenAI Usage and Costs integration account, including server-assigned identity.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountResponseAttributes"
+ id:
+ description: Server-generated unique identifier of the OpenAI Usage and Costs integration account.
+ example: 9c4e7a2b-1d5f-4e8a-b3c6-0f2d8a6e4b17
+ readOnly: true
+ type: string
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - id
+ - attributes
+ - type
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountSettingsRequest:
+ additionalProperties: false
+ description: Settings for creating the OpenAI Usage and Costs 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
+ OpenAIUsageAndCostsIntegrationAccountSettingsResponse:
+ description: Settings configured on the OpenAI Usage and Costs 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
+ OpenAIUsageAndCostsIntegrationAccountSettingsUpdate:
+ additionalProperties: false
+ description: >-
+ Settings for updating the OpenAI Usage and Costs 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
+ OpenAIUsageAndCostsIntegrationAccountUpdateAttributes:
+ description: >-
+ Writable attributes used to update an OpenAI Usage and Costs 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/OpenAIUsageAndCostsIntegrationAccountAuthenticationUpdate"
+ dataflows:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationDataflowsRequest"
+ name:
+ description: Human-readable name of the OpenAI Usage and Costs integration account.
+ example: openai-usage-and-costs-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountSettingsUpdate"
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountUpdateData:
+ description: Data envelope for updating an OpenAI Usage and Costs integration account.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountUpdateAttributes"
+ id:
+ description: Unique identifier of the OpenAI Usage and Costs integration account to update.
+ example: 9c4e7a2b-1d5f-4e8a-b3c6-0f2d8a6e4b17
+ type: string
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountUpdateRequest:
+ description: Request payload to update an OpenAI Usage and Costs integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountUpdateData"
+ required:
+ - data
+ type: object
+ OpenAIUsageAndCostsIntegrationAccountsResponse:
+ description: Response payload for a list of OpenAI Usage and Costs integration accounts.
+ properties:
+ data:
+ description: List of OpenAI Usage and Costs integration accounts.
+ items:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountResponseData"
+ type: array
+ required:
+ - data
+ type: object
+ OpenAIUsageAndCostsIntegrationDataflowsRequest:
+ additionalProperties: false
+ description: >-
+ Data Datadog collects from OpenAI Usage and Costs, keyed by dataflow ID. Datadog always collects organization usage metrics. Each dataflow in this object adds another 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-cloud-cost-data:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest"
+ type: object
+ OpenAIUsageAndCostsIntegrationDataflowsResponse:
+ description: Data Datadog collects from OpenAI Usage and Costs, keyed by dataflow ID.
+ properties:
+ openai-cloud-cost-data:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse"
+ openai-usage-metrics:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsUsageMetricsIntegrationDataflowResponse"
+ type: object
+ OpenAIUsageAndCostsUsageMetricsIntegrationDataflowResponse:
+ description: >-
+ Organization usage metrics under the `openai.*` namespace, such as `openai.completions.*`, `openai.embeddings.*`, `openai.images.*`, `openai.moderations.*`, `openai.audio_speeches.*`, `openai.audio_transcriptions.*`, `openai.code_interpreter_sessions.*`, and `openai.vector_stores.*`. This dataflow is always on and cannot be turned off, so it appears only in responses.
+ properties:
+ enabled:
+ description: Whether Datadog collects this data. Always `true`, because this collection cannot be turned off.
+ example: true
+ readOnly: true
+ type: boolean
+ status:
+ $ref: "#/components/schemas/IntegrationAccountDataflowStatus"
+ type: object
OpenAPIEndpoint:
description: Endpoint info extracted from an `OpenAPI` specification.
properties:
@@ -211412,6 +211681,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-usage-and-costs/accounts:
+ get:
+ description: List OpenAI Usage and Costs integration accounts.
+ operationId: ListOpenAIUsageAndCostsIntegrationAccounts
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ openai-cloud-cost-data:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-usage-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ name: openai-usage-and-costs-acme
+ settings:
+ custom_tags: team:ai,env:prod
+ id: 9c4e7a2b-1d5f-4e8a-b3c6-0f2d8a6e4b17
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountsResponse"
+ 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 Usage and Costs accounts
+ tags:
+ - OpenAI Usage and Costs 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 Usage and Costs integration account.
+ operationId: CreateOpenAIUsageAndCostsIntegrationAccount
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountCreateRequest"
+ required: true
+ responses:
+ "201":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ openai-cloud-cost-data:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-usage-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ name: openai-usage-and-costs-acme
+ settings:
+ custom_tags: team:ai,env:prod
+ id: 9c4e7a2b-1d5f-4e8a-b3c6-0f2d8a6e4b17
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountResponse"
+ 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 Usage and Costs account
+ tags:
+ - OpenAI Usage and Costs 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-usage-and-costs/accounts/{account_id}:
+ delete:
+ description: Delete an OpenAI Usage and Costs integration account.
+ operationId: DeleteOpenAIUsageAndCostsIntegrationAccount
+ 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 Usage and Costs account
+ tags:
+ - OpenAI Usage and Costs 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 Usage and Costs integration account.
+ operationId: GetOpenAIUsageAndCostsIntegrationAccount
+ parameters:
+ - $ref: "#/components/parameters/IntegrationAccountIdParameter"
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ openai-cloud-cost-data:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-usage-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ name: openai-usage-and-costs-acme
+ settings:
+ custom_tags: team:ai,env:prod
+ id: 9c4e7a2b-1d5f-4e8a-b3c6-0f2d8a6e4b17
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountResponse"
+ 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 Usage and Costs account
+ tags:
+ - OpenAI Usage and Costs 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 Usage and Costs integration account. Only the fields provided are changed.
+ operationId: UpdateOpenAIUsageAndCostsIntegrationAccount
+ parameters:
+ - $ref: "#/components/parameters/IntegrationAccountIdParameter"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountUpdateRequest"
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ openai-cloud-cost-data:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-usage-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ name: openai-usage-and-costs-acme
+ settings:
+ custom_tags: team:ai,env:prod
+ id: 9c4e7a2b-1d5f-4e8a-b3c6-0f2d8a6e4b17
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/OpenAIUsageAndCostsIntegrationAccountResponse"
+ 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 Usage and Costs account
+ tags:
+ - OpenAI Usage and Costs 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 +289367,15 @@ tags:
description: OpenAI Codex integration.
url: https://docs.datadoghq.com/integrations/openai-codex/
name: OpenAI Codex Integration
+ - description: |-
+ Manage your Datadog OpenAI Usage and Costs 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 Usage and Costs Integration
- description: |-
Configure your [Datadog Opsgenie integration](https://docs.datadoghq.com/integrations/opsgenie/)
directly through the Datadog API.
diff --git a/examples/v2/openai-usage-and-costs-integration/CreateOpenAIUsageAndCostsIntegrationAccount.java b/examples/v2/openai-usage-and-costs-integration/CreateOpenAIUsageAndCostsIntegrationAccount.java
new file mode 100644
index 00000000000..b678cb6c99e
--- /dev/null
+++ b/examples/v2/openai-usage-and-costs-integration/CreateOpenAIUsageAndCostsIntegrationAccount.java
@@ -0,0 +1,65 @@
+// Create an OpenAI Usage and Costs account returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OpenAiUsageandCostsIntegrationApi;
+import com.datadog.api.client.v2.model.IntegrationAccountType;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthType;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountCreateAttributes;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountCreateData;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountCreateRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountResponse;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountSettingsRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationDataflowsRequest;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
+ defaultClient.setUnstableOperationEnabled(
+ "v2.createOpenAIUsageAndCostsIntegrationAccount", true);
+ OpenAiUsageandCostsIntegrationApi apiInstance =
+ new OpenAiUsageandCostsIntegrationApi(defaultClient);
+
+ OpenAIUsageAndCostsIntegrationAccountCreateRequest body =
+ new OpenAIUsageAndCostsIntegrationAccountCreateRequest()
+ .data(
+ new OpenAIUsageAndCostsIntegrationAccountCreateData()
+ .attributes(
+ new OpenAIUsageAndCostsIntegrationAccountCreateAttributes()
+ .authentication(
+ new OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest(
+ new OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest()
+ .authType(
+ OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthType
+ .BEARER_TOKEN)
+ .token("your-token")))
+ .dataflows(
+ new OpenAIUsageAndCostsIntegrationDataflowsRequest()
+ .openaiCloudCostData(
+ new OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest()
+ .enabled(true)))
+ .name("openai-usage-and-costs-acme")
+ .settings(
+ new OpenAIUsageAndCostsIntegrationAccountSettingsRequest()
+ .customTags("team:ai,env:prod")))
+ .type(IntegrationAccountType.INTEGRATION_ACCOUNT));
+
+ try {
+ OpenAIUsageAndCostsIntegrationAccountResponse result =
+ apiInstance.createOpenAIUsageAndCostsIntegrationAccount(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling"
+ + " OpenAiUsageandCostsIntegrationApi#createOpenAIUsageAndCostsIntegrationAccount");
+ 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-usage-and-costs-integration/DeleteOpenAIUsageAndCostsIntegrationAccount.java b/examples/v2/openai-usage-and-costs-integration/DeleteOpenAIUsageAndCostsIntegrationAccount.java
new file mode 100644
index 00000000000..5192f0ce3e9
--- /dev/null
+++ b/examples/v2/openai-usage-and-costs-integration/DeleteOpenAIUsageAndCostsIntegrationAccount.java
@@ -0,0 +1,28 @@
+// Delete an OpenAI Usage and Costs account returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OpenAiUsageandCostsIntegrationApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
+ defaultClient.setUnstableOperationEnabled(
+ "v2.deleteOpenAIUsageAndCostsIntegrationAccount", true);
+ OpenAiUsageandCostsIntegrationApi apiInstance =
+ new OpenAiUsageandCostsIntegrationApi(defaultClient);
+
+ try {
+ apiInstance.deleteOpenAIUsageAndCostsIntegrationAccount("account_id");
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling"
+ + " OpenAiUsageandCostsIntegrationApi#deleteOpenAIUsageAndCostsIntegrationAccount");
+ 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-usage-and-costs-integration/GetOpenAIUsageAndCostsIntegrationAccount.java b/examples/v2/openai-usage-and-costs-integration/GetOpenAIUsageAndCostsIntegrationAccount.java
new file mode 100644
index 00000000000..ea4b1500afd
--- /dev/null
+++ b/examples/v2/openai-usage-and-costs-integration/GetOpenAIUsageAndCostsIntegrationAccount.java
@@ -0,0 +1,30 @@
+// Get an OpenAI Usage and Costs account returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OpenAiUsageandCostsIntegrationApi;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
+ defaultClient.setUnstableOperationEnabled("v2.getOpenAIUsageAndCostsIntegrationAccount", true);
+ OpenAiUsageandCostsIntegrationApi apiInstance =
+ new OpenAiUsageandCostsIntegrationApi(defaultClient);
+
+ try {
+ OpenAIUsageAndCostsIntegrationAccountResponse result =
+ apiInstance.getOpenAIUsageAndCostsIntegrationAccount("account_id");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling"
+ + " OpenAiUsageandCostsIntegrationApi#getOpenAIUsageAndCostsIntegrationAccount");
+ 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-usage-and-costs-integration/ListOpenAIUsageAndCostsIntegrationAccounts.java b/examples/v2/openai-usage-and-costs-integration/ListOpenAIUsageAndCostsIntegrationAccounts.java
new file mode 100644
index 00000000000..1846a7a019f
--- /dev/null
+++ b/examples/v2/openai-usage-and-costs-integration/ListOpenAIUsageAndCostsIntegrationAccounts.java
@@ -0,0 +1,31 @@
+// List OpenAI Usage and Costs accounts returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OpenAiUsageandCostsIntegrationApi;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
+ defaultClient.setUnstableOperationEnabled(
+ "v2.listOpenAIUsageAndCostsIntegrationAccounts", true);
+ OpenAiUsageandCostsIntegrationApi apiInstance =
+ new OpenAiUsageandCostsIntegrationApi(defaultClient);
+
+ try {
+ OpenAIUsageAndCostsIntegrationAccountsResponse result =
+ apiInstance.listOpenAIUsageAndCostsIntegrationAccounts();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling"
+ + " OpenAiUsageandCostsIntegrationApi#listOpenAIUsageAndCostsIntegrationAccounts");
+ 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-usage-and-costs-integration/UpdateOpenAIUsageAndCostsIntegrationAccount.java b/examples/v2/openai-usage-and-costs-integration/UpdateOpenAIUsageAndCostsIntegrationAccount.java
new file mode 100644
index 00000000000..8059767e890
--- /dev/null
+++ b/examples/v2/openai-usage-and-costs-integration/UpdateOpenAIUsageAndCostsIntegrationAccount.java
@@ -0,0 +1,66 @@
+// Update an OpenAI Usage and Costs account returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.OpenAiUsageandCostsIntegrationApi;
+import com.datadog.api.client.v2.model.IntegrationAccountType;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountAuthenticationUpdate;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthType;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthUpdate;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountResponse;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountSettingsUpdate;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountUpdateAttributes;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountUpdateData;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountUpdateRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationDataflowsRequest;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
+ defaultClient.setUnstableOperationEnabled(
+ "v2.updateOpenAIUsageAndCostsIntegrationAccount", true);
+ OpenAiUsageandCostsIntegrationApi apiInstance =
+ new OpenAiUsageandCostsIntegrationApi(defaultClient);
+
+ OpenAIUsageAndCostsIntegrationAccountUpdateRequest body =
+ new OpenAIUsageAndCostsIntegrationAccountUpdateRequest()
+ .data(
+ new OpenAIUsageAndCostsIntegrationAccountUpdateData()
+ .attributes(
+ new OpenAIUsageAndCostsIntegrationAccountUpdateAttributes()
+ .authentication(
+ new OpenAIUsageAndCostsIntegrationAccountAuthenticationUpdate(
+ new OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthUpdate()
+ .authType(
+ OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthType
+ .BEARER_TOKEN)
+ .token("your-token")))
+ .dataflows(
+ new OpenAIUsageAndCostsIntegrationDataflowsRequest()
+ .openaiCloudCostData(
+ new OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest()
+ .enabled(true)))
+ .name("openai-usage-and-costs-acme")
+ .settings(
+ new OpenAIUsageAndCostsIntegrationAccountSettingsUpdate()
+ .customTags("team:ai,env:prod")))
+ .id("9c4e7a2b-1d5f-4e8a-b3c6-0f2d8a6e4b17")
+ .type(IntegrationAccountType.INTEGRATION_ACCOUNT));
+
+ try {
+ OpenAIUsageAndCostsIntegrationAccountResponse result =
+ apiInstance.updateOpenAIUsageAndCostsIntegrationAccount("account_id", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling"
+ + " OpenAiUsageandCostsIntegrationApi#updateOpenAIUsageAndCostsIntegrationAccount");
+ 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..9411b1608fa 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.createOpenAIUsageAndCostsIntegrationAccount", false);
+ put("v2.deleteOpenAIUsageAndCostsIntegrationAccount", false);
+ put("v2.getOpenAIUsageAndCostsIntegrationAccount", false);
+ put("v2.listOpenAIUsageAndCostsIntegrationAccounts", false);
+ put("v2.updateOpenAIUsageAndCostsIntegrationAccount", 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/OpenAiUsageAndCostsIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/OpenAiUsageAndCostsIntegrationApi.java
new file mode 100644
index 00000000000..313cda4bbf1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/OpenAiUsageAndCostsIntegrationApi.java
@@ -0,0 +1,859 @@
+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.OpenAIUsageAndCostsIntegrationAccountCreateRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountResponse;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountUpdateRequest;
+import com.datadog.api.client.v2.model.OpenAIUsageAndCostsIntegrationAccountsResponse;
+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 OpenAiUsageAndCostsIntegrationApi {
+ private ApiClient apiClient;
+
+ public OpenAiUsageAndCostsIntegrationApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public OpenAiUsageAndCostsIntegrationApi(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 Usage and Costs account.
+ *
+ *
See {@link #createOpenAIUsageAndCostsIntegrationAccountWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return OpenAIUsageAndCostsIntegrationAccountResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OpenAIUsageAndCostsIntegrationAccountResponse createOpenAIUsageAndCostsIntegrationAccount(
+ OpenAIUsageAndCostsIntegrationAccountCreateRequest body) throws ApiException {
+ return createOpenAIUsageAndCostsIntegrationAccountWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create an OpenAI Usage and Costs account.
+ *
+ *
See {@link #createOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<OpenAIUsageAndCostsIntegrationAccountResponse>
+ */
+ public CompletableFuture
+ createOpenAIUsageAndCostsIntegrationAccountAsync(
+ OpenAIUsageAndCostsIntegrationAccountCreateRequest body) {
+ return createOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create an OpenAI Usage and Costs integration account.
+ *
+ * @param body (required)
+ * @return ApiResponse<OpenAIUsageAndCostsIntegrationAccountResponse>
+ * @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
+ createOpenAIUsageAndCostsIntegrationAccountWithHttpInfo(
+ OpenAIUsageAndCostsIntegrationAccountCreateRequest body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createOpenAIUsageAndCostsIntegrationAccount";
+ 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"
+ + " createOpenAIUsageAndCostsIntegrationAccount");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/integration-interfaces/openai-usage-and-costs/accounts";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.createOpenAIUsageAndCostsIntegrationAccount",
+ 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 Usage and Costs account.
+ *
+ * See {@link #createOpenAIUsageAndCostsIntegrationAccountWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return
+ * CompletableFuture<ApiResponse<OpenAIUsageAndCostsIntegrationAccountResponse>>
+ */
+ public CompletableFuture>
+ createOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync(
+ OpenAIUsageAndCostsIntegrationAccountCreateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "createOpenAIUsageAndCostsIntegrationAccount";
+ 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"
+ + " createOpenAIUsageAndCostsIntegrationAccount"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/integration-interfaces/openai-usage-and-costs/accounts";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.createOpenAIUsageAndCostsIntegrationAccount",
+ 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 Usage and Costs account.
+ *
+ * See {@link #deleteOpenAIUsageAndCostsIntegrationAccountWithHttpInfo}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteOpenAIUsageAndCostsIntegrationAccount(String accountId) throws ApiException {
+ deleteOpenAIUsageAndCostsIntegrationAccountWithHttpInfo(accountId);
+ }
+
+ /**
+ * Delete an OpenAI Usage and Costs account.
+ *
+ *
See {@link #deleteOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteOpenAIUsageAndCostsIntegrationAccountAsync(
+ String accountId) {
+ return deleteOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync(accountId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete an OpenAI Usage and Costs 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 deleteOpenAIUsageAndCostsIntegrationAccountWithHttpInfo(String accountId)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "deleteOpenAIUsageAndCostsIntegrationAccount";
+ 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"
+ + " deleteOpenAIUsageAndCostsIntegrationAccount");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration-interfaces/openai-usage-and-costs/accounts/{account_id}"
+ .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.deleteOpenAIUsageAndCostsIntegrationAccount",
+ 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 Usage and Costs account.
+ *
+ * See {@link #deleteOpenAIUsageAndCostsIntegrationAccountWithHttpInfo}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture>
+ deleteOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync(String accountId) {
+ // Check if unstable operation is enabled
+ String operationId = "deleteOpenAIUsageAndCostsIntegrationAccount";
+ 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"
+ + " deleteOpenAIUsageAndCostsIntegrationAccount"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration-interfaces/openai-usage-and-costs/accounts/{account_id}"
+ .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.deleteOpenAIUsageAndCostsIntegrationAccount",
+ 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 Usage and Costs account.
+ *
+ * See {@link #getOpenAIUsageAndCostsIntegrationAccountWithHttpInfo}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @return OpenAIUsageAndCostsIntegrationAccountResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OpenAIUsageAndCostsIntegrationAccountResponse getOpenAIUsageAndCostsIntegrationAccount(
+ String accountId) throws ApiException {
+ return getOpenAIUsageAndCostsIntegrationAccountWithHttpInfo(accountId).getData();
+ }
+
+ /**
+ * Get an OpenAI Usage and Costs account.
+ *
+ *
See {@link #getOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @return CompletableFuture<OpenAIUsageAndCostsIntegrationAccountResponse>
+ */
+ public CompletableFuture
+ getOpenAIUsageAndCostsIntegrationAccountAsync(String accountId) {
+ return getOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync(accountId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get an OpenAI Usage and Costs integration account.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @return ApiResponse<OpenAIUsageAndCostsIntegrationAccountResponse>
+ * @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
+ getOpenAIUsageAndCostsIntegrationAccountWithHttpInfo(String accountId) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getOpenAIUsageAndCostsIntegrationAccount";
+ 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"
+ + " getOpenAIUsageAndCostsIntegrationAccount");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration-interfaces/openai-usage-and-costs/accounts/{account_id}"
+ .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.getOpenAIUsageAndCostsIntegrationAccount",
+ 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 Usage and Costs account.
+ *
+ * See {@link #getOpenAIUsageAndCostsIntegrationAccountWithHttpInfo}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @return
+ * CompletableFuture<ApiResponse<OpenAIUsageAndCostsIntegrationAccountResponse>>
+ */
+ public CompletableFuture>
+ getOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync(String accountId) {
+ // Check if unstable operation is enabled
+ String operationId = "getOpenAIUsageAndCostsIntegrationAccount";
+ 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"
+ + " getOpenAIUsageAndCostsIntegrationAccount"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration-interfaces/openai-usage-and-costs/accounts/{account_id}"
+ .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.getOpenAIUsageAndCostsIntegrationAccount",
+ 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 Usage and Costs accounts.
+ *
+ * See {@link #listOpenAIUsageAndCostsIntegrationAccountsWithHttpInfo}.
+ *
+ * @return OpenAIUsageAndCostsIntegrationAccountsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OpenAIUsageAndCostsIntegrationAccountsResponse listOpenAIUsageAndCostsIntegrationAccounts()
+ throws ApiException {
+ return listOpenAIUsageAndCostsIntegrationAccountsWithHttpInfo().getData();
+ }
+
+ /**
+ * List OpenAI Usage and Costs accounts.
+ *
+ *
See {@link #listOpenAIUsageAndCostsIntegrationAccountsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<OpenAIUsageAndCostsIntegrationAccountsResponse>
+ */
+ public CompletableFuture
+ listOpenAIUsageAndCostsIntegrationAccountsAsync() {
+ return listOpenAIUsageAndCostsIntegrationAccountsWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List OpenAI Usage and Costs integration accounts.
+ *
+ * @return ApiResponse<OpenAIUsageAndCostsIntegrationAccountsResponse>
+ * @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
+ listOpenAIUsageAndCostsIntegrationAccountsWithHttpInfo() throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "listOpenAIUsageAndCostsIntegrationAccounts";
+ 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-usage-and-costs/accounts";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.listOpenAIUsageAndCostsIntegrationAccounts",
+ 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 Usage and Costs accounts.
+ *
+ * See {@link #listOpenAIUsageAndCostsIntegrationAccountsWithHttpInfo}.
+ *
+ * @return
+ * CompletableFuture<ApiResponse<OpenAIUsageAndCostsIntegrationAccountsResponse>>
+ */
+ public CompletableFuture>
+ listOpenAIUsageAndCostsIntegrationAccountsWithHttpInfoAsync() {
+ // Check if unstable operation is enabled
+ String operationId = "listOpenAIUsageAndCostsIntegrationAccounts";
+ 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-usage-and-costs/accounts";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.listOpenAIUsageAndCostsIntegrationAccounts",
+ 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 Usage and Costs account.
+ *
+ * See {@link #updateOpenAIUsageAndCostsIntegrationAccountWithHttpInfo}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @param body (required)
+ * @return OpenAIUsageAndCostsIntegrationAccountResponse
+ * @throws ApiException if fails to make API call
+ */
+ public OpenAIUsageAndCostsIntegrationAccountResponse updateOpenAIUsageAndCostsIntegrationAccount(
+ String accountId, OpenAIUsageAndCostsIntegrationAccountUpdateRequest body)
+ throws ApiException {
+ return updateOpenAIUsageAndCostsIntegrationAccountWithHttpInfo(accountId, body).getData();
+ }
+
+ /**
+ * Update an OpenAI Usage and Costs account.
+ *
+ *
See {@link #updateOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @param body (required)
+ * @return CompletableFuture<OpenAIUsageAndCostsIntegrationAccountResponse>
+ */
+ public CompletableFuture
+ updateOpenAIUsageAndCostsIntegrationAccountAsync(
+ String accountId, OpenAIUsageAndCostsIntegrationAccountUpdateRequest body) {
+ return updateOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync(accountId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update an OpenAI Usage and Costs integration account. Only the fields provided are changed.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @param body (required)
+ * @return ApiResponse<OpenAIUsageAndCostsIntegrationAccountResponse>
+ * @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
+ updateOpenAIUsageAndCostsIntegrationAccountWithHttpInfo(
+ String accountId, OpenAIUsageAndCostsIntegrationAccountUpdateRequest body)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "updateOpenAIUsageAndCostsIntegrationAccount";
+ 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"
+ + " updateOpenAIUsageAndCostsIntegrationAccount");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling"
+ + " updateOpenAIUsageAndCostsIntegrationAccount");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration-interfaces/openai-usage-and-costs/accounts/{account_id}"
+ .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.updateOpenAIUsageAndCostsIntegrationAccount",
+ 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 Usage and Costs account.
+ *
+ * See {@link #updateOpenAIUsageAndCostsIntegrationAccountWithHttpInfo}.
+ *
+ * @param accountId Unique identifier of the integration account. (required)
+ * @param body (required)
+ * @return
+ * CompletableFuture<ApiResponse<OpenAIUsageAndCostsIntegrationAccountResponse>>
+ */
+ public CompletableFuture>
+ updateOpenAIUsageAndCostsIntegrationAccountWithHttpInfoAsync(
+ String accountId, OpenAIUsageAndCostsIntegrationAccountUpdateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "updateOpenAIUsageAndCostsIntegrationAccount";
+ 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"
+ + " updateOpenAIUsageAndCostsIntegrationAccount"));
+ 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"
+ + " updateOpenAIUsageAndCostsIntegrationAccount"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration-interfaces/openai-usage-and-costs/accounts/{account_id}"
+ .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.OpenAiUsageAndCostsIntegrationApi.updateOpenAIUsageAndCostsIntegrationAccount",
+ 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/OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest.java
new file mode 100644
index 00000000000..71e8a4731ad
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest.java
@@ -0,0 +1,96 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.Objects;
+
+/**
+ * OpenAI organization costs, which you can analyze in Cloud Cost Management. See collected
+ * data for what is included. Cost data appears in Cloud Cost Management within 24 hours after
+ * you enable this dataflow.
+ */
+@JsonPropertyOrder({
+ OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest.JSON_PROPERTY_ENABLED
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ENABLED = "enabled";
+ private Boolean enabled;
+
+ public OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest 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 OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest object is equal
+ * to o.
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest
+ openAiUsageAndCostsCloudCostDataIntegrationDataflowRequest =
+ (OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest) o;
+ return Objects.equals(
+ this.enabled, openAiUsageAndCostsCloudCostDataIntegrationDataflowRequest.enabled);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(enabled);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OpenAIUsageAndCostsCloudCostDataIntegrationDataflowRequest {\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/OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse.java
new file mode 100644
index 00000000000..1fbf704fb0b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse.java
@@ -0,0 +1,170 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * OpenAI organization costs, which you can analyze in Cloud Cost Management. See collected
+ * data for what is included.
+ */
+@JsonPropertyOrder({
+ OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse.JSON_PROPERTY_ENABLED,
+ OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse.JSON_PROPERTY_STATUS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse {
+ @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 OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse 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 OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse
+ */
+ @JsonAnySetter
+ public OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse 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 OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse object is equal
+ * to o.
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse
+ openAiUsageAndCostsCloudCostDataIntegrationDataflowResponse =
+ (OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse) o;
+ return Objects.equals(
+ this.enabled, openAiUsageAndCostsCloudCostDataIntegrationDataflowResponse.enabled)
+ && Objects.equals(
+ this.status, openAiUsageAndCostsCloudCostDataIntegrationDataflowResponse.status)
+ && Objects.equals(
+ this.additionalProperties,
+ openAiUsageAndCostsCloudCostDataIntegrationDataflowResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(enabled, status, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OpenAIUsageAndCostsCloudCostDataIntegrationDataflowResponse {\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/OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest.java b/src/main/java/com/datadog/api/client/v2/model/OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest.java
new file mode 100644
index 00000000000..5bd85941e6e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest.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 =
+ OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest
+ .OpenAIUsageAndCostsIntegrationAccountAuthenticationRequestDeserializer.class)
+@JsonSerialize(
+ using =
+ OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest
+ .OpenAIUsageAndCostsIntegrationAccountAuthenticationRequestSerializer.class)
+public class OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest
+ extends AbstractOpenApiSchema {
+ private static final Logger log =
+ Logger.getLogger(OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class OpenAIUsageAndCostsIntegrationAccountAuthenticationRequestSerializer
+ extends StdSerializer {
+ public OpenAIUsageAndCostsIntegrationAccountAuthenticationRequestSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public OpenAIUsageAndCostsIntegrationAccountAuthenticationRequestSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest value,
+ JsonGenerator jgen,
+ SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class OpenAIUsageAndCostsIntegrationAccountAuthenticationRequestDeserializer
+ extends StdDeserializer {
+ public OpenAIUsageAndCostsIntegrationAccountAuthenticationRequestDeserializer() {
+ this(OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest.class);
+ }
+
+ public OpenAIUsageAndCostsIntegrationAccountAuthenticationRequestDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest 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 OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(Integer.class)
+ || OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(Long.class)
+ || OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(Float.class)
+ || OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ Double.class)
+ || OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ Boolean.class)
+ || OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ Integer.class)
+ || OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ Float.class)
+ || OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.class.equals(
+ String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp =
+ tree.traverse(jp.getCodec())
+ .readValueAs(OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest.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 (!((OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(
+ Level.FINER,
+ "Input data matches schema"
+ + " 'OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(
+ Level.FINER,
+ "Input data does not match schema"
+ + " 'OpenAIUsageAndCostsIntegrationAccountBearerTokenAuthRequest'",
+ e);
+ }
+
+ OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest ret =
+ new OpenAIUsageAndCostsIntegrationAccountAuthenticationRequest();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference