Skip to content

Commit 5415351

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

File tree

7 files changed

+35
-23
lines changed

7 files changed

+35
-23
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-20 07:39:27.150072",
8-
"spec_repo_commit": "12e8b3e"
7+
"regenerated": "2021-05-21 07:36:13.096490",
8+
"spec_repo_commit": "c413ebe"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-05-20 07:39:33.025046",
13-
"spec_repo_commit": "12e8b3e"
12+
"regenerated": "2021-05-21 07:36:18.492517",
13+
"spec_repo_commit": "c413ebe"
1414
}
1515
}
1616
}

features/v1/monitors.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ Feature: Monitors
3131
@generated @skip
3232
Scenario: Create a monitor returns "Bad Request" response
3333
Given new "CreateMonitor" request
34-
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "composite"}
34+
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"}
3535
When the request is sent
3636
Then the response status is 400 Bad Request
3737

3838
@generated @skip
3939
Scenario: Create a monitor returns "OK" response
4040
Given new "CreateMonitor" request
41-
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "composite"}
41+
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"}
4242
When the request is sent
4343
Then the response status is 200 OK
4444

@@ -67,23 +67,23 @@ Feature: Monitors
6767
Scenario: Edit a monitor returns "Bad Request" response
6868
Given new "UpdateMonitor" request
6969
And request contains "monitor_id" parameter from "<PATH>"
70-
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "composite"}
70+
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"}
7171
When the request is sent
7272
Then the response status is 400 Bad Request
7373

7474
@generated @skip
7575
Scenario: Edit a monitor returns "Monitor Not Found error" response
7676
Given new "UpdateMonitor" request
7777
And request contains "monitor_id" parameter from "<PATH>"
78-
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "composite"}
78+
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"}
7979
When the request is sent
8080
Then the response status is 404 Monitor Not Found error
8181

8282
@generated @skip
8383
Scenario: Edit a monitor returns "OK" response
8484
Given new "UpdateMonitor" request
8585
And request contains "monitor_id" parameter from "<PATH>"
86-
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "composite"}
86+
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "metric alert"}
8787
When the request is sent
8888
Then the response status is 200 OK
8989

@@ -122,13 +122,13 @@ Feature: Monitors
122122
@generated @skip
123123
Scenario: Validate a monitor returns "Invalid JSON" response
124124
Given new "ValidateMonitor" request
125-
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "composite"}
125+
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"}
126126
When the request is sent
127127
Then the response status is 400 Invalid JSON
128128

