Skip to content

Commit 7e38b0d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add domain prefix filter query parameter to list status pages API (#1487)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 9d1a535 commit 7e38b0d

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115344,6 +115344,11 @@ paths:
115344115344
schema:
115345115345
default: 50
115346115346
type: integer
115347+
- description: Filter status pages by exact domain prefix match. Returns at most one result.
115348+
in: query
115349+
name: filter[domain_prefix]
115350+
schema:
115351+
type: string
115347115352
- description: "Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user."
115348115353
in: query
115349115354
name: include

src/datadogV2/api/api_status_pages.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ pub struct ListStatusPagesOptionalParams {
278278
pub page_offset: Option<i32>,
279279
/// The number of status pages to return per page.
280280
pub page_limit: Option<i32>,
281+
/// Filter status pages by exact domain prefix match. Returns at most one result.
282+
pub filter_domain_prefix: Option<String>,
281283
/// Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user.
282284
pub include: Option<String>,
283285
}
@@ -293,6 +295,11 @@ impl ListStatusPagesOptionalParams {
293295
self.page_limit = Some(value);
294296
self
295297
}
298+
/// Filter status pages by exact domain prefix match. Returns at most one result.
299+
pub fn filter_domain_prefix(mut self, value: String) -> Self {
300+
self.filter_domain_prefix = Some(value);
301+
self
302+
}
296303
/// Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user.
297304
pub fn include(mut self, value: String) -> Self {
298305
self.include = Some(value);
@@ -2479,6 +2486,7 @@ impl StatusPagesAPI {
24792486
// unbox and build optional parameters
24802487
let page_offset = params.page_offset;
24812488
let page_limit = params.page_limit;
2489+
let filter_domain_prefix = params.filter_domain_prefix;
24822490
let include = params.include;
24832491

24842492
let local_client = &self.client;
@@ -2498,6 +2506,10 @@ impl StatusPagesAPI {
24982506
local_req_builder =
24992507
local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]);
25002508
};
2509+
if let Some(ref local_query_param) = filter_domain_prefix {
2510+
local_req_builder = local_req_builder
2511+
.query(&[("filter[domain_prefix]", &local_query_param.to_string())]);
2512+
};
25012513
if let Some(ref local_query_param) = include {
25022514
local_req_builder =
25032515
local_req_builder.query(&[("include", &local_query_param.to_string())]);

tests/scenarios/function_mappings.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42504,12 +42504,16 @@ fn test_v2_list_status_pages(world: &mut DatadogWorld, _parameters: &HashMap<Str
4250442504
let page_limit = _parameters
4250542505
.get("page[limit]")
4250642506
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
42507+
let filter_domain_prefix = _parameters
42508+
.get("filter[domain_prefix]")
42509+
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
4250742510
let include = _parameters
4250842511
.get("include")
4250942512
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
4251042513
let mut params = datadogV2::api_status_pages::ListStatusPagesOptionalParams::default();
4251142514
params.page_offset = page_offset;
4251242515
params.page_limit = page_limit;
42516+
params.filter_domain_prefix = filter_domain_prefix;
4251342517
params.include = include;
4251442518
let response = match block_on(api.list_status_pages_with_http_info(params)) {
4251542519
Ok(response) => response,

0 commit comments

Comments
 (0)