/// Aggregates an input series using the given operator. The shape of the aggregation (rolling time window,
/// rolling point-count window, or group by) is selected via the `AggregationBuilder` union.
/// The operator needs to be compatible with the input series, producing a numeric output (e.g., count works for
/// any type of input series whereas SUM only works for numeric series).
#[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 NumericAggregation {
    #[builder(custom(type = super::AggregationBuilder, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::AggregationBuilder>,
    #[builder(custom(type = super::NumericAggregationOperator, convert = Box::new))]
    #[serde(rename = "operator")]
    operator: Box<super::NumericAggregationOperator>,
}
impl NumericAggregation {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        input: super::AggregationBuilder,
        operator: super::NumericAggregationOperator,
    ) -> Self {
        Self::builder().input(input).operator(operator).build()
    }
    #[inline]
    pub fn input(&self) -> &super::AggregationBuilder {
        &*self.input
    }
    #[inline]
    pub fn operator(&self) -> &super::NumericAggregationOperator {
        &*self.operator
    }
}
