#[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 EnumFilterRangesNode {
    #[builder(custom(type = super::EnumSeriesNode, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::EnumSeriesNode>,
    #[serde(rename = "operator")]
    operator: super::super::super::api::EnumFilterOperator,
    #[builder(default, set(item(type = String, into)))]
    #[serde(
        rename = "values",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    values: std::collections::BTreeSet<String>,
    #[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>>,
}
impl EnumFilterRangesNode {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        input: super::EnumSeriesNode,
        operator: super::super::super::api::EnumFilterOperator,
    ) -> Self {
        Self::builder().input(input).operator(operator).build()
    }
    #[inline]
    pub fn input(&self) -> &super::EnumSeriesNode {
        &*self.input
    }
    #[inline]
    pub fn operator(&self) -> &super::super::super::api::EnumFilterOperator {
        &self.operator
    }
    #[inline]
    pub fn values(&self) -> &std::collections::BTreeSet<String> {
        &self.values
    }
    #[inline]
    pub fn persistence_window_configuration(
        &self,
    ) -> Option<&super::PersistenceWindowConfiguration> {
        self.persistence_window_configuration.as_ref().map(|o| &**o)
    }
}
