#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct PersistenceWindowConfiguration {
#[builder(
default,
custom(
type = impl
Into<Option<super::IntegerConstant>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "minPoints", skip_serializing_if = "Option::is_none", default)]
min_points: Option<Box<super::IntegerConstant>>,
#[builder(
default,
custom(
type = impl
Into<Option<super::DurationConstant>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "minDuration", skip_serializing_if = "Option::is_none", default)]
min_duration: Option<Box<super::DurationConstant>>,
#[builder(custom(type = super::OutputRangeStart, convert = Box::new))]
#[serde(rename = "outputRangeStart")]
output_range_start: Box<super::OutputRangeStart>,
}
impl PersistenceWindowConfiguration {
#[inline]
pub fn new(output_range_start: super::OutputRangeStart) -> Self {
Self::builder().output_range_start(output_range_start).build()
}
#[inline]
pub fn min_points(&self) -> Option<&super::IntegerConstant> {
self.min_points.as_ref().map(|o| &**o)
}
#[inline]
pub fn min_duration(&self) -> Option<&super::DurationConstant> {
self.min_duration.as_ref().map(|o| &**o)
}
#[inline]
pub fn output_range_start(&self) -> &super::OutputRangeStart {
&*self.output_range_start
}
}