aws-sdk-connect 1.166.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::associate_queue_email_addresses::_associate_queue_email_addresses_input::AssociateQueueEmailAddressesInputBuilder;

pub use crate::operation::associate_queue_email_addresses::_associate_queue_email_addresses_output::AssociateQueueEmailAddressesOutputBuilder;

impl crate::operation::associate_queue_email_addresses::builders::AssociateQueueEmailAddressesInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.associate_queue_email_addresses();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `AssociateQueueEmailAddresses`.
///
/// <p>Associates a set of email addresses with a queue to enable agents to select different "From" (system) email addresses when replying to inbound email contacts or initiating outbound email contacts. This allows agents to handle email contacts across different brands and business units within the same queue.</p>
/// <p><b>Important things to know</b></p>
/// <ul>
/// <li>
/// <p>You can associate up to 49 additional email addresses with a single queue, plus 1 default outbound email address, for a total of 50.</p></li>
/// <li>
/// <p>The email addresses must already exist in the Amazon Connect instance before they can be associated with a queue.</p></li>
/// <li>
/// <p>Agents will be able to select from these associated email addresses when handling email contacts in the queue.</p></li>
/// <li>
/// <p>For inbound email contacts, agents can select from email addresses associated with the queue where the contact was accepted.</p></li>
/// <li>
/// <p>For outbound email contacts, agents can select from email addresses associated with their default outbound queue configured in their routing profile.</p></li>
/// </ul>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct AssociateQueueEmailAddressesFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::associate_queue_email_addresses::builders::AssociateQueueEmailAddressesInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesOutput,
        crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesError,
    > for AssociateQueueEmailAddressesFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesOutput,
            crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl AssociateQueueEmailAddressesFluentBuilder {
    /// Creates a new `AssociateQueueEmailAddressesFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the AssociateQueueEmailAddresses as a reference.
    pub fn as_input(&self) -> &crate::operation::associate_queue_email_addresses::builders::AssociateQueueEmailAddressesInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddresses::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddresses::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesOutput,
        crate::operation::associate_queue_email_addresses::AssociateQueueEmailAddressesError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.instance_id(input.into());
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_instance_id(input);
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_instance_id()
    }
    /// <p>The identifier for the queue.</p>
    pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.queue_id(input.into());
        self
    }
    /// <p>The identifier for the queue.</p>
    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_queue_id(input);
        self
    }
    /// <p>The identifier for the queue.</p>
    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_queue_id()
    }
    ///
    /// Appends an item to `EmailAddressesConfig`.
    ///
    /// To override the contents of this collection use [`set_email_addresses_config`](Self::set_email_addresses_config).
    ///
    /// <p>Configuration list containing the email addresses to associate with the queue. Each configuration specifies an email address ID that should be linked to this queue for routing purposes.</p>
    pub fn email_addresses_config(mut self, input: crate::types::EmailAddressConfig) -> Self {
        self.inner = self.inner.email_addresses_config(input);
        self
    }
    /// <p>Configuration list containing the email addresses to associate with the queue. Each configuration specifies an email address ID that should be linked to this queue for routing purposes.</p>
    pub fn set_email_addresses_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EmailAddressConfig>>) -> Self {
        self.inner = self.inner.set_email_addresses_config(input);
        self
    }
    /// <p>Configuration list containing the email addresses to associate with the queue. Each configuration specifies an email address ID that should be linked to this queue for routing purposes.</p>
    pub fn get_email_addresses_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EmailAddressConfig>> {
        self.inner.get_email_addresses_config()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
}