diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9b5a962d1..4c530e268 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -33763,6 +33763,10 @@ components: DetachCaseRequestData: description: Data for detaching security findings from their case. properties: + id: + description: Unique identifier of the case. + example: "c1234567-89ab-cdef-0123-456789abcdef" + type: string relationships: $ref: "#/components/schemas/DetachCaseRequestDataRelationships" type: diff --git a/src/datadogV2/model/model_detach_case_request_data.rs b/src/datadogV2/model/model_detach_case_request_data.rs index d01098cb1..95ffcc032 100644 --- a/src/datadogV2/model/model_detach_case_request_data.rs +++ b/src/datadogV2/model/model_detach_case_request_data.rs @@ -11,6 +11,9 @@ use std::fmt::{self, Formatter}; #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct DetachCaseRequestData { + /// Unique identifier of the case. + #[serde(rename = "id")] + pub id: Option, /// Relationships detaching security findings from their case. #[serde(rename = "relationships")] pub relationships: Option, @@ -27,6 +30,7 @@ pub struct DetachCaseRequestData { impl DetachCaseRequestData { pub fn new(type_: crate::datadogV2::model::CaseDataType) -> DetachCaseRequestData { DetachCaseRequestData { + id: None, relationships: None, type_, additional_properties: std::collections::BTreeMap::new(), @@ -34,6 +38,11 @@ impl DetachCaseRequestData { } } + pub fn id(mut self, value: String) -> Self { + self.id = Some(value); + self + } + pub fn relationships( mut self, value: crate::datadogV2::model::DetachCaseRequestDataRelationships, @@ -68,6 +77,7 @@ impl<'de> Deserialize<'de> for DetachCaseRequestData { where M: MapAccess<'a>, { + let mut id: Option = None; let mut relationships: Option< crate::datadogV2::model::DetachCaseRequestDataRelationships, > = None; @@ -80,6 +90,12 @@ impl<'de> Deserialize<'de> for DetachCaseRequestData { while let Some((k, v)) = map.next_entry::()? { match k.as_str() { + "id" => { + if v.is_null() { + continue; + } + id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } "relationships" => { if v.is_null() { continue; @@ -110,6 +126,7 @@ impl<'de> Deserialize<'de> for DetachCaseRequestData { let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?; let content = DetachCaseRequestData { + id, relationships, type_, additional_properties,