diff --git a/.apigentools-info b/.apigentools-info index 02650c4c8..d9211148e 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-16 13:56:31.640964", - "spec_repo_commit": "dac51bc6" + "regenerated": "2025-05-19 15:26:07.929930", + "spec_repo_commit": "f89617c7" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-16 13:56:31.658086", - "spec_repo_commit": "dac51bc6" + "regenerated": "2025-05-19 15:26:07.945723", + "spec_repo_commit": "f89617c7" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index bfe39072e..3f645f25c 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -6729,6 +6729,11 @@ components: Monitor: description: Object describing a monitor. properties: + classification: + description: The classification of the monitor. + example: log + readOnly: true + type: string created: description: Timestamp of the monitor creation. format: date-time diff --git a/src/datadogV1/model/model_monitor.rs b/src/datadogV1/model/model_monitor.rs index 89231f6a1..47818927d 100644 --- a/src/datadogV1/model/model_monitor.rs +++ b/src/datadogV1/model/model_monitor.rs @@ -11,6 +11,9 @@ use std::fmt::{self, Formatter}; #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct Monitor { + /// The classification of the monitor. + #[serde(rename = "classification")] + pub classification: Option, /// Timestamp of the monitor creation. #[serde(rename = "created")] pub created: Option>, @@ -84,6 +87,7 @@ pub struct Monitor { impl Monitor { pub fn new(query: String, type_: crate::datadogV1::model::MonitorType) -> Monitor { Monitor { + classification: None, created: None, creator: None, deleted: None, @@ -106,6 +110,11 @@ impl Monitor { } } + pub fn classification(mut self, value: String) -> Self { + self.classification = Some(value); + self + } + pub fn created(mut self, value: chrono::DateTime) -> Self { self.created = Some(value); self @@ -210,6 +219,7 @@ impl<'de> Deserialize<'de> for Monitor { where M: MapAccess<'a>, { + let mut classification: Option = None; let mut created: Option> = None; let mut creator: Option = None; let mut deleted: Option>> = None; @@ -236,6 +246,13 @@ impl<'de> Deserialize<'de> for Monitor { while let Some((k, v)) = map.next_entry::()? { match k.as_str() { + "classification" => { + if v.is_null() { + continue; + } + classification = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } "created" => { if v.is_null() { continue; @@ -355,6 +372,7 @@ impl<'de> Deserialize<'de> for Monitor { let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?; let content = Monitor { + classification, created, creator, deleted,