/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.connect.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Initiates a flow to start a new chat for the customer. Response of this API * provides a token required to obtain credentials from the CreateParticipantConnection API in the Amazon Connect Participant * Service. *
** When a new chat contact is successfully created, clients must subscribe to * the participant’s connection for the created chat within 5 minutes. This is * achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS. *
** A 429 error occurs in the following situations: *
*
* API rate limit is exceeded. API TPS throttling returns a
* TooManyRequests
exception.
*
* The quota for concurrent active chats is exceeded. Active chat throttling
* returns a LimitExceededException
.
*
* If you use the ChatDurationInMinutes
parameter and receive a 400
* error, your account may not support the ability to configure custom chat
* durations. For more information, contact Amazon Web Services Support.
*
* For more information about chat, see Chat in the Amazon Connect Administrator Guide. *
*/ public class StartChatContactRequest extends AmazonWebServiceRequest implements Serializable { /** ** The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the * instance. *
*
* Constraints:
* Length: 1 - 100
*/
private String instanceId;
/**
*
* The identifier of the flow for initiating the chat. To see the * ContactFlowId in the Amazon Connect console user interface, on the * navigation menu go to Routing, Contact Flows. Choose the * flow. On the flow page, under the name of the flow, choose Show * additional flow information. The ContactFlowId is the last part of * the ARN, shown here in bold: *
** arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx- * xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx *
*
* Constraints:
* Length: - 500
*/
private String contactFlowId;
/**
*
* 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. *
** 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. *
*/ private java.util.Map* Information identifying the participant. *
*/ private ParticipantDetails participantDetails; /** ** The initial message to be sent to the newly created chat. *
*/ private ChatMessage initialMessage; /** ** 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 Making retries safe with idempotent APIs. *
*
* Constraints:
* Length: - 500
*/
private String clientToken;
/**
*
* 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). *
*
* Constraints:
* Range: 60 - 10080
*/
private Integer chatDurationInMinutes;
/**
*
* The supported chat message content types. Supported types are
* text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
, and
* application/vnd.amazonaws.connect.message.interactive.response
* .
*
* Content types must always contain text/plain
. You can then
* put any other supported type in the list. For example, all the following
* lists are valid because they contain text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
*
* The type
* application/vnd.amazonaws.connect.message.interactive
is
* required to use the Show view flow block.
*
* Enable persistent chats. For more information about enabling persistent * chat, and for example use cases and how to configure for them, see Enable persistent chat. *
*/ private PersistentChat persistentChat; /** ** The unique identifier for an Amazon Connect contact. This identifier is * related to the chat starting. *
** You cannot provide data for both RelatedContactId and PersistentChat. *
*
* Constraints:
* Length: 1 - 256
*/
private String relatedContactId;
/**
*
* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the * instance. *
*
* Constraints:
* Length: 1 - 100
*
* @return
* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of * the instance. *
*/ public String getInstanceId() { return instanceId; } /** ** The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the * instance. *
*
* Constraints:
* Length: 1 - 100
*
* @param instanceId
* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of * the instance. *
*/ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** ** The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the * instance. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 100
*
* @param instanceId
* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of * the instance. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartChatContactRequest withInstanceId(String instanceId) { this.instanceId = instanceId; return this; } /** ** The identifier of the flow for initiating the chat. To see the * ContactFlowId in the Amazon Connect console user interface, on the * navigation menu go to Routing, Contact Flows. Choose the * flow. On the flow page, under the name of the flow, choose Show * additional flow information. The ContactFlowId is the last part of * the ARN, shown here in bold: *
** arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx- * xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx *
*
* Constraints:
* Length: - 500
*
* @return
* The identifier of the flow for initiating the chat. To see the * ContactFlowId in the Amazon Connect console user interface, on * the navigation menu go to Routing, Contact Flows. * Choose the flow. On the flow page, under the name of the flow, * choose Show additional flow information. The ContactFlowId * is the last part of the ARN, shown here in bold: *
** arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx- * xxxx-xxxx-xxxxxxxxxxxx/contact-flow/ * 846ec553-a005-41c0-8341-xxxxxxxxxxxx *
*/ public String getContactFlowId() { return contactFlowId; } /** ** The identifier of the flow for initiating the chat. To see the * ContactFlowId in the Amazon Connect console user interface, on the * navigation menu go to Routing, Contact Flows. Choose the * flow. On the flow page, under the name of the flow, choose Show * additional flow information. The ContactFlowId is the last part of * the ARN, shown here in bold: *
** arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx- * xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx *
*
* Constraints:
* Length: - 500
*
* @param contactFlowId
* The identifier of the flow for initiating the chat. To see the * ContactFlowId in the Amazon Connect console user interface, on * the navigation menu go to Routing, Contact * Flows. Choose the flow. On the flow page, under the name * of the flow, choose Show additional flow information. * The ContactFlowId is the last part of the ARN, shown here in * bold: *
** arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx- * xxxx-xxxx-xxxxxxxxxxxx/contact-flow/ * 846ec553-a005-41c0-8341-xxxxxxxxxxxx *
*/ public void setContactFlowId(String contactFlowId) { this.contactFlowId = contactFlowId; } /** ** The identifier of the flow for initiating the chat. To see the * ContactFlowId in the Amazon Connect console user interface, on the * navigation menu go to Routing, Contact Flows. Choose the * flow. On the flow page, under the name of the flow, choose Show * additional flow information. The ContactFlowId is the last part of * the ARN, shown here in bold: *
** arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx- * xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 500
*
* @param contactFlowId
* The identifier of the flow for initiating the chat. To see the * ContactFlowId in the Amazon Connect console user interface, on * the navigation menu go to Routing, Contact * Flows. Choose the flow. On the flow page, under the name * of the flow, choose Show additional flow information. * The ContactFlowId is the last part of the ARN, shown here in * bold: *
** arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx- * xxxx-xxxx-xxxxxxxxxxxx/contact-flow/ * 846ec553-a005-41c0-8341-xxxxxxxxxxxx *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartChatContactRequest withContactFlowId(String contactFlowId) { this.contactFlowId = contactFlowId; return this; } /** ** 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. *
** 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. *
* * @return* 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. *
** 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. *
*/ public java.util.Map* 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. *
** 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. *
* * @param attributes* 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. *
** 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. *
*/ public void setAttributes(java.util.Map* 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. *
** 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param attributes
* 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. *
** 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. *
* @return A reference to this updated object so that method calls can be * chained together. */ public StartChatContactRequest withAttributes(java.util.Map* 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. *
** 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. *
*
* The method adds a new key-value pair into Attributes parameter, and
* returns a reference to this object so that method calls can be chained
* together.
*
* @param key The key of the entry to be added into Attributes.
* @param value The corresponding value of the entry to be added into
* Attributes.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public StartChatContactRequest addAttributesEntry(String key, String value) {
if (null == this.attributes) {
this.attributes = new java.util.HashMap
* Returns a reference to this object so that method calls can be chained
* together.
*/
public StartChatContactRequest clearAttributesEntries() {
this.attributes = null;
return this;
}
/**
*
* Information identifying the participant.
*
* Information identifying the participant.
*
* Information identifying the participant.
*
* Information identifying the participant.
*
* Information identifying the participant.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param participantDetails
* Information identifying the participant.
*
* The initial message to be sent to the newly created chat.
*
* The initial message to be sent to the newly created chat.
*
* The initial message to be sent to the newly created chat.
*
* The initial message to be sent to the newly created chat.
*
* The initial message to be sent to the newly created chat.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param initialMessage
* The initial message to be sent to the newly created chat.
*
* 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 Making retries safe with idempotent APIs.
*
* Constraints:
* 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 Making retries safe with idempotent APIs.
*
* 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 Making retries safe with idempotent APIs.
*
* Constraints:
* 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 Making retries safe with idempotent APIs.
*
* 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 Making retries safe with idempotent APIs.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* 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 Making retries safe with idempotent APIs.
*
* 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).
*
* Constraints:
* 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).
*
* 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).
*
* Constraints:
* 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).
*
* 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).
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* 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).
*
* The supported chat message content types. Supported types are
*
* Content types must always contain
* The type
*
* The supported chat message content types. Supported types are
*
* Content types must always contain
* The type
*
* The supported chat message content types. Supported types are
*
* Content types must always contain
* The type
*
* The supported chat message content types. Supported types are
*
* Content types must always contain
* The type
*
* The supported chat message content types. Supported types are
*
* Content types must always contain
* The type
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param supportedMessagingContentTypes
* The supported chat message content types. Supported types are
*
* Content types must always contain
* The type
*
* The supported chat message content types. Supported types are
*
* Content types must always contain
* The type
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param supportedMessagingContentTypes
* The supported chat message content types. Supported types are
*
* Content types must always contain
* The type
*
* Enable persistent chats. For more information about enabling persistent
* chat, and for example use cases and how to configure for them, see Enable persistent chat.
*
* Enable persistent chats. For more information about enabling
* persistent chat, and for example use cases and how to configure
* for them, see Enable persistent chat.
*
* Enable persistent chats. For more information about enabling persistent
* chat, and for example use cases and how to configure for them, see Enable persistent chat.
*
* Enable persistent chats. For more information about enabling
* persistent chat, and for example use cases and how to
* configure for them, see Enable persistent chat.
*
* Enable persistent chats. For more information about enabling persistent
* chat, and for example use cases and how to configure for them, see Enable persistent chat.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param persistentChat
* Enable persistent chats. For more information about enabling
* persistent chat, and for example use cases and how to
* configure for them, see Enable persistent chat.
*
* The unique identifier for an Amazon Connect contact. This identifier is
* related to the chat starting.
*
* You cannot provide data for both RelatedContactId and PersistentChat.
*
* Constraints:
* The unique identifier for an Amazon Connect contact. This
* identifier is related to the chat starting.
*
* You cannot provide data for both RelatedContactId and
* PersistentChat.
*
* The unique identifier for an Amazon Connect contact. This identifier is
* related to the chat starting.
*
* You cannot provide data for both RelatedContactId and PersistentChat.
*
* Constraints:
* The unique identifier for an Amazon Connect contact. This
* identifier is related to the chat starting.
*
* You cannot provide data for both RelatedContactId and
* PersistentChat.
*
* The unique identifier for an Amazon Connect contact. This identifier is
* related to the chat starting.
*
* You cannot provide data for both RelatedContactId and PersistentChat.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* The unique identifier for an Amazon Connect contact. This
* identifier is related to the chat starting.
*
* You cannot provide data for both RelatedContactId and
* PersistentChat.
*
* Length: - 500
*
* @return
* Length: - 500
*
* @param clientToken
* Length: - 500
*
* @param clientToken
* Range: 60 - 10080
*
* @return
* Range: 60 - 10080
*
* @param chatDurationInMinutes
* Range: 60 - 10080
*
* @param chatDurationInMinutes text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
, and
* application/vnd.amazonaws.connect.message.interactive.response
* .
* text/plain
. You can then
* put any other supported type in the list. For example, all the following
* lists are valid because they contain text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
* application/vnd.amazonaws.connect.message.interactive
is
* required to use the Show view flow block.
* text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
* , and
* application/vnd.amazonaws.connect.message.interactive.response
* .
* text/plain
. You
* can then put any other supported type in the list. For example,
* all the following lists are valid because they contain
* text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
* application/vnd.amazonaws.connect.message.interactive
* is required to use the Show view flow block.
* text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
, and
* application/vnd.amazonaws.connect.message.interactive.response
* .
* text/plain
. You can then
* put any other supported type in the list. For example, all the following
* lists are valid because they contain text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
* application/vnd.amazonaws.connect.message.interactive
is
* required to use the Show view flow block.
* text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
* , and
* application/vnd.amazonaws.connect.message.interactive.response
* .
* text/plain
. You
* can then put any other supported type in the list. For
* example, all the following lists are valid because they
* contain text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
* application/vnd.amazonaws.connect.message.interactive
* is required to use the Show view flow block.
* text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
, and
* application/vnd.amazonaws.connect.message.interactive.response
* .
* text/plain
. You can then
* put any other supported type in the list. For example, all the following
* lists are valid because they contain text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
* application/vnd.amazonaws.connect.message.interactive
is
* required to use the Show view flow block.
* text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
* , and
* application/vnd.amazonaws.connect.message.interactive.response
* .
* text/plain
. You
* can then put any other supported type in the list. For
* example, all the following lists are valid because they
* contain text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
* application/vnd.amazonaws.connect.message.interactive
* is required to use the Show view flow block.
* text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
, and
* application/vnd.amazonaws.connect.message.interactive.response
* .
* text/plain
. You can then
* put any other supported type in the list. For example, all the following
* lists are valid because they contain text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
* application/vnd.amazonaws.connect.message.interactive
is
* required to use the Show view flow block.
* text/plain
, text/markdown
,
* application/json
,
* application/vnd.amazonaws.connect.message.interactive
* , and
* application/vnd.amazonaws.connect.message.interactive.response
* .
* text/plain
. You
* can then put any other supported type in the list. For
* example, all the following lists are valid because they
* contain text/plain
:
* [text/plain, text/markdown, application/json]
,
* [text/markdown, text/plain]
,
* [text/plain, application/json, application/vnd.amazonaws.connect.message.interactive.response]
* .
* application/vnd.amazonaws.connect.message.interactive
* is required to use the Show view flow block.
*
* Length: 1 - 256
*
* @return
* Length: 1 - 256
*
* @param relatedContactId
* Length: 1 - 256
*
* @param relatedContactId