aws-sdk-connect 1.196.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartAssistantContactInput {
    /// <p>The identifier of the Connect Customer 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 instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The AI agent configuration for this contact.</p>
    pub ai_agent: ::std::option::Option<crate::types::AiAgentInput>,
    /// <p>The display name and other details that identify the chat participant.</p>
    pub participant_details: ::std::option::Option<crate::types::ParticipantDetails>,
    /// <p>The initial message to send to the newly created chat.</p>
    pub initial_message: ::std::option::Option<crate::types::ChatMessage>,
    /// <p>A map of key-value pairs to associate with the contact. We make these attributes available to flows as standard contact attributes.</p>
    /// <p>You can provide up to 32,768 UTF-8 bytes across all key-value pairs for each contact.</p>
    pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <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 client_token: ::std::option::Option<::std::string::String>,
    /// <p>The configuration that enables persistent chat. For more information about persistent chat and its use cases, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html">Enable persistent chat</a>.</p>
    pub persistent_chat: ::std::option::Option<crate::types::PersistentChat>,
    /// <p>The identifier of an Connect Customer contact related to the new assistant contact.</p><note>
    /// <p>You cannot provide both <code>RelatedContactId</code> and <code>PersistentChat</code>.</p>
    /// </note>
    pub related_contact_id: ::std::option::Option<::std::string::String>,
}
impl StartAssistantContactInput {
    /// <p>The identifier of the Connect Customer 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(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The AI agent configuration for this contact.</p>
    pub fn ai_agent(&self) -> ::std::option::Option<&crate::types::AiAgentInput> {
        self.ai_agent.as_ref()
    }
    /// <p>The display name and other details that identify the chat participant.</p>
    pub fn participant_details(&self) -> ::std::option::Option<&crate::types::ParticipantDetails> {
        self.participant_details.as_ref()
    }
    /// <p>The initial message to send to the newly created chat.</p>
    pub fn initial_message(&self) -> ::std::option::Option<&crate::types::ChatMessage> {
        self.initial_message.as_ref()
    }
    /// <p>A map of key-value pairs to associate with the contact. We make these attributes available to flows as standard contact attributes.</p>
    /// <p>You can provide up to 32,768 UTF-8 bytes across all key-value pairs for each contact.</p>
    pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.attributes.as_ref()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The configuration that enables persistent chat. For more information about persistent chat and its use cases, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html">Enable persistent chat</a>.</p>
    pub fn persistent_chat(&self) -> ::std::option::Option<&crate::types::PersistentChat> {
        self.persistent_chat.as_ref()
    }
    /// <p>The identifier of an Connect Customer contact related to the new assistant contact.</p><note>
    /// <p>You cannot provide both <code>RelatedContactId</code> and <code>PersistentChat</code>.</p>
    /// </note>
    pub fn related_contact_id(&self) -> ::std::option::Option<&str> {
        self.related_contact_id.as_deref()
    }
}
impl StartAssistantContactInput {
    /// Creates a new builder-style object to manufacture [`StartAssistantContactInput`](crate::operation::start_assistant_contact::StartAssistantContactInput).
    pub fn builder() -> crate::operation::start_assistant_contact::builders::StartAssistantContactInputBuilder {
        crate::operation::start_assistant_contact::builders::StartAssistantContactInputBuilder::default()
    }
}

