nominal-api-conjure 0.1443.0

Conjure HTTP API bindings for the Nominal platform
Documentation
/// Produces ranges for the selected extrema type.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[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 ExtremaRangesV2 {
    #[builder(custom(type = super::NumericSeries, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::NumericSeries>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DoubleConstant>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "minimumProminence",
        skip_serializing_if = "Option::is_none",
        default
    )]
    minimum_prominence: Option<Box<super::DoubleConstant>>,
    #[serde(rename = "selection")]
    selection: super::PeakType,
}
impl ExtremaRangesV2 {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::NumericSeries, selection: super::PeakType) -> Self {
        Self::builder().input(input).selection(selection).build()
    }
    #[inline]
    pub fn input(&self) -> &super::NumericSeries {
        &*self.input
    }
    /// The minimum topographic prominence for an extrema to be returned.
    #[inline]
    pub fn minimum_prominence(&self) -> Option<&super::DoubleConstant> {
        self.minimum_prominence.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn selection(&self) -> &super::PeakType {
        &self.selection
    }
}