Skip to content

Commit d0a7fc0

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

File tree

8 files changed

+278
-4
lines changed

8 files changed

+278
-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.dev6",
7-
"regenerated": "2021-05-12 09:32:34.249694",
8-
"spec_repo_commit": "62c8ffe"
7+
"regenerated": "2021-05-12 18:18:48.416456",
8+
"spec_repo_commit": "3445859"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-05-12 09:32:40.169258",
13-
"spec_repo_commit": "62c8ffe"
12+
"regenerated": "2021-05-12 18:18:53.860770",
13+
"spec_repo_commit": "3445859"
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
@@ -100,6 +100,7 @@ models/DistributionWidgetRequest.ts
100100
models/DistributionWidgetXAxis.ts
101101
models/DistributionWidgetYAxis.ts
102102
models/Downtime.ts
103+
models/DowntimeChild.ts
103104
models/DowntimeRecurrence.ts
104105
models/Event.ts
105106
models/EventAlertType.ts

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

Lines changed: 11 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 { DowntimeChild } from './DowntimeChild';
1112
import { DowntimeRecurrence } from './DowntimeRecurrence';
1213
import { HttpFile } from '../http/http';
1314
import { ObjectSerializer } from './ObjectSerializer';
@@ -21,6 +22,7 @@ export class Downtime {
2122
* If a scheduled downtime currently exists.
2223
*/
2324
'active'?: boolean;
25+
'activeChild'?: DowntimeChild;
2426
/**
2527
* If a scheduled downtime is canceled.
2628
*/
@@ -87,6 +89,11 @@ export class Downtime {
8789
"type": "boolean",
8890
"format": ""
8991
},
92+
"activeChild": {
93+
"baseName": "active_child",
94+
"type": "DowntimeChild",
95+
"format": ""
96+
},
9097
"canceled": {
9198
"baseName": "canceled",
9299
"type": "number",
@@ -172,6 +179,8 @@ export class Downtime {
172179

173180
res.active = ObjectSerializer.deserialize(data.active, "boolean", "")
174181

182+
res.activeChild = ObjectSerializer.deserialize(data.active_child, "DowntimeChild", "")
183+
175184
res.canceled = ObjectSerializer.deserialize(data.canceled, "number", "int64")
176185

177186
res.creatorId = ObjectSerializer.deserialize(data.creator_id, "number", "int32")
@@ -216,6 +225,8 @@ export class Downtime {
216225
}
217226
res.active = ObjectSerializer.serialize(data.active, "boolean", "")
218227

228+
res.active_child = ObjectSerializer.serialize(data.activeChild, "DowntimeChild", "")
229+
219230
res.canceled = ObjectSerializer.serialize(data.canceled, "number", "int64")
220231

221232
res.creator_id = ObjectSerializer.serialize(data.creatorId, "number", "int32")
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
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 { DowntimeRecurrence } from './DowntimeRecurrence';
12+
import { HttpFile } from '../http/http';
13+
import { ObjectSerializer } from './ObjectSerializer';
14+
15+
/**
16+
* The downtime object definition of the active child for the original parent recurring downtime. This field will only exist on recurring downtimes.
17+
*/
18+
19+
export class DowntimeChild {
20+
/**
21+
* If a scheduled downtime currently exists.
22+
*/
23+
'active'?: boolean;
24+
/**
25+
* If a scheduled downtime is canceled.
26+
*/
27+
'canceled'?: number;
28+
/**
29+
* User ID of the downtime creator.
30+
*/
31+
'creatorId'?: number;
32+
/**
33+
* If a downtime has been disabled.
34+
*/
35+
'disabled'?: boolean;
36+
/**
37+
* `0` for a downtime applied on `*` or all, `1` when the downtime is only scoped to hosts, or `2` when the downtime is scoped to anything but hosts.
38+
*/
39+
'downtimeType'?: number;
40+
/**
41+
* POSIX timestamp to end the downtime. If not provided, the downtime is in effect indefinitely until you cancel it.
42+
*/
43+
'end'?: number;
44+
/**
45+
* The downtime ID.
46+
*/
47+
'id'?: number;
48+
/**
49+
* A message to include with notifications for this downtime. Email notifications can be sent to specific users by using the same `@username` notation as events.
50+
*/
51+
'message'?: string;
52+
/**
53+
* A single monitor to which the downtime applies. If not provided, the downtime applies to all monitors.
54+
*/
55+
'monitorId'?: number;
56+
/**
57+
* A comma-separated list of monitor tags. For example, tags that are applied directly to monitors, not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. The resulting downtime applies to monitors that match ALL provided monitor tags. For example, `service:postgres` **AND** `team:frontend`.
58+
*/
59+
'monitorTags'?: Array<string>;
60+
/**
61+
* ID of the parent Downtime.
62+
*/
63+
'parentId'?: number;
64+
'recurrence'?: DowntimeRecurrence;
65+
/**
66+
* The scope(s) to which the downtime applies. For example, `host:app2`. Provide multiple scopes as a comma-separated list like `env:dev,env:prod`. The resulting downtime applies to sources that matches ALL provided scopes (`env:dev` **AND** `env:prod`).
67+
*/
68+
'scope'?: Array<string>;
69+
/**
70+
* POSIX timestamp to start the downtime. If not provided, the downtime starts the moment it is created.
71+
*/
72+
'start'?: number;
73+
/**
74+
* The timezone in which to display the downtime's start and end times in Datadog applications.
75+
*/
76+
'timezone'?: string;
77+
/**
78+
* ID of the last user that updated the downtime.
79+
*/
80+
'updaterId'?: number;
81+
82+
static readonly discriminator: string | undefined = undefined;
83+
84+
static readonly attributeTypeMap: {[key: string]: {baseName: string, type: string, format: string}} = {
85+
"active": {
86+
"baseName": "active",
87+
"type": "boolean",
88+
"format": ""
89+
},
90+
"canceled": {
91+
"baseName": "canceled",
92+
"type": "number",
93+
"format": "int64"
94+
},
95+
"creatorId": {
96+
"baseName": "creator_id",
97+
"type": "number",
98+
"format": "int32"
99+
},
100+
"disabled": {
101+
"baseName": "disabled",
102+
"type": "boolean",
103+
"format": ""
104+
},
105+
"downtimeType": {
106+
"baseName": "downtime_type",
107+
"type": "number",
108+
"format": "int32"
109+
},
110+
"end": {
111+
"baseName": "end",
112+
"type": "number",
113+
"format": "int64"
114+
},
115+
"id": {
116+
"baseName": "id",
117+
"type": "number",
118+
"format": "int64"
119+
},
120+
"message": {
121+
"baseName": "message",
122+
"type": "string",
123+
"format": ""
124+
},
125+
"monitorId": {
126+
"baseName": "monitor_id",
127+
"type": "number",
128+
"format": "int64"
129+
},
130+
"monitorTags": {
131+
"baseName": "monitor_tags",
132+
"type": "Array<string>",
133+
"format": ""
134+
},
135+
"parentId": {
136+
"baseName": "parent_id",
137+
"type": "number",
138+
"format": "int64"
139+
},
140+
"recurrence": {
141+
"baseName": "recurrence",
142+
"type": "DowntimeRecurrence",
143+
"format": ""
144+
},
145+
"scope": {
146+
"baseName": "scope",
147+
"type": "Array<string>",
148+
"format": ""
149+
},
150+
"start": {
151+
"baseName": "start",
152+
"type": "number",
153+
"format": "int64"
154+
},
155+
"timezone": {
156+
"baseName": "timezone",
157+
"type": "string",
158+
"format": ""
159+
},
160+
"updaterId": {
161+
"baseName": "updater_id",
162+
"type": "number",
163+
"format": "int32"
164+
} };
165+
166+
static getAttributeTypeMap() {
167+
return DowntimeChild.attributeTypeMap;
168+
}
169+
170+
static deserialize(data: {[key: string]: any}): DowntimeChild {
171+
let res = new DowntimeChild();
172+
173+
res.active = ObjectSerializer.deserialize(data.active, "boolean", "")
174+
175+
res.canceled = ObjectSerializer.deserialize(data.canceled, "number", "int64")
176+
177+
res.creatorId = ObjectSerializer.deserialize(data.creator_id, "number", "int32")
178+
179+
res.disabled = ObjectSerializer.deserialize(data.disabled, "boolean", "")
180+
181+
res.downtimeType = ObjectSerializer.deserialize(data.downtime_type, "number", "int32")
182+
183+
res.end = ObjectSerializer.deserialize(data.end, "number", "int64")
184+
185+
res.id = ObjectSerializer.deserialize(data.id, "number", "int64")
186+
187+
res.message = ObjectSerializer.deserialize(data.message, "string", "")
188+
189+
res.monitorId = ObjectSerializer.deserialize(data.monitor_id, "number", "int64")
190+
191+
res.monitorTags = ObjectSerializer.deserialize(data.monitor_tags, "Array<string>", "")
192+
193+
res.parentId = ObjectSerializer.deserialize(data.parent_id, "number", "int64")
194+
195+
res.recurrence = ObjectSerializer.deserialize(data.recurrence, "DowntimeRecurrence", "")
196+
197+
res.scope = ObjectSerializer.deserialize(data.scope, "Array<string>", "")
198+
199+
res.start = ObjectSerializer.deserialize(data.start, "number", "int64")
200+
201+
res.timezone = ObjectSerializer.deserialize(data.timezone, "string", "")
202+
203+
res.updaterId = ObjectSerializer.deserialize(data.updater_id, "number", "int32")
204+
205+
206+
return res;
207+
}
208+
209+
static serialize(data: DowntimeChild): {[key: string]: any} {
210+
let attributeTypes = DowntimeChild.getAttributeTypeMap();
211+
let res: {[index: string]: any} = {};
212+
for (let [key, value] of Object.entries(data)) {
213+
if (!(key in attributeTypes)) {
214+
throw new TypeError(`${key} attribute not in schema`);
215+
}
216+
}
217+
res.active = ObjectSerializer.serialize(data.active, "boolean", "")
218+
219+
res.canceled = ObjectSerializer.serialize(data.canceled, "number", "int64")
220+
221+
res.creator_id = ObjectSerializer.serialize(data.creatorId, "number", "int32")
222+
223+
res.disabled = ObjectSerializer.serialize(data.disabled, "boolean", "")
224+
225+
res.downtime_type = ObjectSerializer.serialize(data.downtimeType, "number", "int32")
226+
227+
res.end = ObjectSerializer.serialize(data.end, "number", "int64")
228+
229+
res.id = ObjectSerializer.serialize(data.id, "number", "int64")
230+
231+
res.message = ObjectSerializer.serialize(data.message, "string", "")
232+
233+
res.monitor_id = ObjectSerializer.serialize(data.monitorId, "number", "int64")
234+
235+
res.monitor_tags = ObjectSerializer.serialize(data.monitorTags, "Array<string>", "")
236+
237+
res.parent_id = ObjectSerializer.serialize(data.parentId, "number", "int64")
238+
239+
res.recurrence = ObjectSerializer.serialize(data.recurrence, "DowntimeRecurrence", "")
240+
241+
res.scope = ObjectSerializer.serialize(data.scope, "Array<string>", "")
242+
243+
res.start = ObjectSerializer.serialize(data.start, "number", "int64")
244+
245+
res.timezone = ObjectSerializer.serialize(data.timezone, "string", "")
246+
247+
res.updater_id = ObjectSerializer.serialize(data.updaterId, "number", "int32")
248+
249+
return res
250+
}
251+
252+
public constructor() {
253+
}
254+
}
255+
256+
257+

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ import { DistributionWidgetRequest } from './DistributionWidgetRequest';
6262
import { DistributionWidgetXAxis } from './DistributionWidgetXAxis';
6363
import { DistributionWidgetYAxis } from './DistributionWidgetYAxis';
6464
import { Downtime } from './Downtime';
65+
import { DowntimeChild } from './DowntimeChild';
6566
import { DowntimeRecurrence } from './DowntimeRecurrence';
6667
import { Event } from './Event';
6768
import { EventAlertType } from './EventAlertType';
@@ -776,6 +777,7 @@ let typeMap: {[index: string]: any} = {
776777
"DistributionWidgetXAxis": DistributionWidgetXAxis,
777778
"DistributionWidgetYAxis": DistributionWidgetYAxis,
778779
"Downtime": Downtime,
780+
"DowntimeChild": DowntimeChild,
779781
"DowntimeRecurrence": DowntimeRecurrence,
780782
"Event": Event,
781783
"EventCreateRequest": EventCreateRequest,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import { DistributionWidgetRequest } from '../models/DistributionWidgetRequest';
6666
import { DistributionWidgetXAxis } from '../models/DistributionWidgetXAxis';
6767
import { DistributionWidgetYAxis } from '../models/DistributionWidgetYAxis';
6868
import { Downtime } from '../models/Downtime';
69+
import { DowntimeChild } from '../models/DowntimeChild';
6970
import { DowntimeRecurrence } from '../models/DowntimeRecurrence';
7071
import { Event } from '../models/Event';
7172
import { EventAlertType } from '../models/EventAlertType';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import { DistributionWidgetRequest } from '../models/DistributionWidgetRequest';
6767
import { DistributionWidgetXAxis } from '../models/DistributionWidgetXAxis';
6868
import { DistributionWidgetYAxis } from '../models/DistributionWidgetYAxis';
6969
import { Downtime } from '../models/Downtime';
70+
import { DowntimeChild } from '../models/DowntimeChild';
7071
import { DowntimeRecurrence } from '../models/DowntimeRecurrence';
7172
import { Event } from '../models/Event';
7273
import { EventAlertType } from '../models/EventAlertType';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import { DistributionWidgetRequest } from '../models/DistributionWidgetRequest';
6666
import { DistributionWidgetXAxis } from '../models/DistributionWidgetXAxis';
6767
import { DistributionWidgetYAxis } from '../models/DistributionWidgetYAxis';
6868
import { Downtime } from '../models/Downtime';
69+
import { DowntimeChild } from '../models/DowntimeChild';
6970
import { DowntimeRecurrence } from '../models/DowntimeRecurrence';
7071
import { Event } from '../models/Event';
7172
import { EventAlertType } from '../models/EventAlertType';

0 commit comments

Comments
 (0)