Skip to content

Commit b7d39b2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 328650a of spec repo
1 parent 28535b6 commit b7d39b2

File tree

3 files changed

+120
-1
lines changed

3 files changed

+120
-1
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58153,6 +58153,47 @@ paths:
5815358153
description: Returns a list of all monitor notification rules.
5815458154
operationId: GetMonitorNotificationRules
5815558155
parameters:
58156+
- description: The page to start paginating from. If `page` is not specified,
58157+
the argument defaults to the first page.
58158+
in: query
58159+
name: page
58160+
required: false
58161+
schema:
58162+
format: int32
58163+
maximum: 1000000
58164+
minimum: 0
58165+
type: integer
58166+
- description: The number of rules to return per page. If `per_page` is not
58167+
specified, the argument defaults to 100.
58168+
in: query
58169+
name: per_page
58170+
required: false
58171+
schema:
58172+
format: int32
58173+
maximum: 1000
58174+
minimum: 1
58175+
type: integer
58176+
- description: 'String for sort order, composed of field and sort order separated
58177+
by a colon, for example `name:asc`. Supported sort directions: `asc`, `desc`.
58178+
Supported fields: `name`, `created_at`.'
58179+
in: query
58180+
name: sort
58181+
required: false
58182+
schema:
58183+
type: string
58184+
- description: 'JSON-encoded filter object. Supported keys:
58185+
58186+
* `text`: Free-text query matched against rule name, tags, and recipients.
58187+
58188+
* `tags`: Array of strings. Return rules that have any of these tags.
58189+
58190+
* `recipients`: Array of strings. Return rules that have any of these recipients.'
58191+
example: '{"text":"error","tags":["env:prod","team:my-team"],"recipients":["slack-monitor-app","[email protected]"]}'
58192+
in: query
58193+
name: filters
58194+
required: false
58195+
schema:
58196+
type: string
5815658197
- description: 'Comma-separated list of resource paths for related resources
5815758198
to include in the response. Supported resource
5815858199

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": "string",
6139+
"format": "",
6140+
},
61256141
"include": {
61266142
"type": "string",
61276143
"format": "",

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

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ export class MonitorsApiRequestFactory extends BaseAPIRequestFactory {
351351
}
352352

353353
public async getMonitorNotificationRules(
354+
page?: number,
355+
perPage?: number,
356+
sort?: string,
357+
filters?: string,
354358
include?: string,
355359
_options?: Configuration
356360
): Promise<RequestContext> {
@@ -367,6 +371,34 @@ export class MonitorsApiRequestFactory extends BaseAPIRequestFactory {
367371
requestContext.setHttpConfig(_config.httpConfig);
368372

369373
// Query Params
374+
if (page !== undefined) {
375+
requestContext.setQueryParam(
376+
"page",
377+
ObjectSerializer.serialize(page, "number", "int32"),
378+
""
379+
);
380+
}
381+
if (perPage !== undefined) {
382+
requestContext.setQueryParam(
383+
"per_page",
384+
ObjectSerializer.serialize(perPage, "number", "int32"),
385+
""
386+
);
387+
}
388+
if (sort !== undefined) {
389+
requestContext.setQueryParam(
390+
"sort",
391+
ObjectSerializer.serialize(sort, "string", ""),
392+
""
393+
);
394+
}
395+
if (filters !== undefined) {
396+
requestContext.setQueryParam(
397+
"filters",
398+
ObjectSerializer.serialize(filters, "string", ""),
399+
""
400+
);
401+
}
370402
if (include !== undefined) {
371403
requestContext.setQueryParam(
372404
"include",
@@ -1836,6 +1868,29 @@ export interface MonitorsApiGetMonitorNotificationRuleRequest {
18361868
}
18371869

18381870
export interface MonitorsApiGetMonitorNotificationRulesRequest {
1871+
/**
1872+
* The page to start paginating from. If `page` is not specified, the argument defaults to the first page.
1873+
* @type number
1874+
*/
1875+
page?: number;
1876+
/**
1877+
* The number of rules to return per page. If `per_page` is not specified, the argument defaults to 100.
1878+
* @type number
1879+
*/
1880+
perPage?: number;
1881+
/**
1882+
* 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`.
1883+
* @type string
1884+
*/
1885+
sort?: string;
1886+
/**
1887+
* JSON-encoded filter object. Supported keys:
1888+
* * `text`: Free-text query matched against rule name, tags, and recipients.
1889+
* * `tags`: Array of strings. Return rules that have any of these tags.
1890+
* * `recipients`: Array of strings. Return rules that have any of these recipients.
1891+
* @type string
1892+
*/
1893+
filters?: string;
18391894
/**
18401895
* Comma-separated list of resource paths for related resources to include in the response. Supported resource
18411896
* path is `created_by`.
@@ -2120,7 +2175,14 @@ export class MonitorsApi {
21202175
options?: Configuration
21212176
): Promise<MonitorNotificationRuleListResponse> {
21222177
const requestContextPromise =
2123-
this.requestFactory.getMonitorNotificationRules(param.include, options);
2178+
this.requestFactory.getMonitorNotificationRules(
2179+
param.page,
2180+
param.perPage,
2181+
param.sort,
2182+
param.filters,
2183+
param.include,
2184+
options
2185+
);
21242186
return requestContextPromise.then((requestContext) => {
21252187
return this.configuration.httpApi
21262188
.send(requestContext)

0 commit comments

Comments
 (0)