Skip to content

Commit 4759261

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b30ab78 of spec repo (#128)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent d0a7fc0 commit 4759261

File tree

7 files changed

+51
-64
lines changed

7 files changed

+51
-64
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-12 18:18:48.416456",
8-
"spec_repo_commit": "3445859"
7+
"regenerated": "2021-05-14 06:52:14.396665",
8+
"spec_repo_commit": "b30ab78"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-05-12 18:18:53.860770",
13-
"spec_repo_commit": "3445859"
12+
"regenerated": "2021-05-14 06:52:19.381740",
13+
"spec_repo_commit": "b30ab78"
1414
}
1515
}
1616
}

features/v1/usage_metering.feature

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ Feature: Usage Metering
1919
When the request is sent
2020
Then the response status is 200 OK
2121

22+
@generated @skip
23+
Scenario: Get all custom metrics by hourly average returns "Bad Request" response
24+
Given new "GetUsageTopAvgMetrics" request
25+
When the request is sent
26+
Then the response status is 400 Bad Request
27+
28+
@generated @skip
29+
Scenario: Get all custom metrics by hourly average returns "OK" response
30+
Given new "GetUsageTopAvgMetrics" request
31+
When the request is sent
32+
Then the response status is 200 OK
33+
2234
@generated @skip
2335
Scenario: Get billable usage across your account returns "Bad Request" response
2436
Given new "GetUsageBillableSummary" request
@@ -361,18 +373,6 @@ Feature: Usage Metering
361373
When the request is sent
362374
Then the response status is 200 OK
363375

364-
@generated @skip
365-
Scenario: Get top custom metrics by hourly average returns "Bad Request" response
366-
Given new "GetUsageTopAvgMetrics" request
367-
When the request is sent
368-
Then the response status is 400 Bad Request
369-
370-
@generated @skip
371-
Scenario: Get top custom metrics by hourly average returns "OK" response
372-
Given new "GetUsageTopAvgMetrics" request
373-
When the request is sent
374-
Then the response status is 200 OK
375-
376376
@generated @skip
377377
Scenario: Get usage across your multi-org account returns "Bad Request" response
378378
Given new "GetUsageSummary" request

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,20 +1606,22 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
16061606
}
16071607

