Skip to main content

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

1/// Rolling point-count aggregation: for each point in the input, aggregate the current point and the preceding
2/// N - 1 points within the same tag grouping.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    conjure_object::private::DeriveWith
9)]
10#[serde(crate = "conjure_object::serde")]
11#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[conjure_object::private::staged_builder::staged_builder]
13#[builder(crate = conjure_object::private::staged_builder, update, inline)]
14pub struct RollingPointsAggregationBuilder {
15    #[builder(custom(type = super::Series, convert = Box::new))]
16    #[serde(rename = "input")]
17    input: Box<super::Series>,
18    #[builder(custom(type = super::IntegerConstant, convert = Box::new))]
19    #[serde(rename = "points")]
20    points: Box<super::IntegerConstant>,
21}
22impl RollingPointsAggregationBuilder {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(input: super::Series, points: super::IntegerConstant) -> Self {
26        Self::builder().input(input).points(points).build()
27    }
28    #[inline]
29    pub fn input(&self) -> &super::Series {
30        &*self.input
31    }
32    #[inline]
33    pub fn points(&self) -> &super::IntegerConstant {
34        &*self.points
35    }
36}