/* * Copyright 2018-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 javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StartChatContactRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The identifier of the Amazon Connect instance. You can find the instance ID in * the Amazon Resource Name (ARN) of the instance. *

*/ 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 *

*/ 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 attributes; /** *

* 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. *

*/ 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). *

*/ 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. *

*
*/ private java.util.List supportedMessagingContentTypes; /** *

* 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. *

*
*/ 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. *

* * @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. *

* * @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 this.instanceId; } /** *

* The identifier of the Amazon Connect instance. You can find the instance ID in * the Amazon Resource Name (ARN) of the instance. *

* * @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 Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withInstanceId(String instanceId) { setInstanceId(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 *

* * @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 *

* * @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 this.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 *

* * @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 Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withContactFlowId(String contactFlowId) { setContactFlowId(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 getAttributes() { return 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. *

* * @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 attributes) { this.attributes = 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. *

* * @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 Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withAttributes(java.util.Map attributes) { setAttributes(attributes); return this; } /** * Add a single Attributes entry * * @see StartChatContactRequest#withAttributes * @returns a reference to this 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(); } if (this.attributes.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.attributes.put(key, value); return this; } /** * Removes all the entries added into Attributes. * * @return 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. *

* * @param participantDetails * Information identifying the participant. */ public void setParticipantDetails(ParticipantDetails participantDetails) { this.participantDetails = participantDetails; } /** *

* Information identifying the participant. *

* * @return Information identifying the participant. */ public ParticipantDetails getParticipantDetails() { return this.participantDetails; } /** *

* Information identifying the participant. *

* * @param participantDetails * Information identifying the participant. * @return Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withParticipantDetails(ParticipantDetails participantDetails) { setParticipantDetails(participantDetails); return this; } /** *

* The initial message to be sent to the newly created chat. *

* * @param initialMessage * The initial message to be sent to the newly created chat. */ public void setInitialMessage(ChatMessage initialMessage) { this.initialMessage = initialMessage; } /** *

* The initial message to be sent to the newly created chat. *

* * @return The initial message to be sent to the newly created chat. */ public ChatMessage getInitialMessage() { return this.initialMessage; } /** *

* The initial message to be sent to the newly created chat. *

* * @param initialMessage * The initial message to be sent to the newly created chat. * @return Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withInitialMessage(ChatMessage initialMessage) { setInitialMessage(initialMessage); return this; } /** *

* 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. *

* * @param 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. */ public void setClientToken(String clientToken) { this.clientToken = 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. *

* * @return 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. */ public String getClientToken() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* 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). *

* * @param 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). */ public void setChatDurationInMinutes(Integer chatDurationInMinutes) { this.chatDurationInMinutes = 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). *

* * @return 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). */ public Integer getChatDurationInMinutes() { return this.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). *

