Skip to content

Commit a7334f5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1a314fa of spec repo
1 parent 042793d commit a7334f5

7 files changed

Lines changed: 87 additions & 34 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22813,10 +22813,11 @@ components:
2281322813
description: |-
2281422814
Response with hourly report of all data billed by Datadog for all organizations.
2281522815

22816-
Newly added billing dimensions and usage types appear as untyped keys on the
22817-
`additionalProperties` map instead of as typed fields. Call
22818-
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
22819-
at this response level—both typed fields and `additionalProperties` keys.
22816+
For SDK users only: all fields at this response level are accessible through the
22817+
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
22818+
dimensions will not have typed-field getters. Use
22819+
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
22820+
to enumerate every available key.
2282022821
properties:
2282122822
agent_host_top99p:
2282222823
description: Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations.
@@ -24115,10 +24116,11 @@ components:
2411524116
description: |-
2411624117
Global hourly report of all data billed by Datadog for a given organization.
2411724118

24118-
Newly added billing dimensions and usage types appear as untyped keys on the
24119-
`additionalProperties` map instead of as typed fields. Call
24120-
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
24121-
at this response level—both typed fields and `additionalProperties` keys.
24119+
For SDK users only: all fields at this response level are accessible through the
24120+
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
24121+
dimensions will not have typed-field getters. Use
24122+
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
24123+
to enumerate every available key.
2412224124
properties:
2412324125
account_name:
2412424126
description: The account name.
@@ -25436,10 +25438,11 @@ components:
2543625438
Response summarizing all usage aggregated across the months in the request for
2543725439
all organizations, and broken down by month and by organization.
2543825440

25439-
Newly added billing dimensions and usage types appear as untyped keys on the
25440-
`additionalProperties` map instead of as typed fields. Call
25441-
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
25442-
at this response level—both typed fields and `additionalProperties` keys.
25441+
For SDK users only: all fields at this response level are accessible through the
25442+
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
25443+
dimensions will not have typed-field getters. Use
25444+
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
25445+
to enumerate every available key.
2544325446
properties:
2544425447
agent_host_top99p_sum:
2544525448
description: Shows the 99th percentile of all agent hosts over all hours in the current month for all organizations.
@@ -43215,11 +43218,12 @@ paths:
4321543218
description: |-
4321643219
Get all usage across your account.
4321743220

43218-
Newly added billing dimensions and usage types appear as untyped keys on the
43219-
`additionalProperties` map of `UsageSummaryResponse`, `UsageSummaryDate`, and
43220-
`UsageSummaryDateOrg` instead of as typed fields. Call
43221-
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
43222-
at each response level—both typed fields and `additionalProperties` keys.
43221+
For SDK users only: all fields on `UsageSummaryResponse`, `UsageSummaryDate`, and
43222+
`UsageSummaryDateOrg` are accessible through each object's `additionalProperties` map.
43223+
Existing typed-field getters are unchanged. New billing dimensions will not have
43224+
typed-field getters. Use
43225+
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
43226+
to enumerate every available key at each response level.
4322343227

4322443228
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
4322543229
operationId: GetUsageSummary

.generator/schemas/v2/openapi.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187306,6 +187306,37 @@ paths:
187306187306
dimensions and usage types added after the v1 schema freeze).
187307187307

187308187308
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
187309+
187310+
Go example:
187311+
187312+
```go
187313+
fields, _, err := api.GetUsageSummaryAvailableFields(ctx)
187314+
attr := fields.Data.GetAttributes()
187315+
187316+
// resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...)
187317+
// Layer 1: UsageSummaryResponse
187318+
for _, key := range attr.GetResponseFields() {
187319+
if val, ok := resp.AdditionalProperties[key]; ok {
187320+
fmt.Println(key, val.(json.Number))
187321+
}
187322+
}
187323+
// Layer 2: UsageSummaryDate (per month)
187324+
for _, date := range resp.GetUsage() {
187325+
for _, key := range attr.GetDateFields() {
187326+
if val, ok := date.AdditionalProperties[key]; ok {
187327+
fmt.Println(key, val.(json.Number))
187328+
}
187329+
}
187330+
// Layer 3: UsageSummaryDateOrg (per org per month)
187331+
for _, org := range date.GetOrgs() {
187332+
for _, key := range attr.GetDateOrgFields() {
187333+
if val, ok := org.AdditionalProperties[key]; ok {
187334+
fmt.Println(key, val.(json.Number))
187335+
}
187336+
}
187337+
}
187338+
}
187339+
```
187309187340
operationId: GetUsageSummaryAvailableFields
187310187341
responses:
187311187342
"200":

