1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`StartChatContact`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`instance_id(impl Into<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_instance_id):<br>required: **true**<br><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><br>
    ///   - [`contact_flow_id(impl Into<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::contact_flow_id) / [`set_contact_flow_id(Option<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_contact_flow_id):<br>required: **true**<br><p>The identifier of the flow for initiating the chat. To see the ContactFlowId in the Amazon Connect admin website, on the navigation menu go to <b>Routing</b>, <b>Contact Flows</b>. Choose the flow. On the flow page, under the name of the flow, choose <b>Show additional flow information</b>. The ContactFlowId is the last part of the ARN, shown here in bold:</p> <p>arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/<b>846ec553-a005-41c0-8341-xxxxxxxxxxxx</b></p><br>
    ///   - [`attributes(impl Into<String>, impl Into<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::attributes) / [`set_attributes(Option<HashMap::<String, String>>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_attributes):<br>required: **false**<br><p>A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows just like any other contact attributes.</p> <p>There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.</p><br>
    ///   - [`participant_details(ParticipantDetails)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::participant_details) / [`set_participant_details(Option<ParticipantDetails>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_participant_details):<br>required: **true**<br><p>Information identifying the participant.</p><br>
    ///   - [`initial_message(ChatMessage)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::initial_message) / [`set_initial_message(Option<ChatMessage>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_initial_message):<br>required: **false**<br><p>The initial message to be sent to the newly created chat.</p><br>
    ///   - [`client_token(impl Into<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_client_token):<br>required: **false**<br><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><br>
    ///   - [`chat_duration_in_minutes(i32)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::chat_duration_in_minutes) / [`set_chat_duration_in_minutes(Option<i32>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_chat_duration_in_minutes):<br>required: **false**<br><p>The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minimum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).</p><br>
    ///   - [`supported_messaging_content_types(impl Into<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::supported_messaging_content_types) / [`set_supported_messaging_content_types(Option<Vec::<String>>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_supported_messaging_content_types):<br>required: **false**<br><p>The supported chat message content types. Supported types are <code>text/plain</code>, <code>text/markdown</code>, <code>application/json</code>, <code>application/vnd.amazonaws.connect.message.interactive</code>, and <code>application/vnd.amazonaws.connect.message.interactive.response</code>.</p> <p>Content types must always contain <code>text/plain</code>. You can then put any other supported type in the list. For example, all the following lists are valid because they contain <code>text/plain</code>: <code>[text/plain, text/markdown, application/json]</code>, <code>[text/markdown, text/plain]</code>, <code>[text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]</code>.</p><note>  <p>The type <code>application/vnd.amazonaws.connect.message.interactive</code> is required to use the <a href="https://docs.aws.amazon.com/connect/latest/adminguide/show-view-block.html">Show view</a> flow block.</p> </note><br>
    ///   - [`persistent_chat(PersistentChat)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::persistent_chat) / [`set_persistent_chat(Option<PersistentChat>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_persistent_chat):<br>required: **false**<br><p>Enable persistent chats. For more information about enabling persistent chat, and for example use cases and how to configure for them, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html">Enable persistent chat</a>.</p><br>
    ///   - [`related_contact_id(impl Into<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::related_contact_id) / [`set_related_contact_id(Option<String>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_related_contact_id):<br>required: **false**<br><p>The unique identifier for an Amazon Connect contact. This identifier is related to the chat starting.</p><note>  <p>You cannot provide data for both RelatedContactId and PersistentChat.</p> </note><br>
    ///   - [`segment_attributes(impl Into<String>, SegmentAttributeValue)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::segment_attributes) / [`set_segment_attributes(Option<HashMap::<String, SegmentAttributeValue>>)`](crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::set_segment_attributes):<br>required: **false**<br><p>A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows.</p> <p>Attribute keys can include only alphanumeric, -, and _.</p> <p>This field can be used to show channel subtype, such as <code>connect:Guide</code>.</p><note>  <p>The types <code>application/vnd.amazonaws.connect.message.interactive</code> and <code>application/vnd.amazonaws.connect.message.interactive.response</code> must be present in the SupportedMessagingContentTypes field of this API in order to set <code>SegmentAttributes</code> as {<code> "connect:Subtype": {"valueString" : "connect:Guide" }}</code>.</p> </note><br>
    /// - On success, responds with [`StartChatContactOutput`](crate::operation::start_chat_contact::StartChatContactOutput) with field(s):
    ///   - [`contact_id(Option<String>)`](crate::operation::start_chat_contact::StartChatContactOutput::contact_id): <p>The identifier of this contact within the Amazon Connect instance.</p>
    ///   - [`participant_id(Option<String>)`](crate::operation::start_chat_contact::StartChatContactOutput::participant_id): <p>The identifier for a chat participant. The participantId for a chat participant is the same throughout the chat lifecycle.</p>
    ///   - [`participant_token(Option<String>)`](crate::operation::start_chat_contact::StartChatContactOutput::participant_token): <p>The token used by the chat participant to call <a href="https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html">CreateParticipantConnection</a>. The participant token is valid for the lifetime of a chat participant.</p>
    ///   - [`continued_from_contact_id(Option<String>)`](crate::operation::start_chat_contact::StartChatContactOutput::continued_from_contact_id): <p>The contactId from which a persistent chat session is started. This field is populated only for persistent chats.</p>
    /// - On failure, responds with [`SdkError<StartChatContactError>`](crate::operation::start_chat_contact::StartChatContactError)
    pub fn start_chat_contact(&self) -> crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder {
        crate::operation::start_chat_contact::builders::StartChatContactFluentBuilder::new(self.handle.clone())
    }
}