Skip to content

Commit c2fd667

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ffed3856 of spec repo
1 parent faeb90c commit c2fd667

8 files changed

+53
-12
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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": "2024-08-21 15:16:57.046099",
8-
"spec_repo_commit": "4470dfc1"
7+
"regenerated": "2024-08-21 16:52:40.444167",
8+
"spec_repo_commit": "ffed3856"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-21 15:16:57.075509",
13-
"spec_repo_commit": "4470dfc1"
12+
"regenerated": "2024-08-21 16:52:40.469081",
13+
"spec_repo_commit": "ffed3856"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12649,11 +12649,14 @@ components:
1264912649
readOnly: true
1265012650
type: object
1265112651
MetricAssetAttributes:
12652-
description: Assets where only included attribute is its title
12652+
description: Assets related to the object, including title and url.
1265312653
properties:
1265412654
title:
1265512655
description: Title of the asset.
1265612656
type: string
12657+
url:
12658+
description: URL path of the asset.
12659+
type: string
1265712660
type: object
1265812661
MetricAssetDashboardRelationship:
1265912662
description: An object of type `dashboard` that can be referenced in the `included`
@@ -13033,7 +13036,8 @@ components:
1303313036
- type
1303413037
type: object
1303513038
MetricDashboardAttributes:
13036-
description: Attributes related to the dashboard, including title and popularity.
13039+
description: Attributes related to the dashboard, including title, popularity,
13040+
and url.
1303713041
properties:
1303813042
popularity:
1303913043
description: Value from 0 to 5 that ranks popularity of the dashboard.
@@ -13044,6 +13048,9 @@ components:
1304413048
title:
1304513049
description: Title of the asset.
1304613050
type: string
13051+
url:
13052+
description: URL path of the asset.
13053+
type: string
1304713054
type: object
1304813055
MetricDashboardID:
1304913056
description: The related dashboard's ID.

src/datadogV2/model/model_metric_asset_attributes.rs

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

9-
/// Assets where only included attribute is its title
9+
/// Assets related to the object, including title and url.
1010
#[non_exhaustive]
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct MetricAssetAttributes {
1414
/// Title of the asset.
1515
#[serde(rename = "title")]
1616
pub title: Option<String>,
17+
/// URL path of the asset.
18+
#[serde(rename = "url")]
19+
pub url: Option<String>,
1720
#[serde(flatten)]
1821
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
1922
#[serde(skip)]
@@ -25,6 +28,7 @@ impl MetricAssetAttributes {
2528
pub fn new() -> MetricAssetAttributes {
2629
MetricAssetAttributes {
2730
title: None,
31+
url: None,
2832
additional_properties: std::collections::BTreeMap::new(),
2933
_unparsed: false,
3034
}
@@ -35,6 +39,11 @@ impl MetricAssetAttributes {
3539
self
3640
}
3741

42+
pub fn url(mut self, value: String) -> Self {
43+
self.url = Some(value);
44+
self
45+
}
46+
3847
pub fn additional_properties(
3948
mut self,
4049
value: std::collections::BTreeMap<String, serde_json::Value>,
@@ -68,6 +77,7 @@ impl<'de> Deserialize<'de> for MetricAssetAttributes {
6877
M: MapAccess<'a>,
6978
{
7079
let mut title: Option<String> = None;
80+
let mut url: Option<String> = None;
7181
let mut additional_properties: std::collections::BTreeMap<
7282
String,
7383
serde_json::Value,
@@ -82,6 +92,12 @@ impl<'de> Deserialize<'de> for MetricAssetAttributes {
8292
}
8393
title = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
8494
}
95+
"url" => {
96+
if v.is_null() {
97+
continue;
98+
}
99+
url = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
100+
}
85101
&_ => {
86102
if let Ok(value) = serde_json::from_value(v.clone()) {
87103
additional_properties.insert(k, value);
@@ -92,6 +108,7 @@ impl<'de> Deserialize<'de> for MetricAssetAttributes {
92108

93109
let content = MetricAssetAttributes {
94110
title,
111+
url,
95112
additional_properties,
96113
_unparsed,
97114
};

src/datadogV2/model/model_metric_dashboard_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 MetricDashboardAsset {
14-
/// Attributes related to the dashboard, including title and popularity.
14+
/// Attributes related to the dashboard, including title, popularity, and url.
1515
#[serde(rename = "attributes")]
1616
pub attributes: Option<crate::datadogV2::model::MetricDashboardAttributes>,
1717
/// The related dashboard's ID.

src/datadogV2/model/model_metric_dashboard_attributes.rs

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

9-
/// Attributes related to the dashboard, including title and popularity.
9+
/// Attributes related to the dashboard, including title, popularity, and url.
1010
#[non_exhaustive]
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
@@ -17,6 +17,9 @@ pub struct MetricDashboardAttributes {
1717
/// Title of the asset.
1818
#[serde(rename = "title")]
1919
pub title: Option<String>,
20+
/// URL path of the asset.
21+
#[serde(rename = "url")]
22+
pub url: Option<String>,
2023
#[serde(flatten)]
2124
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
2225
#[serde(skip)]
@@ -29,6 +32,7 @@ impl MetricDashboardAttributes {
2932
MetricDashboardAttributes {
3033
popularity: None,
3134
title: None,
35+
url: None,
3236
additional_properties: std::collections::BTreeMap::new(),
3337
_unparsed: false,
3438
}
@@ -44,6 +48,11 @@ impl MetricDashboardAttributes {
4448
self
4549
}
4650

51+
pub fn url(mut self, value: String) -> Self {
52+
self.url = Some(value);
53+
self
54+
}
55+
4756
pub fn additional_properties(
4857
mut self,
4958
value: std::collections::BTreeMap<String, serde_json::Value>,
@@ -78,6 +87,7 @@ impl<'de> Deserialize<'de> for MetricDashboardAttributes {
7887
{
7988
let mut popularity: Option<f64> = None;
8089
let mut title: Option<String> = None;
90+
let mut url: Option<String> = None;
8191
let mut additional_properties: std::collections::BTreeMap<
8292
String,
8393
serde_json::Value,
@@ -98,6 +108,12 @@ impl<'de> Deserialize<'de> for MetricDashboardAttributes {
98108
}
99109
title = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
100110
}
111+
"url" => {
112+
if v.is_null() {
113+
continue;
114+
}
115+
url = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
116+
}
101117
&_ => {
102118
if let Ok(value) = serde_json::from_value(v.clone()) {
103119
additional_properties.insert(k, value);
@@ -109,6 +125,7 @@ impl<'de> Deserialize<'de> for MetricDashboardAttributes {
109125
let content = MetricDashboardAttributes {
110126
popularity,
111127
title,
128+
url,
112129
additional_properties,
113130
_unparsed,
114131
};

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 where only included attribute is its title
14+
/// Assets related to the object, including title and url.
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 where only included attribute is its title
14+
/// Assets related to the object, including title and url.
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 where only included attribute is its title
14+
/// Assets related to the object, including title and url.
1515
#[serde(rename = "attributes")]
1616
pub attributes: Option<crate::datadogV2::model::MetricAssetAttributes>,
1717
/// The SLO ID.

0 commit comments

Comments
 (0)