aws-sdk-connect 1.169.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::update_predefined_attribute::_update_predefined_attribute_input::UpdatePredefinedAttributeInputBuilder;

pub use crate::operation::update_predefined_attribute::_update_predefined_attribute_output::UpdatePredefinedAttributeOutputBuilder;

impl crate::operation::update_predefined_attribute::builders::UpdatePredefinedAttributeInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_predefined_attribute::UpdatePredefinedAttributeOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_predefined_attribute::UpdatePredefinedAttributeError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_predefined_attribute();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdatePredefinedAttribute`.
///
/// <p>Updates a predefined attribute for the specified Amazon Connect instance. A <i>predefined attribute</i> is made up of a name and a value.</p>
/// <p>For the predefined attributes per instance quota, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html#connect-quotas">Amazon Connect quotas</a>.</p>
/// <p><b>Use cases</b></p>
/// <p>Following are common uses cases for this API:</p>
/// <ul>
/// <li>
/// <p>Update routing proficiency (for example, agent certification) that has predefined values (for example, a list of possible certifications). For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/predefined-attributes.html">Create predefined attributes for routing contacts to agents</a>.</p></li>
/// <li>
/// <p>Update an attribute for business unit name that has a list of predefined business unit names used in your organization. This is a use case where information for a contact varies between transfers or conferences. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/use-contact-segment-attributes.html">Use contact segment attributes</a>.</p></li>
/// </ul>
/// <p><b>Endpoints</b>: See <a href="https://docs.aws.amazon.com/general/latest/gr/connect_region.html">Amazon Connect endpoints and quotas</a>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdatePredefinedAttributeFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_predefined_attribute::builders::UpdatePredefinedAttributeInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_predefined_attribute::UpdatePredefinedAttributeOutput,
        crate::operation::update_predefined_attribute::UpdatePredefinedAttributeError,
    > for UpdatePredefinedAttributeFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_predefined_attribute::UpdatePredefinedAttributeOutput,
            crate::operation::update_predefined_attribute::UpdatePredefinedAttributeError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdatePredefinedAttributeFluentBuilder {
    /// Creates a new `UpdatePredefinedAttributeFluentBuilder`.
    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 UpdatePredefinedAttribute as a reference.
    pub fn as_input(&self) -> &crate::operation::update_predefined_attribute::builders::UpdatePredefinedAttributeInputBuilder {
        &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::update_predefined_attribute::UpdatePredefinedAttributeOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_predefined_attribute::UpdatePredefinedAttributeError,
            ::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::update_predefined_attribute::UpdatePredefinedAttribute::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_predefined_attribute::UpdatePredefinedAttribute::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::update_predefined_attribute::UpdatePredefinedAttributeOutput,
        crate::operation::update_predefined_attribute::UpdatePredefinedAttributeError,
        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 find the instance ID 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 find the instance ID 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 find the instance ID 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 name of the predefined attribute.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The name of the predefined attribute.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The name of the predefined attribute.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The values of the predefined attribute.</p>
    pub fn values(mut self, input: crate::types::PredefinedAttributeValues) -> Self {
        self.inner = self.inner.values(input);
        self
    }
    /// <p>The values of the predefined attribute.</p>
    pub fn set_values(mut self, input: ::std::option::Option<crate::types::PredefinedAttributeValues>) -> Self {
        self.inner = self.inner.set_values(input);
        self
    }
    /// <p>The values of the predefined attribute.</p>
    pub fn get_values(&self) -> &::std::option::Option<crate::types::PredefinedAttributeValues> {
        self.inner.get_values()
    }
    ///
    /// Appends an item to `Purposes`.
    ///
    /// To override the contents of this collection use [`set_purposes`](Self::set_purposes).
    ///
    /// <p>Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.</p>
    pub fn purposes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.purposes(input.into());
        self
    }
    /// <p>Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.</p>
    pub fn set_purposes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_purposes(input);
        self
    }
    /// <p>Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.</p>
    pub fn get_purposes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_purposes()
    }
    /// <p>Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.</p>
    pub fn attribute_configuration(mut self, input: crate::types::InputPredefinedAttributeConfiguration) -> Self {
        self.inner = self.inner.attribute_configuration(input);
        self
    }
    /// <p>Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.</p>
    pub fn set_attribute_configuration(mut self, input: ::std::option::Option<crate::types::InputPredefinedAttributeConfiguration>) -> Self {
        self.inner = self.inner.set_attribute_configuration(input);
        self
    }
    /// <p>Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.</p>
    pub fn get_attribute_configuration(&self) -> &::std::option::Option<crate::types::InputPredefinedAttributeConfiguration> {
        self.inner.get_attribute_configuration()
    }
}