/// Produces a list of ranges for which provided series are all equal (or are not all equal).
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct SeriesEqualityRanges {
    #[builder(default, list(item(type = super::NumericSeries)))]
    #[serde(rename = "input", skip_serializing_if = "Vec::is_empty", default)]
    input: Vec<super::NumericSeries>,
    #[serde(rename = "equalityOperator")]
    equality_operator: super::EqualityOperator,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DoubleConstant>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "tolerance", skip_serializing_if = "Option::is_none", default)]
    tolerance: Option<Box<super::DoubleConstant>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::PersistenceWindowConfiguration>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "persistenceWindowConfiguration",
        skip_serializing_if = "Option::is_none",
        default
    )]
    persistence_window_configuration: Option<Box<super::PersistenceWindowConfiguration>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::InterpolationConfiguration>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "interpolationConfiguration",
        skip_serializing_if = "Option::is_none",
        default
    )]
    interpolation_configuration: Option<Box<super::InterpolationConfiguration>>,
}
impl SeriesEqualityRanges {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(equality_operator: super::EqualityOperator) -> Self {
        Self::builder().equality_operator(equality_operator).build()
    }
    #[inline]
    pub fn input(&self) -> &[super::NumericSeries] {
        &*self.input
    }
    #[inline]
    pub fn equality_operator(&self) -> &super::EqualityOperator {
        &self.equality_operator
    }
    #[inline]
    pub fn tolerance(&self) -> Option<&super::DoubleConstant> {
        self.tolerance.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn persistence_window_configuration(
        &self,
    ) -> Option<&super::PersistenceWindowConfiguration> {
        self.persistence_window_configuration.as_ref().map(|o| &**o)
    }
    /// Defaults to forward fill interpolation with a 1s interpolation radius
    #[deprecated(note = "Setting interpolation on this node is deprecated.\n")]
    #[inline]
    pub fn interpolation_configuration(
        &self,
    ) -> Option<&super::InterpolationConfiguration> {
        self.interpolation_configuration.as_ref().map(|o| &**o)
    }
}
