Skip to content

Commit 6224016

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 17171be of spec repo (#202)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 53ae366 commit 6224016

File tree

6 files changed

+178
-4
lines changed

6 files changed

+178
-4
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.dev8",
7-
"regenerated": "2021-06-30 10:03:47.905073",
8-
"spec_repo_commit": "d33e517"
7+
"regenerated": "2021-07-01 15:13:10.495606",
8+
"spec_repo_commit": "17171be"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev8",
12-
"regenerated": "2021-06-30 10:05:07.171313",
13-
"spec_repo_commit": "d33e517"
12+
"regenerated": "2021-07-01 15:14:22.139461",
13+
"spec_repo_commit": "17171be"
1414
}
1515
}
1616
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,13 @@ models/OrganizationSubscription.ts
351351
models/PagerDutyService.ts
352352
models/PagerDutyServiceKey.ts
353353
models/PagerDutyServiceName.ts
354+
models/Pagination.ts
354355
models/ProcessQueryDefinition.ts
355356
models/QuerySortOrder.ts
356357
models/QueryValueWidgetDefinition.ts
357358
models/QueryValueWidgetDefinitionType.ts
358359
models/QueryValueWidgetRequest.ts
360+
models/ResponseMetaAttributes.ts
359361
models/SLOBulkDeleteError.ts
360362
models/SLOBulkDeleteResponse.ts
361363
models/SLOBulkDeleteResponseData.ts

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,11 @@ import { OrganizationSubscription } from "./OrganizationSubscription";
219219
import { PagerDutyService } from "./PagerDutyService";
220220
import { PagerDutyServiceKey } from "./PagerDutyServiceKey";
221221
import { PagerDutyServiceName } from "./PagerDutyServiceName";
222+
import { Pagination } from "./Pagination";
222223
import { ProcessQueryDefinition } from "./ProcessQueryDefinition";
223224
import { QueryValueWidgetDefinition } from "./QueryValueWidgetDefinition";
224225
import { QueryValueWidgetRequest } from "./QueryValueWidgetRequest";
226+
import { ResponseMetaAttributes } from "./ResponseMetaAttributes";
225227
import { SLOBulkDeleteError } from "./SLOBulkDeleteError";
226228
import { SLOBulkDeleteResponse } from "./SLOBulkDeleteResponse";
227229
import { SLOBulkDeleteResponseData } from "./SLOBulkDeleteResponseData";
@@ -816,9 +818,11 @@ const typeMap: { [index: string]: any } = {
816818
PagerDutyService: PagerDutyService,
817819
PagerDutyServiceKey: PagerDutyServiceKey,
818820
PagerDutyServiceName: PagerDutyServiceName,
821+
Pagination: Pagination,
819822
ProcessQueryDefinition: ProcessQueryDefinition,
820823
QueryValueWidgetDefinition: QueryValueWidgetDefinition,
821824
QueryValueWidgetRequest: QueryValueWidgetRequest,
825+
ResponseMetaAttributes: ResponseMetaAttributes,
822826
SLOBulkDeleteError: SLOBulkDeleteError,
823827
SLOBulkDeleteResponse: SLOBulkDeleteResponse,
824828
SLOBulkDeleteResponseData: SLOBulkDeleteResponseData,
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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 { ObjectSerializer } from "./ObjectSerializer";
12+
13+
/**
14+
* Pagination object.
15+
*/
16+
17+
export class Pagination {
18+
/**
19+
* Total count.
20+
*/
21+
"totalCount"?: number;
22+
/**
23+
* Total count of elements matched by the filter.
24+
*/
25+
"totalFilteredCount"?: number;
26+
27+
static readonly discriminator: string | undefined = undefined;
28+
29+
static readonly attributeTypeMap: {
30+
[key: string]: { baseName: string; type: string; format: string };
31+
} = {
32+
totalCount: {
33+
baseName: "total_count",
34+
type: "number",
35+
format: "int64",
36+
},
37+
totalFilteredCount: {
38+
baseName: "total_filtered_count",
39+
type: "number",
40+
format: "int64",
41+
},
42+
};
43+
44+
static getAttributeTypeMap() {
45+
return Pagination.attributeTypeMap;
46+
}
47+
48+
static deserialize(data: { [key: string]: any }): Pagination {
49+
const res = new Pagination();
50+
51+
res.totalCount = ObjectSerializer.deserialize(
52+
data.total_count,
53+
"number",
54+
"int64"
55+
);
56+
57+
res.totalFilteredCount = ObjectSerializer.deserialize(
58+
data.total_filtered_count,
59+
"number",
60+
"int64"
61+
);
62+
63+
return res;
64+
}
65+
66+
static serialize(data: Pagination): { [key: string]: any } {
67+
const attributeTypes = Pagination.getAttributeTypeMap();
68+
const res: { [index: string]: any } = {};
69+
for (const [key, value] of Object.entries(data)) {
70+
if (!(key in attributeTypes)) {
71+
throw new TypeError(`${key} attribute not in schema`);
72+
}
73+
}
74+
res.total_count = ObjectSerializer.serialize(
75+
data.totalCount,
76+
"number",
77+
"int64"
78+
);
79+
80+
res.total_filtered_count = ObjectSerializer.serialize(
81+
data.totalFilteredCount,
82+
"number",
83+
"int64"
84+
);
85+
86+
return res;
87+
}
88+
89+
public constructor() {}
90+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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 { Pagination } from "./Pagination";
12+
import { ObjectSerializer } from "./ObjectSerializer";
13+
14+
/**
15+
* Object describing meta attributes of response.
16+
*/
17+
18+
export class ResponseMetaAttributes {
19+
"page"?: Pagination;
20+
21+
static readonly discriminator: string | undefined = undefined;
22+
23+
static readonly attributeTypeMap: {
24+
[key: string]: { baseName: string; type: string; format: string };
25+
} = {
26+
page: {
27+
baseName: "page",
28+
type: "Pagination",
29+
format: "",
30+
},
31+
};
32+
33+
static getAttributeTypeMap() {
34+
return ResponseMetaAttributes.attributeTypeMap;
35+
}
36+
37+
static deserialize(data: { [key: string]: any }): ResponseMetaAttributes {
38+
const res = new ResponseMetaAttributes();
39+
40+
res.page = ObjectSerializer.deserialize(data.page, "Pagination", "");
41+
42+
return res;
43+
}
44+
45+
static serialize(data: ResponseMetaAttributes): { [key: string]: any } {
46+
const attributeTypes = ResponseMetaAttributes.getAttributeTypeMap();
47+
const res: { [index: string]: any } = {};
48+
for (const [key, value] of Object.entries(data)) {
49+
if (!(key in attributeTypes)) {
50+
throw new TypeError(`${key} attribute not in schema`);
51+
}
52+
}
53+
res.page = ObjectSerializer.serialize(data.page, "Pagination", "");
54+
55+
return res;
56+
}
57+
58+
public constructor() {}
59+
}

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Do not edit the class manually.
99
*/
1010

11+
import { ResponseMetaAttributes } from "./ResponseMetaAttributes";
1112
import { SLOCorrection } from "./SLOCorrection";
1213
import { ObjectSerializer } from "./ObjectSerializer";
1314

@@ -20,6 +21,7 @@ export class SLOCorrectionListResponse {
2021
* The list of of SLO corrections objects
2122
*/
2223
"data"?: Array<SLOCorrection>;
24+
"meta"?: ResponseMetaAttributes;
2325

2426
static readonly discriminator: string | undefined = undefined;
2527

@@ -31,6 +33,11 @@ export class SLOCorrectionListResponse {
3133
type: "Array<SLOCorrection>",
3234
format: "",
3335
},
36+
meta: {
37+
baseName: "meta",
38+
type: "ResponseMetaAttributes",
39+
format: "",
40+
},
3441
};
3542

3643
static getAttributeTypeMap() {
@@ -46,6 +53,12 @@ export class SLOCorrectionListResponse {
4653
""
4754
);
4855

56+
res.meta = ObjectSerializer.deserialize(
57+
data.meta,
58+
"ResponseMetaAttributes",
59+
""
60+
);
61+
4962
return res;
5063
}
5164

@@ -63,6 +76,12 @@ export class SLOCorrectionListResponse {
6376
""
6477
);
6578

79+
res.meta = ObjectSerializer.serialize(
80+
data.meta,
81+
"ResponseMetaAttributes",
82+
""
83+
);
84+
6685
return res;
6786
}
6887

0 commit comments

Comments
 (0)