nominal_api/conjure/objects/scout/compute/api/
rolling_operation_series.rs1#[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 RollingOperationSeries {
14 #[builder(custom(type = super::NumericSeries, convert = Box::new))]
15 #[serde(rename = "input")]
16 input: Box<super::NumericSeries>,
17 #[builder(custom(type = super::Window, convert = Box::new))]
18 #[serde(rename = "window")]
19 window: Box<super::Window>,
20 #[builder(custom(type = super::NumericAggregationOperator, convert = Box::new))]
21 #[serde(rename = "operator")]
22 operator: Box<super::NumericAggregationOperator>,
23}
24impl RollingOperationSeries {
25 #[inline]
27 pub fn new(
28 input: super::NumericSeries,
29 window: super::Window,
30 operator: super::NumericAggregationOperator,
31 ) -> Self {
32 Self::builder().input(input).window(window).operator(operator).build()
33 }
34 #[inline]
35 pub fn input(&self) -> &super::NumericSeries {
36 &*self.input
37 }
38 #[inline]
39 pub fn window(&self) -> &super::Window {
40 &*self.window
41 }
42 #[inline]
43 pub fn operator(&self) -> &super::NumericAggregationOperator {
44 &*self.operator
45 }
46}