Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30806,6 +30806,9 @@ components:
properties:
rateLimit:
$ref: '#/components/schemas/TriggerRateLimit'
version:
description: Version of the incident trigger.
type: string
type: object
IncidentTriggerWrapper:
description: Schema for an Incident-based trigger.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ mime,https://github.com/hyperium/mime,MIT OR Apache-2.0,Sean McArthur <sean@sean
mime_guess,https://github.com/abonander/mime_guess,MIT,Austin Bonander <austin.bonander@gmail.com>
miniz_oxide,https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide,MIT OR Zlib OR Apache-2.0,"Frommi <daniil.liferenko@gmail.com>, oyvindln <oyvindln@users.noreply.github.com>, Rich Geldreich richgel99@gmail.com"
mio,https://github.com/tokio-rs/mio,MIT,"Carl Lerche <me@carllerche.com>, Thomas de Zeeuw <thomasdezeeuw@gmail.com>, Tokio Contributors <team@tokio.rs>"
native-tls,https://github.com/sfackler/rust-native-tls,MIT OR Apache-2.0,Steven Fackler <sfackler@gmail.com>
native-tls,https://github.com/rust-native-tls/rust-native-tls,MIT OR Apache-2.0,Steven Fackler <sfackler@gmail.com>
num-conv,https://github.com/jhpratt/num-conv,MIT OR Apache-2.0,Jacob Pratt <jacob@jhpratt.dev>
num-traits,https://github.com/rust-num/num-traits,MIT OR Apache-2.0,The Rust Project Developers
once_cell,https://github.com/matklad/once_cell,MIT OR Apache-2.0,Aleksey Kladov <aleksey.kladov@gmail.com>
Expand Down
17 changes: 17 additions & 0 deletions src/datadogV2/model/model_incident_trigger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub struct IncidentTrigger {
/// Defines a rate limit for a trigger.
#[serde(rename = "rateLimit")]
pub rate_limit: Option<crate::datadogV2::model::TriggerRateLimit>,
/// Version of the incident trigger.
#[serde(rename = "version")]
pub version: Option<String>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
Expand All @@ -25,6 +28,7 @@ impl IncidentTrigger {
pub fn new() -> IncidentTrigger {
IncidentTrigger {
rate_limit: None,
version: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
Expand All @@ -35,6 +39,11 @@ impl IncidentTrigger {
self
}

pub fn version(mut self, value: String) -> Self {
self.version = Some(value);
self
}

pub fn additional_properties(
mut self,
value: std::collections::BTreeMap<String, serde_json::Value>,
Expand Down Expand Up @@ -68,6 +77,7 @@ impl<'de> Deserialize<'de> for IncidentTrigger {
M: MapAccess<'a>,
{
let mut rate_limit: Option<crate::datadogV2::model::TriggerRateLimit> = None;
let mut version: Option<String> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
Expand All @@ -82,6 +92,12 @@ impl<'de> Deserialize<'de> for IncidentTrigger {
}
rate_limit = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"version" => {
if v.is_null() {
continue;
}
version = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
&_ => {
if let Ok(value) = serde_json::from_value(v.clone()) {
additional_properties.insert(k, value);
Expand All @@ -92,6 +108,7 @@ impl<'de> Deserialize<'de> for IncidentTrigger {

let content = IncidentTrigger {
rate_limit,
version,
additional_properties,
_unparsed,
};
Expand Down