aws-sdk-customerprofiles 1.119.0

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

/// <p>The conditions including range, object count, and threshold for the calculated attribute.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Conditions {
    /// <p>The relative time period over which data is included in the aggregation.</p>
    pub range: ::std::option::Option<crate::types::Range>,
    /// <p>The number of profile objects used for the calculated attribute.</p>
    pub object_count: ::std::option::Option<i32>,
    /// <p>The threshold for the calculated attribute.</p>
    pub threshold: ::std::option::Option<crate::types::Threshold>,
}
impl Conditions {
    /// <p>The relative time period over which data is included in the aggregation.</p>
    pub fn range(&self) -> ::std::option::Option<&crate::types::Range> {
        self.range.as_ref()
    }
    /// <p>The number of profile objects used for the calculated attribute.</p>
    pub fn object_count(&self) -> ::std::option::Option<i32> {
        self.object_count
    }
    /// <p>The threshold for the calculated attribute.</p>
    pub fn threshold(&self) -> ::std::option::Option<&crate::types::Threshold> {
        self.threshold.as_ref()
    }
}
impl ::std::fmt::Debug for Conditions {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Conditions");
        formatter.field("range", &"*** Sensitive Data Redacted ***");
        formatter.field("object_count", &"*** Sensitive Data Redacted ***");
        formatter.field("threshold", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Conditions {
    /// Creates a new builder-style object to manufacture [`Conditions`](crate::types::Conditions).
    pub fn builder() -> crate::types::builders::ConditionsBuilder {
        crate::types::builders::ConditionsBuilder::default()
    }
}

/// A builder for [`Conditions`](crate::types::Conditions).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ConditionsBuilder {
    pub(crate) range: ::std::option::Option<crate::types::Range>,
    pub(crate) object_count: ::std::option::Option<i32>,
    pub(crate) threshold: ::std::option::Option<crate::types::Threshold>,
}
impl ConditionsBuilder {
    /// <p>The relative time period over which data is included in the aggregation.</p>
    pub fn range(mut self, input: crate::types::Range) -> Self {
        self.range = ::std::option::Option::Some(input);
        self
    }
    /// <p>The relative time period over which data is included in the aggregation.</p>
    pub fn set_range(mut self, input: ::std::option::Option<crate::types::Range>) -> Self {
        self.range = input;
        self
    }
    /// <p>The relative time period over which data is included in the aggregation.</p>
    pub fn get_range(&self) -> &::std::option::Option<crate::types::Range> {
        &self.range
    }
    /// <p>The number of profile objects used for the calculated attribute.</p>
    pub fn object_count(mut self, input: i32) -> Self {
        self.object_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of profile objects used for the calculated attribute.</p>
    pub fn set_object_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.object_count = input;
        self
    }
    /// <p>The number of profile objects used for the calculated attribute.</p>
    pub fn get_object_count(&self) -> &::std::option::Option<i32> {
        &self.object_count
    }
    /// <p>The threshold for the calculated attribute.</p>
    pub fn threshold(mut self, input: crate::types::Threshold) -> Self {
        self.threshold = ::std::option::Option::Some(input);
        self
    }
    /// <p>The threshold for the calculated attribute.</p>
    pub fn set_threshold(mut self, input: ::std::option::Option<crate::types::Threshold>) -> Self {
        self.threshold = input;
        self
    }
    /// <p>The threshold for the calculated attribute.</p>
    pub fn get_threshold(&self) -> &::std::option::Option<crate::types::Threshold> {
        &self.threshold
    }
    /// Consumes the builder and constructs a [`Conditions`](crate::types::Conditions).
    pub fn build(self) -> crate::types::Conditions {
        crate::types::Conditions {
            range: self.range,
            object_count: self.object_count,
            threshold: self.threshold,
        }
    }
}
impl ::std::fmt::Debug for ConditionsBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ConditionsBuilder");
        formatter.field("range", &"*** Sensitive Data Redacted ***");
        formatter.field("object_count", &"*** Sensitive Data Redacted ***");
        formatter.field("threshold", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}