/* * Copyright 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. */ /* * Do not modify this file. This file is generated from the connect-2017-08-08.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.Connect.Model { /// /// Container for the parameters to the StartChatContact operation. /// 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: /// /// /// /// 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 partial class StartChatContactRequest : AmazonConnectRequest { private Dictionary _attributes = new Dictionary(); private int? _chatDurationInMinutes; private string _clientToken; private string _contactFlowId; private ChatMessage _initialMessage; private string _instanceId; private ParticipantDetails _participantDetails; private PersistentChat _persistentChat; private string _relatedContactId; private List _supportedMessagingContentTypes = new List(); /// /// Gets and sets the property 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 Dictionary Attributes { get { return this._attributes; } set { this._attributes = value; } } // Check to see if Attributes property is set internal bool IsSetAttributes() { return this._attributes != null && this._attributes.Count > 0; } /// /// Gets and sets the property ChatDurationInMinutes. /// /// 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). /// /// [AWSProperty(Min=60, Max=10080)] public int ChatDurationInMinutes { get { return this._chatDurationInMinutes.GetValueOrDefault(); } set { this._chatDurationInMinutes = value; } } // Check to see if ChatDurationInMinutes property is set internal bool IsSetChatDurationInMinutes() { return this._chatDurationInMinutes.HasValue; } /// /// Gets and sets the property ClientToken. /// /// 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. /// /// [AWSProperty(Max=500)] public string ClientToken { get { return this._clientToken; } set { this._clientToken = value; } } // Check to see if ClientToken property is set internal bool IsSetClientToken() { return this._clientToken != null; } /// /// Gets and sets the property 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 /// /// /// [AWSProperty(Required=true, Max=500)] public string ContactFlowId { get { return this._contactFlowId; } set { this._contactFlowId = value; } } // Check to see if ContactFlowId property is set internal bool IsSetContactFlowId() { return this._contactFlowId != null; } /// /// Gets and sets the property InitialMessage. /// /// The initial message to be sent to the newly created chat. /// /// public ChatMessage InitialMessage { get { return this._initialMessage; } set { this._initialMessage = value; } } // Check to see if InitialMessage property is set internal bool IsSetInitialMessage() { return this._initialMessage != null; } /// /// Gets and sets the property InstanceId. /// /// The identifier of the Amazon Connect instance. You can find /// the instance ID in the Amazon Resource Name (ARN) of the instance. /// /// [AWSProperty(Required=true, Min=1, Max=100)] public string InstanceId { get { return this._instanceId; } set { this._instanceId = value; } } // Check to see if InstanceId property is set internal bool IsSetInstanceId() { return this._instanceId != null; } /// /// Gets and sets the property ParticipantDetails. /// /// Information identifying the participant. /// /// [AWSProperty(Required=true)] public ParticipantDetails ParticipantDetails { get { return this._participantDetails; } set { this._participantDetails = value; } } // Check to see if ParticipantDetails property is set internal bool IsSetParticipantDetails() { return this._participantDetails != null; } /// /// Gets and sets the property 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. /// /// public PersistentChat PersistentChat { get { return this._persistentChat; } set { this._persistentChat = value; } } // Check to see if PersistentChat property is set internal bool IsSetPersistentChat() { return this._persistentChat != null; } /// /// Gets and sets the property RelatedContactId. /// /// 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. /// /// /// [AWSProperty(Min=1, Max=256)] public string RelatedContactId { get { return this._relatedContactId; } set { this._relatedContactId = value; } } // Check to see if RelatedContactId property is set internal bool IsSetRelatedContactId() { return this._relatedContactId != null; } /// /// Gets and sets the property SupportedMessagingContentTypes. /// /// 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. /// /// /// public List SupportedMessagingContentTypes { get { return this._supportedMessagingContentTypes; } set { this._supportedMessagingContentTypes = value; } } // Check to see if SupportedMessagingContentTypes property is set internal bool IsSetSupportedMessagingContentTypes() { return this._supportedMessagingContentTypes != null && this._supportedMessagingContentTypes.Count > 0; } } }