nominal_api/conjure/objects/scout/compute/api/
numeric_aggregation.rs1#[derive(
6 Debug,
7 Clone,
8 conjure_object::serde::Serialize,
9 conjure_object::serde::Deserialize,
10 conjure_object::private::DeriveWith
11)]
12#[serde(crate = "conjure_object::serde")]
13#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct NumericAggregation {
17 #[builder(custom(type = super::AggregationBuilder, convert = Box::new))]
18 #[serde(rename = "input")]
19 input: Box<super::AggregationBuilder>,
20 #[builder(custom(type = super::NumericAggregationOperator, convert = Box::new))]
21 #[serde(rename = "operator")]
22 operator: Box<super::NumericAggregationOperator>,
23}
24impl NumericAggregation {
25 #[inline]
27 pub fn new(
28 input: super::AggregationBuilder,
29 operator: super::NumericAggregationOperator,
30 ) -> Self {
31 Self::builder().input(input).operator(operator).build()
32 }
33 #[inline]
34 pub fn input(&self) -> &super::AggregationBuilder {
35 &*self.input
36 }
37 #[inline]
38 pub fn operator(&self) -> &super::NumericAggregationOperator {
39 &*self.operator
40 }
41}