Skip to content

Commit a5ad539

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0c5a5b9 of spec repo
1 parent d3978f2 commit a5ad539

File tree

6 files changed

+204
-1
lines changed

6 files changed

+204
-1
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26714,6 +26714,31 @@ components:
2671426714
description: The ID of the monitor notification rule.
2671526715
example: 00000000-0000-1234-0000-000000000000
2671626716
type: string
26717+
MonitorNotificationRuleListFilters:
26718+
additionalProperties: false
26719+
description: Filter all rules by the given filter criteria. Defaults to no filtering.
26720+
properties:
26721+
recipients:
26722+
description: List of recipients to filter Notification Rules by.
26723+
example:
26724+
- slack-monitor-app
26725+
26726+
items:
26727+
type: string
26728+
type: array
26729+
tags:
26730+
description: List of tags to filter Notification Rules by.
26731+
example:
26732+
- env:prod
26733+
- service:api
26734+
- team:my-team
26735+
items:
26736+
type: string
26737+
type: array
26738+
text:
26739+
description: Text to filter Notification Rules by.
26740+
type: string
26741+
type: object
2671726742
MonitorNotificationRuleListResponse:
2671826743
description: Response for retrieving all monitor notification rules.
2671926744
properties:
@@ -58153,6 +58178,43 @@ paths:
5815358178
description: Returns a list of all monitor notification rules.
5815458179
operationId: GetMonitorNotificationRules
5815558180
parameters:
58181+
- description: The page to start paginating from. If `page` is not specified,
58182+
the argument defaults to the first page.
58183+
in: query
58184+
name: page
58185+
required: false
58186+
schema:
58187+
format: int32
58188+
maximum: 1000000
58189+
minimum: 0
58190+
type: integer
58191+
- description: The number of rules to return per page. If `per_page` is not
58192+
specified, the argument defaults to 100.
58193+
in: query
58194+
name: per_page
58195+
required: false
58196+
schema:
58197+
format: int32
58198+
maximum: 1000
58199+
minimum: 1
58200+
type: integer
58201+
- description: 'String for sort order, composed of field and sort order separated
58202+
by a colon, for example `name:asc`. Supported sort directions: `asc`, `desc`.
58203+
Supported fields: `name`, `created_at`.'
58204+
in: query
58205+
name: sort
58206+
required: false
58207+
schema:
58208+
type: string
58209+
- description: 'Filter all rules by the given filter criteria. Defaults to no
58210+
filtering.
58211+
58212+
Supported fields: `text`, `tags`, `recipients`.'
58213+
in: query
58214+
name: filters
58215+
required: false
58216+
schema:
58217+
$ref: '#/components/schemas/MonitorNotificationRuleListFilters'
5815658218
- description: 'Comma-separated list of resource paths for related resources
5815758219
to include in the response. Supported resource
5815858220