src/main/java/com/datadog/api/client/v1/api/UsageMeteringApi.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7231,11 +7231,12 @@ public CompletableFuture<UsageSummaryResponse> getUsageSummaryAsync(
72317231
/**
72327232
* Get all usage across your account.
72337233
*
7234-
* <p>Newly added billing dimensions and usage types appear as untyped keys on the <code>
7235-
* additionalProperties</code> map of <code>UsageSummaryResponse</code>, <code>UsageSummaryDate
7236-
* </code>, and <code>UsageSummaryDateOrg</code> instead of as typed fields. Call <code>
7237-
* GET /api/v2/usage/summary/available_fields</code> to enumerate every key returned at each
7238-
* response level—both typed fields and <code>additionalProperties</code> keys.
7234+
* <p>For SDK users only: all fields on <code>UsageSummaryResponse</code>, <code>UsageSummaryDate
7235+
* </code>, and <code>UsageSummaryDateOrg</code> are accessible through each object's <code>
7236+
* additionalProperties</code> map. Existing typed-field getters are unchanged. New billing
7237+
* dimensions will not have typed-field getters. Use <a
7238+
* href="https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields">Get
7239+
* available fields for usage summary</a> to enumerate every available key at each response level.
72397240
*
72407241
* <p>This endpoint is only accessible for <a
72417242
* href="https://docs.datadoghq.com/account_management/multi_organization/">parent-level

src/main/java/com/datadog/api/client/v1/model/UsageSummaryDate.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
/**
2323
* Response with hourly report of all data billed by Datadog for all organizations.
2424
*
25-
* <p>Newly added billing dimensions and usage types appear as untyped keys on the <code>
26-
* additionalProperties</code> map instead of as typed fields. Call <code>
27-
* GET /api/v2/usage/summary/available_fields</code> to enumerate every key returned at this
28-
* response level—both typed fields and <code>additionalProperties</code> keys.
25+
* <p>For SDK users only: all fields at this response level are accessible through the <code>
26+
* additionalProperties</code> map. Existing typed-field getters are unchanged. New billing
27+
* dimensions will not have typed-field getters. Use <a
28+
* href="https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields">Get
29+
* available fields for usage summary</a> to enumerate every available key.
2930
*/
3031
@JsonPropertyOrder({
3132
UsageSummaryDate.JSON_PROPERTY_AGENT_HOST_TOP99P,

src/main/java/com/datadog/api/client/v1/model/UsageSummaryDateOrg.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
/**
2020
* Global hourly report of all data billed by Datadog for a given organization.
2121
*
22-
* <p>Newly added billing dimensions and usage types appear as untyped keys on the <code>
23-
* additionalProperties</code> map instead of as typed fields. Call <code>
24-
* GET /api/v2/usage/summary/available_fields</code> to enumerate every key returned at this
25-
* response level—both typed fields and <code>additionalProperties</code> keys.
22+
* <p>For SDK users only: all fields at this response level are accessible through the <code>
23+
* additionalProperties</code> map. Existing typed-field getters are unchanged. New billing
24+
* dimensions will not have typed-field getters. Use <a
25+
* href="https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields">Get
26+
* available fields for usage summary</a> to enumerate every available key.
2627
*/
2728
@JsonPropertyOrder({
2829
UsageSummaryDateOrg.JSON_PROPERTY_ACCOUNT_NAME,

src/main/java/com/datadog/api/client/v1/model/UsageSummaryResponse.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
* Response summarizing all usage aggregated across the months in the request for all organizations,
2424
* and broken down by month and by organization.
2525
*
26-
* <p>Newly added billing dimensions and usage types appear as untyped keys on the <code>
27-
* additionalProperties</code> map instead of as typed fields. Call <code>
28-
* GET /api/v2/usage/summary/available_fields</code> to enumerate every key returned at this
29-
* response level—both typed fields and <code>additionalProperties</code> keys.
26+
* <p>For SDK users only: all fields at this response level are accessible through the <code>
27+
* additionalProperties</code> map. Existing typed-field getters are unchanged. New billing
28+
* dimensions will not have typed-field getters. Use <a
29+
* href="https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields">Get
30+
* available fields for usage summary</a> to enumerate every available key.
3031
*/
3132
@JsonPropertyOrder({
3233
UsageSummaryResponse.JSON_PROPERTY_AGENT_HOST_TOP99P_SUM,

src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3066,6 +3066,20 @@ public UsageSummaryAvailableFieldsResponse getUsageSummaryAvailableFields() thro
30663066
* href="https://docs.datadoghq.com/account_management/multi_organization/">parent-level
30673067
* organizations</a>.
30683068
*
3069+
* <p>Go example:
3070+
*
3071+
* <p>```go fields, _, err := api.GetUsageSummaryAvailableFields(ctx) attr :=
3072+
* fields.Data.GetAttributes()
3073+
*
3074+
* <p>// resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...) // Layer 1:
3075+
* UsageSummaryResponse for <em>, key := range attr.GetResponseFields() { if val, ok :=
3076+
* resp.AdditionalProperties[key]; ok { fmt.Println(key, val.(json.Number)) } } // Layer 2:
3077+
* UsageSummaryDate (per month) for </em>, date := range resp.GetUsage() { for <em>, key := range
3078+
* attr.GetDateFields() { if val, ok := date.AdditionalProperties[key]; ok { fmt.Println(key,
3079+
* val.(json.Number)) } } // Layer 3: UsageSummaryDateOrg (per org per month) for </em>, org :=
3080+
* range date.GetOrgs() { for _, key := range attr.GetDateOrgFields() { if val, ok :=
3081+
* org.AdditionalProperties[key]; ok { fmt.Println(key, val.(json.Number)) } } } } ```
3082+
*
30693083
* @return ApiResponse&lt;UsageSummaryAvailableFieldsResponse&gt;
30703084
* @throws ApiException if fails to make API call
30713085
* @http.response.details

0 commit comments

Comments
 (0)