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>An object to specify the expiration of a routing step.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Expiry {
    /// <p>The number of seconds to wait before expiring the routing step.</p>
    pub duration_in_seconds: ::std::option::Option<i32>,
    /// <p>The timestamp indicating when the routing step expires.</p>
    pub expiry_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Expiry {
    /// <p>The number of seconds to wait before expiring the routing step.</p>
    pub fn duration_in_seconds(&self) -> ::std::option::Option<i32> {
        self.duration_in_seconds
    }
    /// <p>The timestamp indicating when the routing step expires.</p>
    pub fn expiry_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.expiry_timestamp.as_ref()
    }
}
impl Expiry {
    /// Creates a new builder-style object to manufacture [`Expiry`](crate::types::Expiry).
    pub fn builder() -> crate::types::builders::ExpiryBuilder {
        crate::types::builders::ExpiryBuilder::default()
    }
}

/// A builder for [`Expiry`](crate::types::Expiry).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExpiryBuilder {
    pub(crate) duration_in_seconds: ::std::option::Option<i32>,
    pub(crate) expiry_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ExpiryBuilder {
    /// <p>The number of seconds to wait before expiring the routing step.</p>
    pub fn duration_in_seconds(mut self, input: i32) -> Self {
        self.duration_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of seconds to wait before expiring the routing step.</p>
    pub fn set_duration_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.duration_in_seconds = input;
        self
    }
    /// <p>The number of seconds to wait before expiring the routing step.</p>
    pub fn get_duration_in_seconds(&self) -> &::std::option::Option<i32> {
        &self.duration_in_seconds
    }
    /// <p>The timestamp indicating when the routing step expires.</p>
    pub fn expiry_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.expiry_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp indicating when the routing step expires.</p>
    pub fn set_expiry_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.expiry_timestamp = input;
        self
    }
    /// <p>The timestamp indicating when the routing step expires.</p>
    pub fn get_expiry_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.expiry_timestamp
    }
    /// Consumes the builder and constructs a [`Expiry`](crate::types::Expiry).
    pub fn build(self) -> crate::types::Expiry {
        crate::types::Expiry {
            duration_in_seconds: self.duration_in_seconds,
            expiry_timestamp: self.expiry_timestamp,
        }
    }
}