aws-sdk-connect 1.153.0

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

/// <p>Step signifies the criteria to be used for routing to an agent</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Step {
    /// <p>An object to specify the expiration of a routing step.</p>
    pub expiry: ::std::option::Option<crate::types::Expiry>,
    /// <p>A tagged union to specify expression for a routing step.</p>
    pub expression: ::std::option::Option<crate::types::Expression>,
    /// <p>Represents status of the Routing step.</p>
    pub status: ::std::option::Option<crate::types::RoutingCriteriaStepStatus>,
}
impl Step {
    /// <p>An object to specify the expiration of a routing step.</p>
    pub fn expiry(&self) -> ::std::option::Option<&crate::types::Expiry> {
        self.expiry.as_ref()
    }
    /// <p>A tagged union to specify expression for a routing step.</p>
    pub fn expression(&self) -> ::std::option::Option<&crate::types::Expression> {
        self.expression.as_ref()
    }
    /// <p>Represents status of the Routing step.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::RoutingCriteriaStepStatus> {
        self.status.as_ref()
    }
}
impl Step {
    /// Creates a new builder-style object to manufacture [`Step`](crate::types::Step).
    pub fn builder() -> crate::types::builders::StepBuilder {
        crate::types::builders::StepBuilder::default()
    }
}

/// A builder for [`Step`](crate::types::Step).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StepBuilder {
    pub(crate) expiry: ::std::option::Option<crate::types::Expiry>,
    pub(crate) expression: ::std::option::Option<crate::types::Expression>,
    pub(crate) status: ::std::option::Option<crate::types::RoutingCriteriaStepStatus>,
}
impl StepBuilder {
    /// <p>An object to specify the expiration of a routing step.</p>
    pub fn expiry(mut self, input: crate::types::Expiry) -> Self {
        self.expiry = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object to specify the expiration of a routing step.</p>
    pub fn set_expiry(mut self, input: ::std::option::Option<crate::types::Expiry>) -> Self {
        self.expiry = input;
        self
    }
    /// <p>An object to specify the expiration of a routing step.</p>
    pub fn get_expiry(&self) -> &::std::option::Option<crate::types::Expiry> {
        &self.expiry
    }
    /// <p>A tagged union to specify expression for a routing step.</p>
    pub fn expression(mut self, input: crate::types::Expression) -> Self {
        self.expression = ::std::option::Option::Some(input);
        self
    }
    /// <p>A tagged union to specify expression for a routing step.</p>
    pub fn set_expression(mut self, input: ::std::option::Option<crate::types::Expression>) -> Self {
        self.expression = input;
        self
    }
    /// <p>A tagged union to specify expression for a routing step.</p>
    pub fn get_expression(&self) -> &::std::option::Option<crate::types::Expression> {
        &self.expression
    }
    /// <p>Represents status of the Routing step.</p>
    pub fn status(mut self, input: crate::types::RoutingCriteriaStepStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Represents status of the Routing step.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::RoutingCriteriaStepStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Represents status of the Routing step.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::RoutingCriteriaStepStatus> {
        &self.status
    }
    /// Consumes the builder and constructs a [`Step`](crate::types::Step).
    pub fn build(self) -> crate::types::Step {
        crate::types::Step {
            expiry: self.expiry,
            expression: self.expression,
            status: self.status,
        }
    }
}