Skip to content

Commit 792dfcb

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8ebfd3c of spec repo
1 parent 1fcd8e7 commit 792dfcb

File tree

6 files changed

+35
-7
lines changed

6 files changed

+35
-7
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "d93d991",
3-
"generated": "2025-07-15 09:36:57.148"
2+
"spec_repo_commit": "8ebfd3c",
3+
"generated": "2025-07-16 15:35:14.394"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22116,8 +22116,19 @@ components:
2211622116
readOnly: true
2211722117
type: object
2211822118
MetricAssetAttributes:
22119-
description: Assets related to the object, including title and url.
22119+
description: Assets related to the object, including title, url, and tags.
2212022120
properties:
22121+
tags:
22122+
description: List of tag keys used across all assets containing this metric.
22123+
example:
22124+
- env
22125+
- service
22126+
- host
22127+
- datacenter
22128+
items:
22129+
description: Tag key used in assets.
22130+
type: string
22131+
type: array
2212122132
title:
2212222133
description: Title of the asset.
2212322134
type: string

src/datadogV2/model/model_metric_asset_attributes.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ use serde::{Deserialize, Deserializer, Serialize};
66
use serde_with::skip_serializing_none;
77
use std::fmt::{self, Formatter};
88

9-
/// Assets related to the object, including title and url.
9+
/// Assets related to the object, including title, url, and tags.
1010
#[non_exhaustive]
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct MetricAssetAttributes {
14+
/// List of tag keys used across all assets containing this metric.
15+
#[serde(rename = "tags")]
16+
pub tags: Option<Vec<String>>,
1417
/// Title of the asset.
1518
#[serde(rename = "title")]
1619
pub title: Option<String>,
@@ -27,13 +30,19 @@ pub struct MetricAssetAttributes {
2730
impl MetricAssetAttributes {
2831
pub fn new() -> MetricAssetAttributes {
2932
MetricAssetAttributes {
33+
tags: None,
3034
title: None,
3135
url: None,
3236
additional_properties: std::collections::BTreeMap::new(),
3337
_unparsed: false,
3438
}
3539
}
3640

41+
pub fn tags(mut self, value: Vec<String>) -> Self {
42+
self.tags = Some(value);
43+
self
44+
}
45+
3746
pub fn title(mut self, value: String) -> Self {
3847
self.title = Some(value);
3948
self
@@ -76,6 +85,7 @@ impl<'de> Deserialize<'de> for MetricAssetAttributes {
7685
where
7786
M: MapAccess<'a>,
7887
{
88+
let mut tags: Option<Vec<String>> = None;
7989
let mut title: Option<String> = None;
8090
let mut url: Option<String> = None;
8191
let mut additional_properties: std::collections::BTreeMap<
@@ -86,6 +96,12 @@ impl<'de> Deserialize<'de> for MetricAssetAttributes {
8696

8797
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
8898
match k.as_str() {
99+
"tags" => {
100+
if v.is_null() {
101+
continue;
102+
}
103+
tags = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
104+
}
89105
"title" => {
90106
if v.is_null() {
91107
continue;
@@ -107,6 +123,7 @@ impl<'de> Deserialize<'de> for MetricAssetAttributes {
107123
}
108124

109125
let content = MetricAssetAttributes {
126+
tags,
110127
title,
111128
url,
112129
additional_properties,

src/datadogV2/model/model_metric_monitor_asset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct MetricMonitorAsset {
14-
/// Assets related to the object, including title and url.
14+
/// Assets related to the object, including title, url, and tags.
1515
#[serde(rename = "attributes")]
1616
pub attributes: Option<crate::datadogV2::model::MetricAssetAttributes>,
1717
/// The related monitor's ID.

src/datadogV2/model/model_metric_notebook_asset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct MetricNotebookAsset {
14-
/// Assets related to the object, including title and url.
14+
/// Assets related to the object, including title, url, and tags.
1515
#[serde(rename = "attributes")]
1616
pub attributes: Option<crate::datadogV2::model::MetricAssetAttributes>,
1717
/// The related notebook's ID.

src/datadogV2/model/model_metric_slo_asset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct MetricSLOAsset {
14-
/// Assets related to the object, including title and url.
14+
/// Assets related to the object, including title, url, and tags.
1515
#[serde(rename = "attributes")]
1616
pub attributes: Option<crate::datadogV2::model::MetricAssetAttributes>,
1717
/// The SLO ID.

0 commit comments

Comments
 (0)