Skip to content
Merged
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
12 changes: 12 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28204,6 +28204,10 @@ components:
description: The date/time when the rotation starts (ISO 8601).
format: date-time
type: string
time_zone:
description: The time zone for this layer.
example: America/New_York
type: string
type: object
LayerAttributesInterval:
description: Defines how often the rotation repeats, using a combination of
Expand Down Expand Up @@ -44308,6 +44312,10 @@ components:
example: '2025-01-01T00:00:00Z'
format: date-time
type: string
time_zone:
description: The time zone for this layer.
example: America/New_York
type: string
required:
- name
- interval
Expand Down Expand Up @@ -44658,6 +44666,10 @@ components:
example: '2025-02-01T00:00:00Z'
format: date-time
type: string
time_zone:
description: The time zone for this layer.
example: America/New_York
type: string
required:
- effective_date
- interval
Expand Down
17 changes: 17 additions & 0 deletions src/datadogV2/model/model_layer_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ pub struct LayerAttributes {
/// The date/time when the rotation starts (ISO 8601).
#[serde(rename = "rotation_start")]
pub rotation_start: Option<chrono::DateTime<chrono::Utc>>,
/// The time zone for this layer.
#[serde(rename = "time_zone")]
pub time_zone: Option<String>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
Expand All @@ -45,6 +48,7 @@ impl LayerAttributes {
name: None,
restrictions: None,
rotation_start: None,
time_zone: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
Expand Down Expand Up @@ -80,6 +84,11 @@ impl LayerAttributes {
self
}

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

pub fn additional_properties(
mut self,
value: std::collections::BTreeMap<String, serde_json::Value>,
Expand Down Expand Up @@ -118,6 +127,7 @@ impl<'de> Deserialize<'de> for LayerAttributes {
let mut name: Option<String> = None;
let mut restrictions: Option<Vec<crate::datadogV2::model::TimeRestriction>> = None;
let mut rotation_start: Option<chrono::DateTime<chrono::Utc>> = None;
let mut time_zone: Option<String> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
Expand Down Expand Up @@ -165,6 +175,12 @@ impl<'de> Deserialize<'de> for LayerAttributes {
rotation_start =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"time_zone" => {
if v.is_null() {
continue;
}
time_zone = 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 @@ -180,6 +196,7 @@ impl<'de> Deserialize<'de> for LayerAttributes {
name,
restrictions,
rotation_start,
time_zone,
additional_properties,
_unparsed,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub struct ScheduleCreateRequestDataAttributesLayersItems {
/// The date/time when the rotation for this layer starts (in ISO 8601).
#[serde(rename = "rotation_start")]
pub rotation_start: chrono::DateTime<chrono::Utc>,
/// The time zone for this layer.
#[serde(rename = "time_zone")]
pub time_zone: Option<String>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
Expand All @@ -55,6 +58,7 @@ impl ScheduleCreateRequestDataAttributesLayersItems {
name,
restrictions: None,
rotation_start,
time_zone: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
Expand All @@ -70,6 +74,11 @@ impl ScheduleCreateRequestDataAttributesLayersItems {
self
}

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

pub fn additional_properties(
mut self,
value: std::collections::BTreeMap<String, serde_json::Value>,
Expand Down Expand Up @@ -103,6 +112,7 @@ impl<'de> Deserialize<'de> for ScheduleCreateRequestDataAttributesLayersItems {
let mut name: Option<String> = None;
let mut restrictions: Option<Vec<crate::datadogV2::model::TimeRestriction>> = None;
let mut rotation_start: Option<chrono::DateTime<chrono::Utc>> = None;
let mut time_zone: Option<String> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
Expand Down Expand Up @@ -141,6 +151,12 @@ impl<'de> Deserialize<'de> for ScheduleCreateRequestDataAttributesLayersItems {
rotation_start =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"time_zone" => {
if v.is_null() {
continue;
}
time_zone = 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 @@ -164,6 +180,7 @@ impl<'de> Deserialize<'de> for ScheduleCreateRequestDataAttributesLayersItems {
name,
restrictions,
rotation_start,
time_zone,
additional_properties,
_unparsed,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ pub struct ScheduleUpdateRequestDataAttributesLayersItems {
/// The date/time at which the rotation begins (ISO 8601 format).
#[serde(rename = "rotation_start")]
pub rotation_start: chrono::DateTime<chrono::Utc>,
/// The time zone for this layer.
#[serde(rename = "time_zone")]
pub time_zone: Option<String>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
Expand All @@ -60,6 +63,7 @@ impl ScheduleUpdateRequestDataAttributesLayersItems {
name,
restrictions: None,
rotation_start,
time_zone: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
Expand All @@ -80,6 +84,11 @@ impl ScheduleUpdateRequestDataAttributesLayersItems {
self
}

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

pub fn additional_properties(
mut self,
value: std::collections::BTreeMap<String, serde_json::Value>,
Expand Down Expand Up @@ -114,6 +123,7 @@ impl<'de> Deserialize<'de> for ScheduleUpdateRequestDataAttributesLayersItems {
let mut name: Option<String> = None;
let mut restrictions: Option<Vec<crate::datadogV2::model::TimeRestriction>> = None;
let mut rotation_start: Option<chrono::DateTime<chrono::Utc>> = None;
let mut time_zone: Option<String> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
Expand Down Expand Up @@ -158,6 +168,12 @@ impl<'de> Deserialize<'de> for ScheduleUpdateRequestDataAttributesLayersItems {
rotation_start =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"time_zone" => {
if v.is_null() {
continue;
}
time_zone = 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 @@ -182,6 +198,7 @@ impl<'de> Deserialize<'de> for ScheduleUpdateRequestDataAttributesLayersItems {
name,
restrictions,
rotation_start,
time_zone,
additional_properties,
_unparsed,
};
Expand Down