#[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 StabilityDetectionRangesV2 {
#[builder(custom(type = super::NumericSeries, convert = Box::new))]
#[serde(rename = "input")]
input: Box<super::NumericSeries>,
#[builder(custom(type = super::Duration, convert = Box::new))]
#[serde(rename = "window")]
window: Box<super::Duration>,
#[builder(
default,
custom(
type = impl
Into<Option<super::IntegerConstant>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "minPoints", skip_serializing_if = "Option::is_none", default)]
min_points: Option<Box<super::IntegerConstant>>,
#[builder(custom(type = super::Threshold, convert = Box::new))]
#[serde(rename = "threshold")]
threshold: Box<super::Threshold>,
}
impl StabilityDetectionRangesV2 {
#[inline]
pub fn new(
input: super::NumericSeries,
window: super::Duration,
threshold: super::Threshold,
) -> Self {
Self::builder().input(input).window(window).threshold(threshold).build()
}
#[inline]
pub fn input(&self) -> &super::NumericSeries {
&*self.input
}
#[inline]
pub fn window(&self) -> &super::Duration {
&*self.window
}
#[inline]
pub fn min_points(&self) -> Option<&super::IntegerConstant> {
self.min_points.as_ref().map(|o| &**o)
}
#[inline]
pub fn threshold(&self) -> &super::Threshold {
&*self.threshold
}
}