Skip to main content

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

1/// Groups points by a tag selection and a timestamp policy and applies the operator.
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 GroupByAggregationBuilder {
14    #[builder(custom(type = super::Series, convert = Box::new))]
15    #[serde(rename = "input")]
16    input: Box<super::Series>,
17    #[builder(custom(type = super::GroupByTags, convert = Box::new))]
18    #[serde(rename = "tags")]
19    tags: Box<super::GroupByTags>,
20    #[builder(custom(type = super::GroupByTimestamp, convert = Box::new))]
21    #[serde(rename = "timestamp")]
22    timestamp: Box<super::GroupByTimestamp>,
23}
24impl GroupByAggregationBuilder {
25    /// Constructs a new instance of the type.
26    #[inline]
27    pub fn new(
28        input: super::Series,
29        tags: super::GroupByTags,
30        timestamp: super::GroupByTimestamp,
31    ) -> Self {
32        Self::builder().input(input).tags(tags).timestamp(timestamp).build()
33    }
34    #[inline]
35    pub fn input(&self) -> &super::Series {
36        &*self.input
37    }
38    #[inline]
39    pub fn tags(&self) -> &super::GroupByTags {
40        &*self.tags
41    }
42    #[inline]
43    pub fn timestamp(&self) -> &super::GroupByTimestamp {
44        &*self.timestamp
45    }
46}