nominal_api/conjure/objects/scout/compute/api/
aggregate_under_ranges_series.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 AggregateUnderRangesSeries {
17 #[builder(custom(type = super::NumericSeries, convert = Box::new))]
18 #[serde(rename = "input")]
19 input: Box<super::NumericSeries>,
20 #[builder(custom(type = super::RangeSeries, convert = Box::new))]
21 #[serde(rename = "ranges")]
22 ranges: Box<super::RangeSeries>,
23 #[serde(rename = "operation")]
24 operation: super::NumericAggregationFunction,
25}
26impl AggregateUnderRangesSeries {
27 #[inline]
29 pub fn new(
30 input: super::NumericSeries,
31 ranges: super::RangeSeries,
32 operation: super::NumericAggregationFunction,
33 ) -> Self {
34 Self::builder().input(input).ranges(ranges).operation(operation).build()
35 }
36 #[inline]
37 pub fn input(&self) -> &super::NumericSeries {
38 &*self.input
39 }
40 #[inline]
41 pub fn ranges(&self) -> &super::RangeSeries {
42 &*self.ranges
43 }
44 #[deprecated(
45 note = "Use a dedicated group-by-and-aggregate node instead (coming in a follow-up PR). This field is retained\nas required for backwards compatibility with existing callers.\n"
46 )]
47 #[inline]
48 pub fn operation(&self) -> &super::NumericAggregationFunction {
49 &self.operation
50 }
51}