features/support/scenarios_model_mapping.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6122,6 +6122,22 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
61226122
"operationResponseType": "IntakePayloadAccepted",
61236123
},
61246124
"v2.GetMonitorNotificationRules": {
6125+
"page": {
6126+
"type": "number",
6127+
"format": "int32",
6128+
},
6129+
"perPage": {
6130+
"type": "number",
6131+
"format": "int32",
6132+
},
6133+
"sort": {
6134+
"type": "string",
6135+
"format": "",
6136+
},
6137+
"filters": {
6138+
"type": "MonitorNotificationRuleListFilters",
6139+
"format": "",
6140+
},
61256141
"include": {
61266142
"type": "string",
61276143
"format": "",

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

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { MonitorConfigPolicyEditRequest } from "../models/MonitorConfigPolicyEdi
2222
import { MonitorConfigPolicyListResponse } from "../models/MonitorConfigPolicyListResponse";
2323
import { MonitorConfigPolicyResponse } from "../models/MonitorConfigPolicyResponse";
2424
import { MonitorNotificationRuleCreateRequest } from "../models/MonitorNotificationRuleCreateRequest";
25+
import { MonitorNotificationRuleListFilters } from "../models/MonitorNotificationRuleListFilters";
2526
import { MonitorNotificationRuleListResponse } from "../models/MonitorNotificationRuleListResponse";
2627
import { MonitorNotificationRuleResponse } from "../models/MonitorNotificationRuleResponse";
2728
import { MonitorNotificationRuleUpdateRequest } from "../models/MonitorNotificationRuleUpdateRequest";
@@ -351,6 +352,10 @@ export class MonitorsApiRequestFactory extends BaseAPIRequestFactory {
351352
}
352353

353354
public async getMonitorNotificationRules(
355+
page?: number,
356+
perPage?: number,
357+
sort?: string,
358+
filters?: MonitorNotificationRuleListFilters,
354359
include?: string,
355360
_options?: Configuration
356361
): Promise<RequestContext> {
@@ -367,6 +372,38 @@ export class MonitorsApiRequestFactory extends BaseAPIRequestFactory {
367372
requestContext.setHttpConfig(_config.httpConfig);
368373

369374
// Query Params
375+
if (page !== undefined) {
376+
requestContext.setQueryParam(
377+
"page",
378+
ObjectSerializer.serialize(page, "number", "int32"),
379+
""
380+
);
381+
}
382+
if (perPage !== undefined) {
383+
requestContext.setQueryParam(
384+
"per_page",
385+
ObjectSerializer.serialize(perPage, "number", "int32"),
386+
""
387+
);
388+
}
389+
if (sort !== undefined) {
390+
requestContext.setQueryParam(
391+
"sort",
392+
ObjectSerializer.serialize(sort, "string", ""),
393+
""
394+
);
395+
}
396+
if (filters !== undefined) {
397+
requestContext.setQueryParam(
398+
"filters",
399+
ObjectSerializer.serialize(
400+
filters,
401+
"MonitorNotificationRuleListFilters",
402+
""
403+
),
404+
""
405+
);
406+
}
370407
if (include !== undefined) {
371408
requestContext.setQueryParam(
372409
"include",
@@ -1836,6 +1873,27 @@ export interface MonitorsApiGetMonitorNotificationRuleRequest {
18361873
}
18371874

18381875
export interface MonitorsApiGetMonitorNotificationRulesRequest {
1876+
/**
1877+
* The page to start paginating from. If `page` is not specified, the argument defaults to the first page.
1878+
* @type number
1879+
*/
1880+
page?: number;
1881+
/**
1882+
* The number of rules to return per page. If `per_page` is not specified, the argument defaults to 100.
1883+
* @type number
1884+
*/
1885+
perPage?: number;
1886+
/**
1887+
* String for sort order, composed of field and sort order separated by a colon, for example `name:asc`. Supported sort directions: `asc`, `desc`. Supported fields: `name`, `created_at`.
1888+
* @type string
1889+
*/
1890+
sort?: string;
1891+
/**
1892+
* Filter all rules by the given filter criteria. Defaults to no filtering.
1893+
* Supported fields: `text`, `tags`, `recipients`.
1894+
* @type MonitorNotificationRuleListFilters
1895+
*/
1896+
filters?: MonitorNotificationRuleListFilters;
18391897
/**
18401898
* Comma-separated list of resource paths for related resources to include in the response. Supported resource
18411899
* path is `created_by`.
@@ -2120,7 +2178,14 @@ export class MonitorsApi {
21202178
options?: Configuration
21212179
): Promise<MonitorNotificationRuleListResponse> {
21222180
const requestContextPromise =
2123-
this.requestFactory.getMonitorNotificationRules(param.include, options);
2181+
this.requestFactory.getMonitorNotificationRules(
2182+
param.page,
2183+
param.perPage,
2184+
param.sort,
2185+
param.filters,
2186+
param.include,
2187+
options
2188+
);
21242189
return requestContextPromise.then((requestContext) => {
21252190
return this.configuration.httpApi
21262191
.send(requestContext)

packages/datadog-api-client-v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,7 @@ export { MonitorNotificationRuleCreateRequestData } from "./models/MonitorNotifi
24502450
export { MonitorNotificationRuleData } from "./models/MonitorNotificationRuleData";
24512451
export { MonitorNotificationRuleFilter } from "./models/MonitorNotificationRuleFilter";
24522452
export { MonitorNotificationRuleFilterTags } from "./models/MonitorNotificationRuleFilterTags";
2453+
export { MonitorNotificationRuleListFilters } from "./models/MonitorNotificationRuleListFilters";
24532454
export { MonitorNotificationRuleListResponse } from "./models/MonitorNotificationRuleListResponse";
24542455
export { MonitorNotificationRuleRelationships } from "./models/MonitorNotificationRuleRelationships";
24552456
export { MonitorNotificationRuleRelationshipsCreatedBy } from "./models/MonitorNotificationRuleRelationshipsCreatedBy";
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
7+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* Filter all rules by the given filter criteria. Defaults to no filtering.
11+
*/
12+
export class MonitorNotificationRuleListFilters {
13+
/**
14+
* List of recipients to filter Notification Rules by.
15+
*/
16+
"recipients"?: Array<string>;
17+
/**
18+
* List of tags to filter Notification Rules by.
19+
*/
20+
"tags"?: Array<string>;
21+
/**
22+
* Text to filter Notification Rules by.
23+
*/
24+
"text"?: string;
25+
26+
/**
27+
* @ignore
28+
*/
29+
"_unparsed"?: boolean;
30+
31+
/**
32+
* @ignore
33+
*/
34+
static readonly attributeTypeMap: AttributeTypeMap = {
35+
recipients: {
36+
baseName: "recipients",
37+
type: "Array<string>",
38+
},
39+
tags: {
40+
baseName: "tags",
41+
type: "Array<string>",
42+
},
43+
text: {
44+
baseName: "text",
45+
type: "string",
46+
},
47+
};
48+
49+
/**
50+
* @ignore
51+
*/
52+
static getAttributeTypeMap(): AttributeTypeMap {
53+
return MonitorNotificationRuleListFilters.attributeTypeMap;
54+
}
55+
56+
public constructor() {}
57+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,7 @@ import { MonitorNotificationRuleCreateRequest } from "./MonitorNotificationRuleC
12421242
import { MonitorNotificationRuleCreateRequestData } from "./MonitorNotificationRuleCreateRequestData";
12431243
import { MonitorNotificationRuleData } from "./MonitorNotificationRuleData";
12441244
import { MonitorNotificationRuleFilterTags } from "./MonitorNotificationRuleFilterTags";
1245+
import { MonitorNotificationRuleListFilters } from "./MonitorNotificationRuleListFilters";
12451246
import { MonitorNotificationRuleListResponse } from "./MonitorNotificationRuleListResponse";
12461247
import { MonitorNotificationRuleRelationships } from "./MonitorNotificationRuleRelationships";
12471248
import { MonitorNotificationRuleRelationshipsCreatedBy } from "./MonitorNotificationRuleRelationshipsCreatedBy";
@@ -5049,6 +5050,7 @@ const typeMap: { [index: string]: any } = {
50495050
MonitorNotificationRuleCreateRequestData,
50505051
MonitorNotificationRuleData: MonitorNotificationRuleData,
50515052
MonitorNotificationRuleFilterTags: MonitorNotificationRuleFilterTags,
5053+
MonitorNotificationRuleListFilters: MonitorNotificationRuleListFilters,
50525054
MonitorNotificationRuleListResponse: MonitorNotificationRuleListResponse,
50535055
MonitorNotificationRuleRelationships: MonitorNotificationRuleRelationships,
50545056
MonitorNotificationRuleRelationshipsCreatedBy:

0 commit comments

Comments
 (0)