Skip to content

Commit a00d666

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8d8238a of spec repo (#122)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 0a9af30 commit a00d666

File tree

8 files changed

+70
-14
lines changed

8 files changed

+70
-14
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.4.1.dev6",
7-
"regenerated": "2021-05-10 15:34:37.954777",
8-
"spec_repo_commit": "8176bfc"
7+
"regenerated": "2021-05-11 08:04:36.598375",
8+
"spec_repo_commit": "8d8238a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-05-10 15:34:43.776022",
13-
"spec_repo_commit": "8176bfc"
12+
"regenerated": "2021-05-11 08:04:42.272427",
13+
"spec_repo_commit": "8d8238a"
1414
}
1515
}
1616
}

packages/datadog-api-client-v1/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ models/UsageAttributionMetadata.ts
445445
models/UsageAttributionPagination.ts
446446
models/UsageAttributionResponse.ts
447447
models/UsageAttributionSort.ts
448+
models/UsageAttributionSupportedMetrics.ts
448449
models/UsageAttributionValues.ts
449450
models/UsageBillableSummaryBody.ts
450451
models/UsageBillableSummaryHour.ts

packages/datadog-api-client-v1/apis/UsageMeteringApi.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { APIErrorResponse } from '../models/APIErrorResponse';
1111
import { UsageAnalyzedLogsResponse } from '../models/UsageAnalyzedLogsResponse';
1212
import { UsageAttributionResponse } from '../models/UsageAttributionResponse';
1313
import { UsageAttributionSort } from '../models/UsageAttributionSort';
14+
import { UsageAttributionSupportedMetrics } from '../models/UsageAttributionSupportedMetrics';
1415
import { UsageBillableSummaryResponse } from '../models/UsageBillableSummaryResponse';
1516
import { UsageComplianceResponse } from '../models/UsageComplianceResponse';
1617
import { UsageCustomReportsResponse } from '../models/UsageCustomReportsResponse';
@@ -470,12 +471,12 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
470471
* Get Usage Attribution.
471472
* Get Usage Attribution
472473
* @param startMonth Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage beginning in this month. Maximum of 15 months ago.
473-
* @param fields The specified field to search results for.
474+
* @param fields Comma-separated list of usage types to return, or &#x60;*&#x60; for all usage types.
474475
* @param endMonth Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage ending this month.
475476
* @param sortDirection The direction to sort by: &#x60;[desc, asc]&#x60;.
476477
* @param sortName The field to sort by.
477478
*/
478-
public async getUsageAttribution(startMonth: Date, fields: string, endMonth?: Date, sortDirection?: UsageSortDirection, sortName?: UsageAttributionSort, options?: Configuration): Promise<RequestContext> {
479+
public async getUsageAttribution(startMonth: Date, fields: UsageAttributionSupportedMetrics, endMonth?: Date, sortDirection?: UsageSortDirection, sortName?: UsageAttributionSort, options?: Configuration): Promise<RequestContext> {
479480
let config = options || this.configuration;
480481

481482
// verify required parameter 'startMonth' is not null or undefined
@@ -506,7 +507,7 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
506507
requestContext.setQueryParam("start_month", ObjectSerializer.serialize(startMonth, "Date", "date-time"));
507508
}
508509
if (fields !== undefined) {
509-
requestContext.setQueryParam("fields", ObjectSerializer.serialize(fields, "string", ""));
510+
requestContext.setQueryParam("fields", ObjectSerializer.serialize(fields, "UsageAttributionSupportedMetrics", ""));
510511
}
511512
if (endMonth !== undefined) {
512513
requestContext.setQueryParam("end_month", ObjectSerializer.serialize(endMonth, "Date", "date-time"));

packages/datadog-api-client-v1/models/ObjectSerializer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ import { UsageAttributionMetadata } from './UsageAttributionMetadata';
407407
import { UsageAttributionPagination } from './UsageAttributionPagination';
408408
import { UsageAttributionResponse } from './UsageAttributionResponse';
409409
import { UsageAttributionSort } from './UsageAttributionSort';
410+
import { UsageAttributionSupportedMetrics } from './UsageAttributionSupportedMetrics';
410411
import { UsageAttributionValues } from './UsageAttributionValues';
411412
import { UsageBillableSummaryBody } from './UsageBillableSummaryBody';
412413
import { UsageBillableSummaryHour } from './UsageBillableSummaryHour';
@@ -641,6 +642,7 @@ let enumsMap: Set<string> = new Set<string>([
641642
"TimeseriesWidgetLegendLayout",
642643
"ToplistWidgetDefinitionType",
643644
"UsageAttributionSort",
645+
"UsageAttributionSupportedMetrics",
644646
"UsageMetricCategory",
645647
"UsageReportsType",
646648
"UsageSort",
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*
6+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7+
* https://openapi-generator.tech
8+
* Do not edit the class manually.
9+
*/
10+
11+
import { HttpFile } from '../http/http';
12+
import { ObjectSerializer } from './ObjectSerializer';
13+
14+
/**
15+
* Supported fields for usage attribution requests (valid requests contain one or more metrics, or `*` for all).
16+
*/
17+
18+
export type UsageAttributionSupportedMetrics = typeof CUSTOM_TIMESERIES_USAGE | typeof CONTAINER_USAGE | typeof SNMP_PERCENTAGE | typeof APM_HOST_USAGE | typeof BROWSER_USAGE | typeof NPM_HOST_PERCENTAGE | typeof INFRA_HOST_USAGE | typeof CUSTOM_TIMESERIES_PERCENTAGE | typeof CONTAINER_PERCENTAGE | typeof LAMBDA_USAGE | typeof API_USAGE | typeof APM_HOST_PERCENTAGE | typeof INFRA_HOST_PERCENTAGE | typeof SNMP_USAGE | typeof BROWSER_PERCENTAGE | typeof API_PERCENTAGE | typeof LAMBDA_PERCENTAGE | typeof NPM_HOST_USAGE | typeof LAMBDA_FUNCTIONS_USAGE | typeof LAMBDA_FUNCTIONS_PERCENTAGE | typeof LAMBDA_INVOCATIONS_USAGE | typeof LAMBDA_INVOCATIONS_PERCENTAGE | typeof FARGATE_USAGE | typeof FARGATE_PERCENTAGE | typeof PROFILED_HOST_USAGE | typeof PROFILED_HOST_PERCENTAGE | typeof PROFILED_CONTAINER_USAGE | typeof PROFILED_CONTAINER_PERCENTAGE | typeof ALL ;
19+
export const CUSTOM_TIMESERIES_USAGE = 'custom_timeseries_usage';
20+
export const CONTAINER_USAGE = 'container_usage';
21+
export const SNMP_PERCENTAGE = 'snmp_percentage';
22+
export const APM_HOST_USAGE = 'apm_host_usage';
23+
export const BROWSER_USAGE = 'browser_usage';
24+
export const NPM_HOST_PERCENTAGE = 'npm_host_percentage';
25+
export const INFRA_HOST_USAGE = 'infra_host_usage';
26+
export const CUSTOM_TIMESERIES_PERCENTAGE = 'custom_timeseries_percentage';
27+
export const CONTAINER_PERCENTAGE = 'container_percentage';
28+
export const LAMBDA_USAGE = 'lambda_usage';
29+
export const API_USAGE = 'api_usage';
30+
export const APM_HOST_PERCENTAGE = 'apm_host_percentage';
31+
export const INFRA_HOST_PERCENTAGE = 'infra_host_percentage';
32+
export const SNMP_USAGE = 'snmp_usage';
33+
export const BROWSER_PERCENTAGE = 'browser_percentage';
34+
export const API_PERCENTAGE = 'api_percentage';
35+
export const LAMBDA_PERCENTAGE = 'lambda_percentage';
36+
export const NPM_HOST_USAGE = 'npm_host_usage';
37+
export const LAMBDA_FUNCTIONS_USAGE = 'lambda_functions_usage';
38+
export const LAMBDA_FUNCTIONS_PERCENTAGE = 'lambda_functions_percentage';
39+
export const LAMBDA_INVOCATIONS_USAGE = 'lambda_invocations_usage';
40+
export const LAMBDA_INVOCATIONS_PERCENTAGE = 'lambda_invocations_percentage';
41+
export const FARGATE_USAGE = 'fargate_usage';
42+
export const FARGATE_PERCENTAGE = 'fargate_percentage';
43+
export const PROFILED_HOST_USAGE = 'profiled_host_usage';
44+
export const PROFILED_HOST_PERCENTAGE = 'profiled_host_percentage';
45+
export const PROFILED_CONTAINER_USAGE = 'profiled_container_usage';
46+
export const PROFILED_CONTAINER_PERCENTAGE = 'profiled_container_percentage';
47+
export const ALL = '*';
48+
49+

packages/datadog-api-client-v1/types/ObjectParamAPI.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ import { UsageAttributionMetadata } from '../models/UsageAttributionMetadata';
411411
import { UsageAttributionPagination } from '../models/UsageAttributionPagination';
412412
import { UsageAttributionResponse } from '../models/UsageAttributionResponse';
413413
import { UsageAttributionSort } from '../models/UsageAttributionSort';
414+
import { UsageAttributionSupportedMetrics } from '../models/UsageAttributionSupportedMetrics';
414415
import { UsageAttributionValues } from '../models/UsageAttributionValues';
415416
import { UsageBillableSummaryBody } from '../models/UsageBillableSummaryBody';
416417
import { UsageBillableSummaryHour } from '../models/UsageBillableSummaryHour';
@@ -4039,11 +4040,11 @@ export interface UsageMeteringApiGetUsageAttributionRequest {
40394040
*/
40404041
startMonth: Date
40414042
/**
4042-
* The specified field to search results for.
4043-
* @type string
4043+
* Comma-separated list of usage types to return, or &#x60;*&#x60; for all usage types.
4044+
* @type UsageAttributionSupportedMetrics
40444045
* @memberof UsageMeteringApigetUsageAttribution
40454046
*/
4046-
fields: string
4047+
fields: UsageAttributionSupportedMetrics
40474048
/**
40484049
* Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage ending this month.
40494050
* @type Date

packages/datadog-api-client-v1/types/ObservableAPI.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ import { UsageAttributionMetadata } from '../models/UsageAttributionMetadata';
412412
import { UsageAttributionPagination } from '../models/UsageAttributionPagination';
413413
import { UsageAttributionResponse } from '../models/UsageAttributionResponse';
414414
import { UsageAttributionSort } from '../models/UsageAttributionSort';
415+
import { UsageAttributionSupportedMetrics } from '../models/UsageAttributionSupportedMetrics';
415416
import { UsageAttributionValues } from '../models/UsageAttributionValues';
416417
import { UsageBillableSummaryBody } from '../models/UsageBillableSummaryBody';
417418
import { UsageBillableSummaryHour } from '../models/UsageBillableSummaryHour';
@@ -4817,12 +4818,12 @@ export class ObservableUsageMeteringApi {
48174818
* Get Usage Attribution.
48184819
* Get Usage Attribution
48194820
* @param startMonth Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage beginning in this month. Maximum of 15 months ago.
4820-
* @param fields The specified field to search results for.
4821+
* @param fields Comma-separated list of usage types to return, or &#x60;*&#x60; for all usage types.
48214822
* @param endMonth Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage ending this month.
48224823
* @param sortDirection The direction to sort by: &#x60;[desc, asc]&#x60;.
48234824
* @param sortName The field to sort by.
48244825
*/
4825-
public getUsageAttribution(startMonth: Date, fields: string, endMonth?: Date, sortDirection?: UsageSortDirection, sortName?: UsageAttributionSort, options?: Configuration): Observable<UsageAttributionResponse> {
4826+
public getUsageAttribution(startMonth: Date, fields: UsageAttributionSupportedMetrics, endMonth?: Date, sortDirection?: UsageSortDirection, sortName?: UsageAttributionSort, options?: Configuration): Observable<UsageAttributionResponse> {
48264827
const requestContextPromise = this.requestFactory.getUsageAttribution(startMonth, fields, endMonth, sortDirection, sortName, options);
48274828

48284829
// build promise chain

packages/datadog-api-client-v1/types/PromiseAPI.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ import { UsageAttributionMetadata } from '../models/UsageAttributionMetadata';
411411
import { UsageAttributionPagination } from '../models/UsageAttributionPagination';
412412
import { UsageAttributionResponse } from '../models/UsageAttributionResponse';
413413
import { UsageAttributionSort } from '../models/UsageAttributionSort';
414+
import { UsageAttributionSupportedMetrics } from '../models/UsageAttributionSupportedMetrics';
414415
import { UsageAttributionValues } from '../models/UsageAttributionValues';
415416
import { UsageBillableSummaryBody } from '../models/UsageBillableSummaryBody';
416417
import { UsageBillableSummaryHour } from '../models/UsageBillableSummaryHour';
@@ -2669,12 +2670,12 @@ export class PromiseUsageMeteringApi {
26692670
* Get Usage Attribution.
26702671
* Get Usage Attribution
26712672
* @param startMonth Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage beginning in this month. Maximum of 15 months ago.
2672-
* @param fields The specified field to search results for.
2673+
* @param fields Comma-separated list of usage types to return, or &#x60;*&#x60; for all usage types.
26732674
* @param endMonth Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage ending this month.
26742675
* @param sortDirection The direction to sort by: &#x60;[desc, asc]&#x60;.
26752676
* @param sortName The field to sort by.
26762677
*/
2677-
public getUsageAttribution(startMonth: Date, fields: string, endMonth?: Date, sortDirection?: UsageSortDirection, sortName?: UsageAttributionSort, options?: Configuration): Promise<UsageAttributionResponse> {
2678+
public getUsageAttribution(startMonth: Date, fields: UsageAttributionSupportedMetrics, endMonth?: Date, sortDirection?: UsageSortDirection, sortName?: UsageAttributionSort, options?: Configuration): Promise<UsageAttributionResponse> {
26782679
const result = this.api.getUsageAttribution(startMonth, fields, endMonth, sortDirection, sortName, options);
26792680
return result.toPromise();
26802681
}

0 commit comments

Comments
 (0)