/// A user-defined numeric aggregation. The aggregation builder controls grouping/windowing.
/// Supported Rust entrypoints accept grouped value vectors, optionally with leading sample timestamps,
/// and return either one numeric value or timestamped numeric point(s), e.g.
/// `fn rms(values: Vec<f64>) -> f64`,
/// `fn energy(timestamp_ns: Vec<i64>, values: Vec<f64>) -> f64`,
/// `fn first(timestamp_ns: Vec<i64>, values: Vec<f64>) -> (i64, f64)`, or
/// `fn passthrough(timestamp_ns: Vec<i64>, values: Vec<f64>) -> Vec<(i64, f64)>`.
#[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 NumericAggregationUdf {
    #[builder(custom(type = super::UdfSource, convert = Box::new))]
    #[serde(rename = "source")]
    source: Box<super::UdfSource>,
}
impl NumericAggregationUdf {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(source: super::UdfSource) -> Self {
        Self::builder().source(source).build()
    }
    #[inline]
    pub fn source(&self) -> &super::UdfSource {
        &*self.source
    }
}
