nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// An aggregation value representing combined aggregation metrics for data over a range.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith,
    Copy
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct RangeAggregation {
    #[serde(rename = "average")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    average: f64,
    #[serde(rename = "min")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    min: f64,
    #[serde(rename = "max")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    max: f64,
    #[serde(rename = "standardDeviation")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    standard_deviation: f64,
    #[serde(rename = "count")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    count: f64,
    #[serde(rename = "sum")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    sum: f64,
    #[builder(default, into)]
    #[serde(rename = "rootMeanSquare", skip_serializing_if = "Option::is_none", default)]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    root_mean_square: Option<f64>,
}
impl RangeAggregation {
    #[inline]
    pub fn average(&self) -> f64 {
        self.average
    }
    #[inline]
    pub fn min(&self) -> f64 {
        self.min
    }
    #[inline]
    pub fn max(&self) -> f64 {
        self.max
    }
    #[inline]
    pub fn standard_deviation(&self) -> f64 {
        self.standard_deviation
    }
    #[inline]
    pub fn count(&self) -> f64 {
        self.count
    }
    #[inline]
    pub fn sum(&self) -> f64 {
        self.sum
    }
    #[inline]
    pub fn root_mean_square(&self) -> Option<f64> {
        self.root_mean_square.as_ref().map(|o| *o)
    }
}