#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Threshold {
pub comparison: ::std::option::Option<crate::types::Comparison>,
pub threshold_value: ::std::option::Option<f64>,
}
impl Threshold {
pub fn comparison(&self) -> ::std::option::Option<&crate::types::Comparison> {
self.comparison.as_ref()
}
pub fn threshold_value(&self) -> ::std::option::Option<f64> {
self.threshold_value
}
}
impl Threshold {
pub fn builder() -> crate::types::builders::ThresholdBuilder {
crate::types::builders::ThresholdBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ThresholdBuilder {
pub(crate) comparison: ::std::option::Option<crate::types::Comparison>,
pub(crate) threshold_value: ::std::option::Option<f64>,
}
impl ThresholdBuilder {
pub fn comparison(mut self, input: crate::types::Comparison) -> Self {
self.comparison = ::std::option::Option::Some(input);
self
}
pub fn set_comparison(mut self, input: ::std::option::Option<crate::types::Comparison>) -> Self {
self.comparison = input;
self
}
pub fn get_comparison(&self) -> &::std::option::Option<crate::types::Comparison> {
&self.comparison
}
pub fn threshold_value(mut self, input: f64) -> Self {
self.threshold_value = ::std::option::Option::Some(input);
self
}
pub fn set_threshold_value(mut self, input: ::std::option::Option<f64>) -> Self {
self.threshold_value = input;
self
}
pub fn get_threshold_value(&self) -> &::std::option::Option<f64> {
&self.threshold_value
}
pub fn build(self) -> crate::types::Threshold {
crate::types::Threshold {
comparison: self.comparison,
threshold_value: self.threshold_value,
}
}
}