From e1123a3c5e4c72ada6950dd2526b5c837800594b Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 04:06:33 +0000 Subject: [PATCH] Regenerate client from commit 1a314fa of spec repo (#3451) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v1/openapi.yaml | 38 ++++++++++--------- .generator/schemas/v2/openapi.yaml | 31 +++++++++++++++ .../v1/api/usage_metering_api.rb | 11 +++--- .../v1/models/usage_summary_date.rb | 9 +++-- .../v1/models/usage_summary_date_org.rb | 9 +++-- .../v1/models/usage_summary_response.rb | 9 +++-- .../v2/api/usage_metering_api.rb | 31 +++++++++++++++ 7 files changed, 104 insertions(+), 34 deletions(-) diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e9a5dfa9bc9c..2673dc1a131d 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -22813,10 +22813,11 @@ components: description: |- Response with hourly report of all data billed by Datadog for all organizations. - Newly added billing dimensions and usage types appear as untyped keys on the - `additionalProperties` map instead of as typed fields. Call - `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - at this response level—both typed fields and `additionalProperties` keys. + For SDK users only: all fields at this response level are accessible through the + `additionalProperties` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + to enumerate every available key. properties: agent_host_top99p: description: Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations. @@ -24115,10 +24116,11 @@ components: description: |- Global hourly report of all data billed by Datadog for a given organization. - Newly added billing dimensions and usage types appear as untyped keys on the - `additionalProperties` map instead of as typed fields. Call - `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - at this response level—both typed fields and `additionalProperties` keys. + For SDK users only: all fields at this response level are accessible through the + `additionalProperties` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + to enumerate every available key. properties: account_name: description: The account name. @@ -25436,10 +25438,11 @@ components: Response summarizing all usage aggregated across the months in the request for all organizations, and broken down by month and by organization. - Newly added billing dimensions and usage types appear as untyped keys on the - `additionalProperties` map instead of as typed fields. Call - `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - at this response level—both typed fields and `additionalProperties` keys. + For SDK users only: all fields at this response level are accessible through the + `additionalProperties` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + to enumerate every available key. properties: agent_host_top99p_sum: description: Shows the 99th percentile of all agent hosts over all hours in the current month for all organizations. @@ -43215,11 +43218,12 @@ paths: description: |- Get all usage across your account. - Newly added billing dimensions and usage types appear as untyped keys on the - `additionalProperties` map of `UsageSummaryResponse`, `UsageSummaryDate`, and - `UsageSummaryDateOrg` instead of as typed fields. Call - `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - at each response level—both typed fields and `additionalProperties` keys. + For SDK users only: all fields on `UsageSummaryResponse`, `UsageSummaryDate`, and + `UsageSummaryDateOrg` are accessible through each object's `additionalProperties` map. + Existing typed-field getters are unchanged. New billing dimensions will not have + typed-field getters. Use + [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + to enumerate every available key at each response level. This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). operationId: GetUsageSummary diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 607e2e287b54..849192b5377f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -187306,6 +187306,37 @@ paths: dimensions and usage types added after the v1 schema freeze). This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). + + Go example: + + ```go + fields, _, err := api.GetUsageSummaryAvailableFields(ctx) + attr := fields.Data.GetAttributes() + + // resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...) + // Layer 1: UsageSummaryResponse + for _, key := range attr.GetResponseFields() { + if val, ok := resp.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + // Layer 2: UsageSummaryDate (per month) + for _, date := range resp.GetUsage() { + for _, key := range attr.GetDateFields() { + if val, ok := date.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + // Layer 3: UsageSummaryDateOrg (per org per month) + for _, org := range date.GetOrgs() { + for _, key := range attr.GetDateOrgFields() { + if val, ok := org.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + } + } + ``` operationId: GetUsageSummaryAvailableFields responses: "200": diff --git a/lib/datadog_api_client/v1/api/usage_metering_api.rb b/lib/datadog_api_client/v1/api/usage_metering_api.rb index cfa68bf77fac..c93617eb981d 100644 --- a/lib/datadog_api_client/v1/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v1/api/usage_metering_api.rb @@ -2342,11 +2342,12 @@ def get_usage_summary(start_month, opts = {}) # # Get all usage across your account. # - # Newly added billing dimensions and usage types appear as untyped keys on the - # `additionalProperties` map of `UsageSummaryResponse`, `UsageSummaryDate`, and - # `UsageSummaryDateOrg` instead of as typed fields. Call - # `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - # at each response level—both typed fields and `additionalProperties` keys. + # For SDK users only: all fields on `UsageSummaryResponse`, `UsageSummaryDate`, and + # `UsageSummaryDateOrg` are accessible through each object's `additionalProperties` map. + # Existing typed-field getters are unchanged. New billing dimensions will not have + # typed-field getters. Use + # [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + # to enumerate every available key at each response level. # # This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). # diff --git a/lib/datadog_api_client/v1/models/usage_summary_date.rb b/lib/datadog_api_client/v1/models/usage_summary_date.rb index 0d695534e168..ceccbdc71fa8 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_date.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_date.rb @@ -19,10 +19,11 @@ module DatadogAPIClient::V1 # Response with hourly report of all data billed by Datadog for all organizations. # - # Newly added billing dimensions and usage types appear as untyped keys on the - # `additionalProperties` map instead of as typed fields. Call - # `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - # at this response level—both typed fields and `additionalProperties` keys. + # For SDK users only: all fields at this response level are accessible through the + # `additionalProperties` map. Existing typed-field getters are unchanged. New billing + # dimensions will not have typed-field getters. Use + # [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + # to enumerate every available key. class UsageSummaryDate include BaseGenericModel diff --git a/lib/datadog_api_client/v1/models/usage_summary_date_org.rb b/lib/datadog_api_client/v1/models/usage_summary_date_org.rb index 703ef3c507f4..5f94c9ef8123 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_date_org.rb @@ -19,10 +19,11 @@ module DatadogAPIClient::V1 # Global hourly report of all data billed by Datadog for a given organization. # - # Newly added billing dimensions and usage types appear as untyped keys on the - # `additionalProperties` map instead of as typed fields. Call - # `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - # at this response level—both typed fields and `additionalProperties` keys. + # For SDK users only: all fields at this response level are accessible through the + # `additionalProperties` map. Existing typed-field getters are unchanged. New billing + # dimensions will not have typed-field getters. Use + # [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + # to enumerate every available key. class UsageSummaryDateOrg include BaseGenericModel diff --git a/lib/datadog_api_client/v1/models/usage_summary_response.rb b/lib/datadog_api_client/v1/models/usage_summary_response.rb index bcc5794c118a..9db199de7b58 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_response.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_response.rb @@ -20,10 +20,11 @@ module DatadogAPIClient::V1 # Response summarizing all usage aggregated across the months in the request for # all organizations, and broken down by month and by organization. # - # Newly added billing dimensions and usage types appear as untyped keys on the - # `additionalProperties` map instead of as typed fields. Call - # `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - # at this response level—both typed fields and `additionalProperties` keys. + # For SDK users only: all fields at this response level are accessible through the + # `additionalProperties` map. Existing typed-field getters are unchanged. New billing + # dimensions will not have typed-field getters. Use + # [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + # to enumerate every available key. class UsageSummaryResponse include BaseGenericModel diff --git a/lib/datadog_api_client/v2/api/usage_metering_api.rb b/lib/datadog_api_client/v2/api/usage_metering_api.rb index 94451939e219..28a4bfe8bc62 100644 --- a/lib/datadog_api_client/v2/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v2/api/usage_metering_api.rb @@ -941,6 +941,37 @@ def get_usage_summary_available_fields(opts = {}) # # This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). # + # Go example: + # + # ```go + # fields, _, err := api.GetUsageSummaryAvailableFields(ctx) + # attr := fields.Data.GetAttributes() + # + # // resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...) + # // Layer 1: UsageSummaryResponse + # for _, key := range attr.GetResponseFields() { + # if val, ok := resp.AdditionalProperties[key]; ok { + # fmt.Println(key, val.(json.Number)) + # } + # } + # // Layer 2: UsageSummaryDate (per month) + # for _, date := range resp.GetUsage() { + # for _, key := range attr.GetDateFields() { + # if val, ok := date.AdditionalProperties[key]; ok { + # fmt.Println(key, val.(json.Number)) + # } + # } + # // Layer 3: UsageSummaryDateOrg (per org per month) + # for _, org := range date.GetOrgs() { + # for _, key := range attr.GetDateOrgFields() { + # if val, ok := org.AdditionalProperties[key]; ok { + # fmt.Println(key, val.(json.Number)) + # } + # } + # } + # } + # ``` + # # @param opts [Hash] the optional parameters # @return [Array<(UsageSummaryAvailableFieldsResponse, Integer, Hash)>] UsageSummaryAvailableFieldsResponse data, response status code and response headers def get_usage_summary_available_fields_with_http_info(opts = {})