#[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, into)]
    #[serde(rename = "minPoints", skip_serializing_if = "Option::is_none", default)]
    min_points: Option<i32>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::super::run::api::Duration>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "minDuration", skip_serializing_if = "Option::is_none", default)]
    min_duration: Option<Box<super::super::super::super::run::api::Duration>>,
    #[builder(custom(type = super::super::OutputRangeStart, convert = Box::new))]
    #[serde(rename = "outputRangeStart")]
    output_range_start: Box<super::super::OutputRangeStart>,
}
impl PersistenceWindowConfiguration {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(output_range_start: super::super::OutputRangeStart) -> Self {
        Self::builder().output_range_start(output_range_start).build()
    }
    #[inline]
    pub fn min_points(&self) -> Option<i32> {
        self.min_points.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn min_duration(
        &self,
    ) -> Option<&super::super::super::super::run::api::Duration> {
        self.min_duration.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn output_range_start(&self) -> &super::super::OutputRangeStart {
        &*self.output_range_start
    }
}
