Skip to content

Commit 3f5cf52

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b89b292b of spec repo
1 parent adbcadc commit 3f5cf52

File tree

4 files changed

+35
-7
lines changed

4 files changed

+35
-7
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-02-06 14:56:56.714327",
8-
"spec_repo_commit": "3c39fb0c"
7+
"regenerated": "2025-02-06 17:59:42.408810",
8+
"spec_repo_commit": "b89b292b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-06 14:56:56.731125",
13-
"spec_repo_commit": "3c39fb0c"
12+
"regenerated": "2025-02-06 17:59:42.424278",
13+
"spec_repo_commit": "b89b292b"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -40196,7 +40196,7 @@ paths:
4019640196
required: false
4019740197
schema:
4019840198
type: boolean
40199-
- description: '(Beta) Filter custom metrics that have or have not been queried
40199+
- description: '(Preview) Filter custom metrics that have or have not been queried
4020040200
in the specified window[seconds].
4020140201

4020240202
If no window is provided or the window is less than 2 hours, a default of
@@ -40217,6 +40217,14 @@ paths:
4021740217
required: false
4021840218
schema:
4021940219
type: string
40220+
- description: (Preview) Filter metrics that are used in dashboards, monitors,
40221+
notebooks, SLOs.
40222+
example: true
40223+
in: query
40224+
name: filter[related_assets]
40225+
required: false
40226+
schema:
40227+
type: boolean
4022040228
- description: 'The number of seconds of look back (from now) to apply to a
4022140229
filter[tag] or filter[queried] query.
4022240230

src/datadogV2/api/api_metrics.rs

+14-2
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ pub struct ListTagConfigurationsOptionalParams {
8888
/// Filter distributions with additional percentile
8989
/// aggregations enabled or disabled.
9090
pub filter_include_percentiles: Option<bool>,
91-
/// (Beta) Filter custom metrics that have or have not been queried in the specified window[seconds].
91+
/// (Preview) Filter custom metrics that have or have not been queried in the specified window[seconds].
9292
/// If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
9393
pub filter_queried: Option<bool>,
9494
/// Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions.
9595
/// Can only be combined with the filter[queried] filter.
9696
pub filter_tags: Option<String>,
97+
/// (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs.
98+
pub filter_related_assets: Option<bool>,
9799
/// The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query.
98100
/// Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days).
99101
pub window_seconds: Option<i64>,
@@ -130,7 +132,7 @@ impl ListTagConfigurationsOptionalParams {
130132
self.filter_include_percentiles = Some(value);
131133
self
132134
}
133-
/// (Beta) Filter custom metrics that have or have not been queried in the specified window[seconds].
135+
/// (Preview) Filter custom metrics that have or have not been queried in the specified window[seconds].
134136
/// If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
135137
pub fn filter_queried(mut self, value: bool) -> Self {
136138
self.filter_queried = Some(value);
@@ -142,6 +144,11 @@ impl ListTagConfigurationsOptionalParams {
142144
self.filter_tags = Some(value);
143145
self
144146
}
147+
/// (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs.
148+
pub fn filter_related_assets(mut self, value: bool) -> Self {
149+
self.filter_related_assets = Some(value);
150+
self
151+
}
145152
/// The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query.
146153
/// Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days).
147154
pub fn window_seconds(mut self, value: i64) -> Self {
@@ -1545,6 +1552,7 @@ impl MetricsAPI {
15451552
let filter_include_percentiles = params.filter_include_percentiles;
15461553
let filter_queried = params.filter_queried;
15471554
let filter_tags = params.filter_tags;
1555+
let filter_related_assets = params.filter_related_assets;
15481556
let window_seconds = params.window_seconds;
15491557
let page_size = params.page_size;
15501558
let page_cursor = params.page_cursor;
@@ -1584,6 +1592,10 @@ impl MetricsAPI {
15841592
local_req_builder =
15851593
local_req_builder.query(&[("filter[tags]", &local_query_param.to_string())]);
15861594
};
1595+
if let Some(ref local_query_param) = filter_related_assets {
1596+
local_req_builder = local_req_builder
1597+
.query(&[("filter[related_assets]", &local_query_param.to_string())]);
1598+
};
15871599
if let Some(ref local_query_param) = window_seconds {
15881600
local_req_builder =
15891601
local_req_builder.query(&[("window[seconds]", &local_query_param.to_string())]);

tests/scenarios/function_mappings.rs

+8
Original file line numberDiff line numberDiff line change
@@ -18511,6 +18511,9 @@ fn test_v2_list_tag_configurations(world: &mut DatadogWorld, _parameters: &HashM
1851118511
let filter_tags = _parameters
1851218512
.get("filter[tags]")
1851318513
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
18514+
let filter_related_assets = _parameters
18515+
.get("filter[related_assets]")
18516+
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
1851418517
let window_seconds = _parameters
1851518518
.get("window[seconds]")
1851618519
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
@@ -18527,6 +18530,7 @@ fn test_v2_list_tag_configurations(world: &mut DatadogWorld, _parameters: &HashM
1852718530
params.filter_include_percentiles = filter_include_percentiles;
1852818531
params.filter_queried = filter_queried;
1852918532
params.filter_tags = filter_tags;
18533+
params.filter_related_assets = filter_related_assets;
1853018534
params.window_seconds = window_seconds;
1853118535
params.page_size = page_size;
1853218536
params.page_cursor = page_cursor;
@@ -18574,6 +18578,9 @@ fn test_v2_list_tag_configurations_with_pagination(
1857418578
let filter_tags = _parameters
1857518579
.get("filter[tags]")
1857618580
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
18581+
let filter_related_assets = _parameters
18582+
.get("filter[related_assets]")
18583+
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
1857718584
let window_seconds = _parameters
1857818585
.get("window[seconds]")
1857918586
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
@@ -18590,6 +18597,7 @@ fn test_v2_list_tag_configurations_with_pagination(
1859018597
params.filter_include_percentiles = filter_include_percentiles;
1859118598
params.filter_queried = filter_queried;
1859218599
params.filter_tags = filter_tags;
18600+
params.filter_related_assets = filter_related_assets;
1859318601
params.window_seconds = window_seconds;
1859418602
params.page_size = page_size;
1859518603
params.page_cursor = page_cursor;

0 commit comments

Comments
 (0)