129129
@generated @skip
130130
Scenario: Validate a monitor returns "OK" response
131131
Given new "ValidateMonitor" request
132-
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": null, "restricted_roles": [null], "tags": [null], "type": "composite"}
132+
And body with value {"message": null, "name": null, "options": {"enable_logs_sample": null, "escalation_message": "none", "evaluation_delay": null, "groupby_simple_monitor": null, "include_tags": true, "locked": null, "min_failure_duration": 0, "min_location_failed": 1, "new_host_delay": 300, "no_data_timeframe": null, "notify_audit": false, "notify_no_data": false, "renotify_interval": "none", "require_full_window": null, "silenced": null, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical": null, "critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": "none"}, "priority": null, "query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100", "restricted_roles": [null], "tags": [null], "type": "metric alert"}
133133
When the request is sent
134134
Then the response status is 200 OK

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -733,13 +733,13 @@ export class MonitorsApiResponseProcessor {
733733
* @params response Response returned by the server for a request to validateMonitor
734734
* @throws ApiException if the response code was not in [200, 299]
735735
*/
736-
public async validateMonitor(response: ResponseContext): Promise<Monitor > {
736+
public async validateMonitor(response: ResponseContext): Promise<any > {
737737
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
738738
if (isCodeInRange("200", response.httpStatusCode)) {
739-
const body: Monitor = ObjectSerializer.deserialize(
739+
const body: any = ObjectSerializer.deserialize(
740740
ObjectSerializer.parse(await response.body.text(), contentType),
741-
"Monitor", ""
742-
) as Monitor;
741+
"any", ""
742+
) as any;
743743
return body;
744744
}
745745
if (isCodeInRange("400", response.httpStatusCode)) {
@@ -759,10 +759,10 @@ export class MonitorsApiResponseProcessor {
759759

760760
// Work around for missing responses in specification, e.g. for petstore.yaml
761761
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
762-
const body: Monitor = ObjectSerializer.deserialize(
762+
const body: any = ObjectSerializer.deserialize(
763763
ObjectSerializer.parse(await response.body.text(), contentType),
764-
"Monitor", ""
765-
) as Monitor;
764+
"any", ""
765+
) as any;
766766
return body;
767767
}
768768

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class Monitor {
5959
/**
6060
* The monitor query.
6161
*/
62-
'query'?: string;
62+
'query': string;
6363
/**
6464
* A list of role identifiers that can be pulled from the Roles API. Cannot be used with `locked` option.
6565
*/
@@ -69,7 +69,7 @@ export class Monitor {
6969
* Tags associated to your monitor.
7070
*/
7171
'tags'?: Array<string>;
72-
'type'?: MonitorType;
72+
'type': MonitorType;
7373

7474
static readonly discriminator: string | undefined = undefined;
7575

@@ -188,6 +188,9 @@ export class Monitor {
188188

189189
res.priority = ObjectSerializer.deserialize(data.priority, "number", "int64")
190190

191+
if (data.query === undefined) {
192+
throw new TypeError("missing required attribute 'query' on 'Monitor' object");
193+
}
191194
res.query = ObjectSerializer.deserialize(data.query, "string", "")
192195

193196
res.restrictedRoles = ObjectSerializer.deserialize(data.restricted_roles, "Array<string>", "")
@@ -196,6 +199,9 @@ export class Monitor {
196199

197200
res.tags = ObjectSerializer.deserialize(data.tags, "Array<string>", "")
198201

202+
if (data.type === undefined) {
203+
throw new TypeError("missing required attribute 'type' on 'Monitor' object");
204+
}
199205
if (['composite', 'event alert', 'log alert', 'metric alert', 'process alert', 'query alert', 'rum alert', 'service check', 'synthetics alert', 'trace-analytics alert', 'slo alert', 'event-v2 alert', undefined].includes(data.type)) {
200206
res.type = data.type;
201207
} else {
@@ -240,6 +246,9 @@ export class Monitor {
240246

241247
res.priority = ObjectSerializer.serialize(data.priority, "number", "int64")
242248

249+
if (data.query === undefined) {
250+
throw new TypeError("missing required attribute 'query' on 'Monitor' object");
251+
}
243252
res.query = ObjectSerializer.serialize(data.query, "string", "")
244253

245254
res.restricted_roles = ObjectSerializer.serialize(data.restrictedRoles, "Array<string>", "")
@@ -248,6 +257,9 @@ export class Monitor {
248257

249258
res.tags = ObjectSerializer.serialize(data.tags, "Array<string>", "")
250259

260+
if (data.type === undefined) {
261+
throw new TypeError("missing required attribute 'type' on 'Monitor' object");
262+
}
251263
if (['composite', 'event alert', 'log alert', 'metric alert', 'process alert', 'query alert', 'rum alert', 'service check', 'synthetics alert', 'trace-analytics alert', 'slo alert', 'event-v2 alert', undefined].includes(data.type)) {
252264
res.type = data.type;
253265
} else {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2551,7 +2551,7 @@ export class ObjectMonitorsApi {
25512551
* Validate a monitor
25522552
* @param param the request object
25532553
*/
2554-
public validateMonitor(param: MonitorsApiValidateMonitorRequest, options?: Configuration): Promise<Monitor> {
2554+
public validateMonitor(param: MonitorsApiValidateMonitorRequest, options?: Configuration): Promise<any> {
25552555
return this.api.validateMonitor(param.body, options).toPromise();
25562556
}
25572557

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3023,7 +3023,7 @@ export class ObservableMonitorsApi {
30233023
* Validate a monitor
30243024
* @param body Monitor request object
30253025
*/
3026-
public validateMonitor(body: Monitor, options?: Configuration): Observable<Monitor> {
3026+
public validateMonitor(body: Monitor, options?: Configuration): Observable<any> {
30273027
const requestContextPromise = this.requestFactory.validateMonitor(body, options);
30283028

30293029
// build promise chain

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1803,7 +1803,7 @@ export class PromiseMonitorsApi {
18031803
* Validate a monitor
18041804
* @param body Monitor request object
18051805
*/
1806-
public validateMonitor(body: Monitor, options?: Configuration): Promise<Monitor> {
1806+
public validateMonitor(body: Monitor, options?: Configuration): Promise<any> {
18071807
const result = this.api.validateMonitor(body, options);
18081808
return result.toPromise();
18091809
}

0 commit comments

Comments
 (0)