Skip to main content

nominal_api/conjure/objects/scout/compute/api/
aggregate_enum_series.rs

1/// Aggregates values with duplicate timestamps in the input series values into a single value using the specified aggregation function.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct AggregateEnumSeries {
14    #[builder(custom(type = super::EnumSeries, convert = Box::new))]
15    #[serde(rename = "input")]
16    input: Box<super::EnumSeries>,
17    #[serde(rename = "function")]
18    function: super::EnumAggregationFunction,
19}
20impl AggregateEnumSeries {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(
24        input: super::EnumSeries,
25        function: super::EnumAggregationFunction,
26    ) -> Self {
27        Self::builder().input(input).function(function).build()
28    }
29    #[inline]
30    pub fn input(&self) -> &super::EnumSeries {
31        &*self.input
32    }
33    #[inline]
34    pub fn function(&self) -> &super::EnumAggregationFunction {
35        &self.function
36    }
37}