* * @param 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). * @return Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withChatDurationInMinutes(Integer chatDurationInMinutes) { setChatDurationInMinutes(chatDurationInMinutes); return this; } /** *

* 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. *

*
* * @return 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 java.util.List getSupportedMessagingContentTypes() { return 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. *

*
* * @param 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 void setSupportedMessagingContentTypes(java.util.Collection supportedMessagingContentTypes) { if (supportedMessagingContentTypes == null) { this.supportedMessagingContentTypes = null; return; } this.supportedMessagingContentTypes = new java.util.ArrayList(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. *

*
*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSupportedMessagingContentTypes(java.util.Collection)} or * {@link #withSupportedMessagingContentTypes(java.util.Collection)} if you want to override the existing values. *

* * @param 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withSupportedMessagingContentTypes(String... supportedMessagingContentTypes) { if (this.supportedMessagingContentTypes == null) { setSupportedMessagingContentTypes(new java.util.ArrayList(supportedMessagingContentTypes.length)); } for (String ele : supportedMessagingContentTypes) { this.supportedMessagingContentTypes.add(ele); } return this; } /** *

* 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. *

*
* * @param 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withSupportedMessagingContentTypes(java.util.Collection supportedMessagingContentTypes) { setSupportedMessagingContentTypes(supportedMessagingContentTypes); return this; } /** *

* 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. *

* * @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. */ public void setPersistentChat(PersistentChat persistentChat) { this.persistentChat = 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. *

* * @return 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 getPersistentChat() { return this.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. *

* * @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. * @return Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withPersistentChat(PersistentChat persistentChat) { setPersistentChat(persistentChat); return this; } /** *

* 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. *

*
* * @param 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. *

*/ public void setRelatedContactId(String relatedContactId) { this.relatedContactId = 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. *

*
* * @return 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. *

*/ public String getRelatedContactId() { return this.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. *

*
* * @param 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartChatContactRequest withRelatedContactId(String relatedContactId) { setRelatedContactId(relatedContactId); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getContactFlowId() != null) sb.append("ContactFlowId: ").append(getContactFlowId()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()).append(","); if (getParticipantDetails() != null) sb.append("ParticipantDetails: ").append(getParticipantDetails()).append(","); if (getInitialMessage() != null) sb.append("InitialMessage: ").append(getInitialMessage()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getChatDurationInMinutes() != null) sb.append("ChatDurationInMinutes: ").append(getChatDurationInMinutes()).append(","); if (getSupportedMessagingContentTypes() != null) sb.append("SupportedMessagingContentTypes: ").append(getSupportedMessagingContentTypes()).append(","); if (getPersistentChat() != null) sb.append("PersistentChat: ").append(getPersistentChat()).append(","); if (getRelatedContactId() != null) sb.append("RelatedContactId: ").append(getRelatedContactId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartChatContactRequest == false) return false; StartChatContactRequest other = (StartChatContactRequest) obj; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getContactFlowId() == null ^ this.getContactFlowId() == null) return false; if (other.getContactFlowId() != null && other.getContactFlowId().equals(this.getContactFlowId()) == false) return false; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false) return false; if (other.getParticipantDetails() == null ^ this.getParticipantDetails() == null) return false; if (other.getParticipantDetails() != null && other.getParticipantDetails().equals(this.getParticipantDetails()) == false) return false; if (other.getInitialMessage() == null ^ this.getInitialMessage() == null) return false; if (other.getInitialMessage() != null && other.getInitialMessage().equals(this.getInitialMessage()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getChatDurationInMinutes() == null ^ this.getChatDurationInMinutes() == null) return false; if (other.getChatDurationInMinutes() != null && other.getChatDurationInMinutes().equals(this.getChatDurationInMinutes()) == false) return false; if (other.getSupportedMessagingContentTypes() == null ^ this.getSupportedMessagingContentTypes() == null) return false; if (other.getSupportedMessagingContentTypes() != null && other.getSupportedMessagingContentTypes().equals(this.getSupportedMessagingContentTypes()) == false) return false; if (other.getPersistentChat() == null ^ this.getPersistentChat() == null) return false; if (other.getPersistentChat() != null && other.getPersistentChat().equals(this.getPersistentChat()) == false) return false; if (other.getRelatedContactId() == null ^ this.getRelatedContactId() == null) return false; if (other.getRelatedContactId() != null && other.getRelatedContactId().equals(this.getRelatedContactId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getContactFlowId() == null) ? 0 : getContactFlowId().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getParticipantDetails() == null) ? 0 : getParticipantDetails().hashCode()); hashCode = prime * hashCode + ((getInitialMessage() == null) ? 0 : getInitialMessage().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getChatDurationInMinutes() == null) ? 0 : getChatDurationInMinutes().hashCode()); hashCode = prime * hashCode + ((getSupportedMessagingContentTypes() == null) ? 0 : getSupportedMessagingContentTypes().hashCode()); hashCode = prime * hashCode + ((getPersistentChat() == null) ? 0 : getPersistentChat().hashCode()); hashCode = prime * hashCode + ((getRelatedContactId() == null) ? 0 : getRelatedContactId().hashCode()); return hashCode; } @Override public StartChatContactRequest clone() { return (StartChatContactRequest) super.clone(); } }