aws-sdk-connect 1.159.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains information about the threshold for service level metrics.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Threshold {
    /// <p>The type of comparison. Only "less than" (LT) comparisons are supported.</p>
    pub comparison: ::std::option::Option<crate::types::Comparison>,
    /// <p>The threshold value to compare.</p>
    pub threshold_value: ::std::option::Option<f64>,
}
impl Threshold {
    /// <p>The type of comparison. Only "less than" (LT) comparisons are supported.</p>
    pub fn comparison(&self) -> ::std::option::Option<&crate::types::Comparison> {
        self.comparison.as_ref()
    }
    /// <p>The threshold value to compare.</p>
    pub fn threshold_value(&self) -> ::std::option::Option<f64> {
        self.threshold_value
    }
}
impl Threshold {
    /// Creates a new builder-style object to manufacture [`Threshold`](crate::types::Threshold).
    pub fn builder() -> crate::types::builders::ThresholdBuilder {
        crate::types::builders::ThresholdBuilder::default()
    }
}

/// A builder for [`Threshold`](crate::types::Threshold).
#[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 {
    /// <p>The type of comparison. Only "less than" (LT) comparisons are supported.</p>
    pub fn comparison(mut self, input: crate::types::Comparison) -> Self {
        self.comparison = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of comparison. Only "less than" (LT) comparisons are supported.</p>
    pub fn set_comparison(mut self, input: ::std::option::Option<crate::types::Comparison>) -> Self {
        self.comparison = input;
        self
    }
    /// <p>The type of comparison. Only "less than" (LT) comparisons are supported.</p>
    pub fn get_comparison(&self) -> &::std::option::Option<crate::types::Comparison> {
        &self.comparison
    }
    /// <p>The threshold value to compare.</p>
    pub fn threshold_value(mut self, input: f64) -> Self {
        self.threshold_value = ::std::option::Option::Some(input);
        self
    }
    /// <p>The threshold value to compare.</p>
    pub fn set_threshold_value(mut self, input: ::std::option::Option<f64>) -> Self {
        self.threshold_value = input;
        self
    }
    /// <p>The threshold value to compare.</p>
    pub fn get_threshold_value(&self) -> &::std::option::Option<f64> {
        &self.threshold_value
    }
    /// Consumes the builder and constructs a [`Threshold`](crate::types::Threshold).
    pub fn build(self) -> crate::types::Threshold {
        crate::types::Threshold {
            comparison: self.comparison,
            threshold_value: self.threshold_value,
        }
    }
}