Skip to main content

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

1/// Threshold defined as a real number corresponding the unit of a series.
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 AbsoluteThreshold {
14    #[builder(custom(type = super::DoubleConstant, convert = Box::new))]
15    #[serde(rename = "value")]
16    value: Box<super::DoubleConstant>,
17}
18impl AbsoluteThreshold {
19    /// Constructs a new instance of the type.
20    #[inline]
21    pub fn new(value: super::DoubleConstant) -> Self {
22        Self::builder().value(value).build()
23    }
24    #[inline]
25    pub fn value(&self) -> &super::DoubleConstant {
26        &*self.value
27    }
28}