aws-sdk-connect 1.168.0

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

/// <p>A leaf node condition which can be used to specify a ProficiencyName, ProficiencyValue and ProficiencyLimit.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Condition {
    /// <p>A leaf node condition which can be used to specify a string condition.</p><note>
    /// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
    /// </note>
    pub string_condition: ::std::option::Option<crate::types::StringCondition>,
    /// <p>A leaf node condition which can be used to specify a numeric condition.</p>
    pub number_condition: ::std::option::Option<crate::types::NumberCondition>,
}
impl Condition {
    /// <p>A leaf node condition which can be used to specify a string condition.</p><note>
    /// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
    /// </note>
    pub fn string_condition(&self) -> ::std::option::Option<&crate::types::StringCondition> {
        self.string_condition.as_ref()
    }
    /// <p>A leaf node condition which can be used to specify a numeric condition.</p>
    pub fn number_condition(&self) -> ::std::option::Option<&crate::types::NumberCondition> {
        self.number_condition.as_ref()
    }
}
impl Condition {
    /// Creates a new builder-style object to manufacture [`Condition`](crate::types::Condition).
    pub fn builder() -> crate::types::builders::ConditionBuilder {
        crate::types::builders::ConditionBuilder::default()
    }
}

/// A builder for [`Condition`](crate::types::Condition).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ConditionBuilder {
    pub(crate) string_condition: ::std::option::Option<crate::types::StringCondition>,
    pub(crate) number_condition: ::std::option::Option<crate::types::NumberCondition>,
}
impl ConditionBuilder {
    /// <p>A leaf node condition which can be used to specify a string condition.</p><note>
    /// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
    /// </note>
    pub fn string_condition(mut self, input: crate::types::StringCondition) -> Self {
        self.string_condition = ::std::option::Option::Some(input);
        self
    }
    /// <p>A leaf node condition which can be used to specify a string condition.</p><note>
    /// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
    /// </note>
    pub fn set_string_condition(mut self, input: ::std::option::Option<crate::types::StringCondition>) -> Self {
        self.string_condition = input;
        self
    }
    /// <p>A leaf node condition which can be used to specify a string condition.</p><note>
    /// <p>The currently supported values for <code>FieldName</code> are <code>name</code> and <code>value</code>.</p>
    /// </note>
    pub fn get_string_condition(&self) -> &::std::option::Option<crate::types::StringCondition> {
        &self.string_condition
    }
    /// <p>A leaf node condition which can be used to specify a numeric condition.</p>
    pub fn number_condition(mut self, input: crate::types::NumberCondition) -> Self {
        self.number_condition = ::std::option::Option::Some(input);
        self
    }
    /// <p>A leaf node condition which can be used to specify a numeric condition.</p>
    pub fn set_number_condition(mut self, input: ::std::option::Option<crate::types::NumberCondition>) -> Self {
        self.number_condition = input;
        self
    }
    /// <p>A leaf node condition which can be used to specify a numeric condition.</p>
    pub fn get_number_condition(&self) -> &::std::option::Option<crate::types::NumberCondition> {
        &self.number_condition
    }
    /// Consumes the builder and constructs a [`Condition`](crate::types::Condition).
    pub fn build(self) -> crate::types::Condition {
        crate::types::Condition {
            string_condition: self.string_condition,
            number_condition: self.number_condition,
        }
    }
}