/// Aggregates an input series using an enum aggregation operator. Rolling aggregation builders are not
/// supported; only `AggregationBuilder.groupBy` is accepted at resolution time.
#[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 EnumAggregation {
    #[builder(custom(type = super::AggregationBuilder, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::AggregationBuilder>,
    #[builder(custom(type = super::EnumAggregationOperator, convert = Box::new))]
    #[serde(rename = "operator")]
    operator: Box<super::EnumAggregationOperator>,
}
impl EnumAggregation {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        input: super::AggregationBuilder,
        operator: super::EnumAggregationOperator,
    ) -> Self {
        Self::builder().input(input).operator(operator).build()
    }
    #[inline]
    pub fn input(&self) -> &super::AggregationBuilder {
        &*self.input
    }
    #[inline]
    pub fn operator(&self) -> &super::EnumAggregationOperator {
        &*self.operator
    }
}