16081608
/**
1609-
* Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
1610-
* Get top custom metrics by hourly average
1609+
* Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
1610+
* Get all custom metrics by hourly average
16111611
* @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both)
16121612
* @param day Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both)
16131613
* @param names Comma-separated list of metric names.
16141614
* @param limit Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified.
1615+
* @param nextRecordId List following results with a next_record_id provided in the previous query.
16151616
*/
1616-
public async getUsageTopAvgMetrics(month?: Date, day?: Date, names?: Array<string>, limit?: number, options?: Configuration): Promise<RequestContext> {
1617+
public async getUsageTopAvgMetrics(month?: Date, day?: Date, names?: Array<string>, limit?: number, nextRecordId?: string, options?: Configuration): Promise<RequestContext> {
16171618
let config = options || this.configuration;
16181619

16191620

16201621

16211622

16221623

1624+
16231625
// Path Params
16241626
const localVarPath = '/api/v1/usage/top_avg_metrics';
16251627

@@ -1641,6 +1643,9 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
16411643
if (limit !== undefined) {
16421644
requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", "int32"));
16431645
}
1646+
if (nextRecordId !== undefined) {
1647+
requestContext.setQueryParam("next_record_id", ObjectSerializer.serialize(nextRecordId, "string", ""));
1648+
}
16441649

16451650
// Header Params
16461651

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

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { HttpFile } from '../http/http';
1212
import { ObjectSerializer } from './ObjectSerializer';
1313

1414
/**
15-
* The page count for the current pagination.
15+
* The metadata for the current pagination.
1616
*/
1717

1818
export class UsageAttributionPagination {
@@ -21,19 +21,11 @@ export class UsageAttributionPagination {
2121
*/
2222
'limit'?: number;
2323
/**
24-
* Records to be skipped before beginning to return.
24+
* The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of this next_record_id.
2525
*/
26-
'offset'?: number;
26+
'nextRecordId'?: string;
2727
/**
28-
* Direction to sort by.
29-
*/
30-
'sortDirection'?: string;
31-
/**
32-
* Field to sort by.
33-
*/
34-
'sortName'?: string;
35-
/**
36-
* Total number of records.
28+
* Total number of records. (deprecated after May 1st, 2021)
3729
*/
3830
'totalNumberOfRecords'?: number;
3931

@@ -45,18 +37,8 @@ export class UsageAttributionPagination {
4537
"type": "number",
4638
"format": "int64"
4739
},
48-
"offset": {
49-
"baseName": "offset",
50-
"type": "number",
51-
"format": "int64"
52-
},
53-
"sortDirection": {
54-
"baseName": "sort_direction",
55-
"type": "string",
56-
"format": ""
57-
},
58-
"sortName": {
59-
"baseName": "sort_name",
40+
"nextRecordId": {
41+
"baseName": "next_record_id",
6042
"type": "string",
6143
"format": ""
6244
},
@@ -75,11 +57,7 @@ export class UsageAttributionPagination {
7557

7658
res.limit = ObjectSerializer.deserialize(data.limit, "number", "int64")
7759

78-
res.offset = ObjectSerializer.deserialize(data.offset, "number", "int64")
79-
80-
res.sortDirection = ObjectSerializer.deserialize(data.sort_direction, "string", "")
81-
82-
res.sortName = ObjectSerializer.deserialize(data.sort_name, "string", "")
60+
res.nextRecordId = ObjectSerializer.deserialize(data.next_record_id, "string", "")
8361

8462
res.totalNumberOfRecords = ObjectSerializer.deserialize(data.total_number_of_records, "number", "int64")
8563

@@ -97,11 +75,7 @@ export class UsageAttributionPagination {
9775
}
9876
res.limit = ObjectSerializer.serialize(data.limit, "number", "int64")
9977

100-
res.offset = ObjectSerializer.serialize(data.offset, "number", "int64")
101-
102-
res.sort_direction = ObjectSerializer.serialize(data.sortDirection, "string", "")
103-
104-
res.sort_name = ObjectSerializer.serialize(data.sortName, "string", "")
78+
res.next_record_id = ObjectSerializer.serialize(data.nextRecordId, "string", "")
10579

10680
res.total_number_of_records = ObjectSerializer.serialize(data.totalNumberOfRecords, "number", "int64")
10781

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4590,6 +4590,12 @@ export interface UsageMeteringApiGetUsageTopAvgMetricsRequest {
45904590
* @memberof UsageMeteringApigetUsageTopAvgMetrics
45914591
*/
45924592
limit?: number
4593+
/**
4594+
* List following results with a next_record_id provided in the previous query.
4595+
* @type string
4596+
* @memberof UsageMeteringApigetUsageTopAvgMetrics
4597+
*/
4598+
nextRecordId?: string
45934599
}
45944600

45954601
export interface UsageMeteringApiGetUsageTraceRequest {
@@ -4876,12 +4882,12 @@ export class ObjectUsageMeteringApi {
48764882
}
48774883

48784884
/**
4879-
* Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
4880-
* Get top custom metrics by hourly average
4885+
* Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
4886+
* Get all custom metrics by hourly average
48814887
* @param param the request object
48824888
*/
48834889
public getUsageTopAvgMetrics(param: UsageMeteringApiGetUsageTopAvgMetricsRequest, options?: Configuration): Promise<UsageTopAvgMetricsResponse> {
4884-
return this.api.getUsageTopAvgMetrics(param.month, param.day, param.names, param.limit, options).toPromise();
4890+
return this.api.getUsageTopAvgMetrics(param.month, param.day, param.names, param.limit, param.nextRecordId, options).toPromise();
48854891
}
48864892

48874893
/**

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5529,15 +5529,16 @@ export class ObservableUsageMeteringApi {
55295529
}
55305530

55315531
/**
5532-
* Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
5533-
* Get top custom metrics by hourly average
5532+
* Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
5533+
* Get all custom metrics by hourly average
55345534
* @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both)
55355535
* @param day Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both)
55365536
* @param names Comma-separated list of metric names.
55375537
* @param limit Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified.
5538+
* @param nextRecordId List following results with a next_record_id provided in the previous query.
55385539
*/
5539-
public getUsageTopAvgMetrics(month?: Date, day?: Date, names?: Array<string>, limit?: number, options?: Configuration): Observable<UsageTopAvgMetricsResponse> {
5540-
const requestContextPromise = this.requestFactory.getUsageTopAvgMetrics(month, day, names, limit, options);
5540+
public getUsageTopAvgMetrics(month?: Date, day?: Date, names?: Array<string>, limit?: number, nextRecordId?: string, options?: Configuration): Observable<UsageTopAvgMetricsResponse> {
5541+
const requestContextPromise = this.requestFactory.getUsageTopAvgMetrics(month, day, names, limit, nextRecordId, options);
55415542

55425543
// build promise chain
55435544
let middlewarePreObservable = from_<RequestContext>(requestContextPromise);

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,15 +3018,16 @@ export class PromiseUsageMeteringApi {
30183018
}
30193019

30203020
/**
3021-
* Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
3022-
* Get top custom metrics by hourly average
3021+
* Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
3022+
* Get all custom metrics by hourly average
30233023
* @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both)
30243024
* @param day Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both)
30253025
* @param names Comma-separated list of metric names.
30263026
* @param limit Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified.
3027+
* @param nextRecordId List following results with a next_record_id provided in the previous query.
30273028
*/
3028-
public getUsageTopAvgMetrics(month?: Date, day?: Date, names?: Array<string>, limit?: number, options?: Configuration): Promise<UsageTopAvgMetricsResponse> {
3029-
const result = this.api.getUsageTopAvgMetrics(month, day, names, limit, options);
3029+
public getUsageTopAvgMetrics(month?: Date, day?: Date, names?: Array<string>, limit?: number, nextRecordId?: string, options?: Configuration): Promise<UsageTopAvgMetricsResponse> {
3030+
const result = this.api.getUsageTopAvgMetrics(month, day, names, limit, nextRecordId, options);
30303031
return result.toPromise();
30313032
}
30323033

0 commit comments

Comments
 (0)