/// A builder for [`StartAssistantContactInput`](crate::operation::start_assistant_contact::StartAssistantContactInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartAssistantContactInputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) ai_agent: ::std::option::Option<crate::types::AiAgentInput>,
    pub(crate) participant_details: ::std::option::Option<crate::types::ParticipantDetails>,
    pub(crate) initial_message: ::std::option::Option<crate::types::ChatMessage>,
    pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) persistent_chat: ::std::option::Option<crate::types::PersistentChat>,
    pub(crate) related_contact_id: ::std::option::Option<::std::string::String>,
}
impl StartAssistantContactInputBuilder {
    /// <p>The identifier of the Connect Customer 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>
    /// This field is required.
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Connect Customer 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.instance_id = input;
        self
    }
    /// <p>The identifier of the Connect Customer 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.instance_id
    }
    /// <p>The AI agent configuration for this contact.</p>
    /// This field is required.
    pub fn ai_agent(mut self, input: crate::types::AiAgentInput) -> Self {
        self.ai_agent = ::std::option::Option::Some(input);
        self
    }
    /// <p>The AI agent configuration for this contact.</p>
    pub fn set_ai_agent(mut self, input: ::std::option::Option<crate::types::AiAgentInput>) -> Self {
        self.ai_agent = input;
        self
    }
    /// <p>The AI agent configuration for this contact.</p>
    pub fn get_ai_agent(&self) -> &::std::option::Option<crate::types::AiAgentInput> {
        &self.ai_agent
    }
    /// <p>The display name and other details that identify the chat participant.</p>
    /// This field is required.
    pub fn participant_details(mut self, input: crate::types::ParticipantDetails) -> Self {
        self.participant_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>The display name and other details that identify the chat participant.</p>
    pub fn set_participant_details(mut self, input: ::std::option::Option<crate::types::ParticipantDetails>) -> Self {
        self.participant_details = input;
        self
    }
    /// <p>The display name and other details that identify the chat participant.</p>
    pub fn get_participant_details(&self) -> &::std::option::Option<crate::types::ParticipantDetails> {
        &self.participant_details
    }
    /// <p>The initial message to send to the newly created chat.</p>
    pub fn initial_message(mut self, input: crate::types::ChatMessage) -> Self {
        self.initial_message = ::std::option::Option::Some(input);
        self
    }
    /// <p>The initial message to send to the newly created chat.</p>
    pub fn set_initial_message(mut self, input: ::std::option::Option<crate::types::ChatMessage>) -> Self {
        self.initial_message = input;
        self
    }
    /// <p>The initial message to send to the newly created chat.</p>
    pub fn get_initial_message(&self) -> &::std::option::Option<crate::types::ChatMessage> {
        &self.initial_message
    }
    /// Adds a key-value pair to `attributes`.
    ///
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
    ///
    /// <p>A map of key-value pairs to associate with the contact. We make these attributes available to flows as standard contact attributes.</p>
    /// <p>You can provide up to 32,768 UTF-8 bytes across all key-value pairs for each contact.</p>
    pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.attributes.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.attributes = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map of key-value pairs to associate with the contact. We make these attributes available to flows as standard contact attributes.</p>
    /// <p>You can provide up to 32,768 UTF-8 bytes across all key-value pairs for each contact.</p>
    pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.attributes = input;
        self
    }
    /// <p>A map of key-value pairs to associate with the contact. We make these attributes available to flows as standard contact attributes.</p>
    /// <p>You can provide up to 32,768 UTF-8 bytes across all key-value pairs for each contact.</p>
    pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.attributes
    }
    /// <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.client_token = ::std::option::Option::Some(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.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.client_token
    }
    /// <p>The configuration that enables persistent chat. For more information about persistent chat and its use cases, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html">Enable persistent chat</a>.</p>
    pub fn persistent_chat(mut self, input: crate::types::PersistentChat) -> Self {
        self.persistent_chat = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration that enables persistent chat. For more information about persistent chat and its use cases, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html">Enable persistent chat</a>.</p>
    pub fn set_persistent_chat(mut self, input: ::std::option::Option<crate::types::PersistentChat>) -> Self {
        self.persistent_chat = input;
        self
    }
    /// <p>The configuration that enables persistent chat. For more information about persistent chat and its use cases, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html">Enable persistent chat</a>.</p>
    pub fn get_persistent_chat(&self) -> &::std::option::Option<crate::types::PersistentChat> {
        &self.persistent_chat
    }
    /// <p>The identifier of an Connect Customer contact related to the new assistant contact.</p><note>
    /// <p>You cannot provide both <code>RelatedContactId</code> and <code>PersistentChat</code>.</p>
    /// </note>
    pub fn related_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.related_contact_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of an Connect Customer contact related to the new assistant contact.</p><note>
    /// <p>You cannot provide both <code>RelatedContactId</code> and <code>PersistentChat</code>.</p>
    /// </note>
    pub fn set_related_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.related_contact_id = input;
        self
    }
    /// <p>The identifier of an Connect Customer contact related to the new assistant contact.</p><note>
    /// <p>You cannot provide both <code>RelatedContactId</code> and <code>PersistentChat</code>.</p>
    /// </note>
    pub fn get_related_contact_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.related_contact_id
    }
    /// Consumes the builder and constructs a [`StartAssistantContactInput`](crate::operation::start_assistant_contact::StartAssistantContactInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_assistant_contact::StartAssistantContactInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_assistant_contact::StartAssistantContactInput {
            instance_id: self.instance_id,
            ai_agent: self.ai_agent,
            participant_details: self.participant_details,
            initial_message: self.initial_message,
            attributes: self.attributes,
            client_token: self.client_token,
            persistent_chat: self.persistent_chat,
            related_contact_id: self.related_contact_id,
        })
    }
}