nominal_api/conjure/objects/scout/compute/api/
min_max_threshold_ranges.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 MinMaxThresholdRanges {
14 #[builder(custom(type = super::NumericSeries, convert = Box::new))]
15 #[serde(rename = "input")]
16 input: Box<super::NumericSeries>,
17 #[builder(custom(type = super::DoubleConstant, convert = Box::new))]
18 #[serde(rename = "lowerBound")]
19 lower_bound: Box<super::DoubleConstant>,
20 #[builder(custom(type = super::DoubleConstant, convert = Box::new))]
21 #[serde(rename = "upperBound")]
22 upper_bound: Box<super::DoubleConstant>,
23 #[serde(rename = "operator")]
24 operator: super::MinMaxThresholdOperator,
25 #[builder(
26 default,
27 custom(
28 type = impl
29 Into<Option<super::PersistenceWindowConfiguration>>,
30 convert = |v|v.into().map(Box::new)
31 )
32 )]
33 #[serde(
34 rename = "persistenceWindowConfiguration",
35 skip_serializing_if = "Option::is_none",
36 default
37 )]
38 persistence_window_configuration: Option<Box<super::PersistenceWindowConfiguration>>,
39}
40impl MinMaxThresholdRanges {
41 #[inline]
42 pub fn input(&self) -> &super::NumericSeries {
43 &*self.input
44 }
45 #[inline]
46 pub fn lower_bound(&self) -> &super::DoubleConstant {
47 &*self.lower_bound
48 }
49 #[inline]
50 pub fn upper_bound(&self) -> &super::DoubleConstant {
51 &*self.upper_bound
52 }
53 #[inline]
54 pub fn operator(&self) -> &super::MinMaxThresholdOperator {
55 &self.operator
56 }
57 #[inline]
58 pub fn persistence_window_configuration(
59 &self,
60 ) -> Option<&super::PersistenceWindowConfiguration> {
61 self.persistence_window_configuration.as_ref().map(|o| &**o)
62 }
63}