/* * 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 StartTaskContactRequest 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 previous chat, voice, or task contact. *

*/ private String previousContactId; /** *

* The identifier of the flow for initiating the tasks. 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, and 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; /** *

* The name of a task that is shown to an agent in the Contact Control Panel (CCP). *

*/ private String name; /** *

* A formatted URL that is shown to an agent in the Contact Control Panel (CCP). *

*/ private java.util.Map references; /** *

* A description of the task that is shown to an agent in the Contact Control Panel (CCP). *

*/ private String description; /** *

* 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 timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time * cannot be in the past. It must be within up to 6 days in future. *

*/ private java.util.Date scheduledTime; /** *

* A unique identifier for the task template. *

*/ private String taskTemplateId; /** *

* The identifier for the quick connect. *

*/ private String quickConnectId; /** *

* The contactId that is related to this contact. *

*/ 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 StartTaskContactRequest withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** *

* The identifier of the previous chat, voice, or task contact. *

* * @param previousContactId * The identifier of the previous chat, voice, or task contact. */ public void setPreviousContactId(String previousContactId) { this.previousContactId = previousContactId; } /** *

* The identifier of the previous chat, voice, or task contact. *

* * @return The identifier of the previous chat, voice, or task contact. */ public String getPreviousContactId() { return this.previousContactId; } /** *

* The identifier of the previous chat, voice, or task contact. *

* * @param previousContactId * The identifier of the previous chat, voice, or task contact. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest withPreviousContactId(String previousContactId) { setPreviousContactId(previousContactId); return this; } /** *

* The identifier of the flow for initiating the tasks. 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 tasks. 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 tasks. 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 tasks. 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 tasks. 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 tasks. 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 StartTaskContactRequest withContactFlowId(String contactFlowId) { setContactFlowId(contactFlowId); return this; } /** *

* A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and 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, * and 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, and 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, and * 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, and 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, and * 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 StartTaskContactRequest withAttributes(java.util.Map attributes) { setAttributes(attributes); return this; } /** * Add a single Attributes entry * * @see StartTaskContactRequest#withAttributes * @returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest 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 StartTaskContactRequest clearAttributesEntries() { this.attributes = null; return this; } /** *

* The name of a task that is shown to an agent in the Contact Control Panel (CCP). *

* * @param name * The name of a task that is shown to an agent in the Contact Control Panel (CCP). */ public void setName(String name) { this.name = name; } /** *

* The name of a task that is shown to an agent in the Contact Control Panel (CCP). *

* * @return The name of a task that is shown to an agent in the Contact Control Panel (CCP). */ public String getName() { return this.name; } /** *

* The name of a task that is shown to an agent in the Contact Control Panel (CCP). *

* * @param name * The name of a task that is shown to an agent in the Contact Control Panel (CCP). * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest withName(String name) { setName(name); return this; } /** *

* A formatted URL that is shown to an agent in the Contact Control Panel (CCP). *

* * @return A formatted URL that is shown to an agent in the Contact Control Panel (CCP). */ public java.util.Map getReferences() { return references; } /** *

* A formatted URL that is shown to an agent in the Contact Control Panel (CCP). *

* * @param references * A formatted URL that is shown to an agent in the Contact Control Panel (CCP). */ public void setReferences(java.util.Map references) { this.references = references; } /** *

* A formatted URL that is shown to an agent in the Contact Control Panel (CCP). *

* * @param references * A formatted URL that is shown to an agent in the Contact Control Panel (CCP). * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest withReferences(java.util.Map references) { setReferences(references); return this; } /** * Add a single References entry * * @see StartTaskContactRequest#withReferences * @returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest addReferencesEntry(String key, Reference value) { if (null == this.references) { this.references = new java.util.HashMap(); } if (this.references.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.references.put(key, value); return this; } /** * Removes all the entries added into References. * * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest clearReferencesEntries() { this.references = null; return this; } /** *

* A description of the task that is shown to an agent in the Contact Control Panel (CCP). *

* * @param description * A description of the task that is shown to an agent in the Contact Control Panel (CCP). */ public void setDescription(String description) { this.description = description; } /** *

* A description of the task that is shown to an agent in the Contact Control Panel (CCP). *

* * @return A description of the task that is shown to an agent in the Contact Control Panel (CCP). */ public String getDescription() { return this.description; } /** *

* A description of the task that is shown to an agent in the Contact Control Panel (CCP). *

* * @param description * A description of the task that is shown to an agent in the Contact Control Panel (CCP). * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest withDescription(String description) { setDescription(description); 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 StartTaskContactRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time * cannot be in the past. It must be within up to 6 days in future. *

* * @param scheduledTime * The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled * time cannot be in the past. It must be within up to 6 days in future. */ public void setScheduledTime(java.util.Date scheduledTime) { this.scheduledTime = scheduledTime; } /** *

* The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time * cannot be in the past. It must be within up to 6 days in future. *

* * @return The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled * time cannot be in the past. It must be within up to 6 days in future. */ public java.util.Date getScheduledTime() { return this.scheduledTime; } /** *

* The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time * cannot be in the past. It must be within up to 6 days in future. *

* * @param scheduledTime * The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled * time cannot be in the past. It must be within up to 6 days in future. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest withScheduledTime(java.util.Date scheduledTime) { setScheduledTime(scheduledTime); return this; } /** *

* A unique identifier for the task template. *

* * @param taskTemplateId * A unique identifier for the task template. */ public void setTaskTemplateId(String taskTemplateId) { this.taskTemplateId = taskTemplateId; } /** *

* A unique identifier for the task template. *

* * @return A unique identifier for the task template. */ public String getTaskTemplateId() { return this.taskTemplateId; } /** *

* A unique identifier for the task template. *

* * @param taskTemplateId * A unique identifier for the task template. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest withTaskTemplateId(String taskTemplateId) { setTaskTemplateId(taskTemplateId); return this; } /** *

* The identifier for the quick connect. *

* * @param quickConnectId * The identifier for the quick connect. */ public void setQuickConnectId(String quickConnectId) { this.quickConnectId = quickConnectId; } /** *

* The identifier for the quick connect. *

* * @return The identifier for the quick connect. */ public String getQuickConnectId() { return this.quickConnectId; } /** *

* The identifier for the quick connect. *

* * @param quickConnectId * The identifier for the quick connect. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest withQuickConnectId(String quickConnectId) { setQuickConnectId(quickConnectId); return this; } /** *

* The contactId that is related to this contact. *

* * @param relatedContactId * The contactId that is related to this * contact. */ public void setRelatedContactId(String relatedContactId) { this.relatedContactId = relatedContactId; } /** *

* The contactId that is related to this contact. *

* * @return The contactId that is related to this * contact. */ public String getRelatedContactId() { return this.relatedContactId; } /** *

* The contactId that is related to this contact. *

* * @param relatedContactId * The contactId that is related to this * contact. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTaskContactRequest 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 (getPreviousContactId() != null) sb.append("PreviousContactId: ").append(getPreviousContactId()).append(","); if (getContactFlowId() != null) sb.append("ContactFlowId: ").append(getContactFlowId()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getReferences() != null) sb.append("References: ").append(getReferences()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getScheduledTime() != null) sb.append("ScheduledTime: ").append(getScheduledTime()).append(","); if (getTaskTemplateId() != null) sb.append("TaskTemplateId: ").append(getTaskTemplateId()).append(","); if (getQuickConnectId() != null) sb.append("QuickConnectId: ").append(getQuickConnectId()).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 StartTaskContactRequest == false) return false; StartTaskContactRequest other = (StartTaskContactRequest) obj; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getPreviousContactId() == null ^ this.getPreviousContactId() == null) return false; if (other.getPreviousContactId() != null && other.getPreviousContactId().equals(this.getPreviousContactId()) == 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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getReferences() == null ^ this.getReferences() == null) return false; if (other.getReferences() != null && other.getReferences().equals(this.getReferences()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.getScheduledTime() == null ^ this.getScheduledTime() == null) return false; if (other.getScheduledTime() != null && other.getScheduledTime().equals(this.getScheduledTime()) == false) return false; if (other.getTaskTemplateId() == null ^ this.getTaskTemplateId() == null) return false; if (other.getTaskTemplateId() != null && other.getTaskTemplateId().equals(this.getTaskTemplateId()) == false) return false; if (other.getQuickConnectId() == null ^ this.getQuickConnectId() == null) return false; if (other.getQuickConnectId() != null && other.getQuickConnectId().equals(this.getQuickConnectId()) == 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 + ((getPreviousContactId() == null) ? 0 : getPreviousContactId().hashCode()); hashCode = prime * hashCode + ((getContactFlowId() == null) ? 0 : getContactFlowId().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getReferences() == null) ? 0 : getReferences().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getScheduledTime() == null) ? 0 : getScheduledTime().hashCode()); hashCode = prime * hashCode + ((getTaskTemplateId() == null) ? 0 : getTaskTemplateId().hashCode()); hashCode = prime * hashCode + ((getQuickConnectId() == null) ? 0 : getQuickConnectId().hashCode()); hashCode = prime * hashCode + ((getRelatedContactId() == null) ? 0 : getRelatedContactId().hashCode()); return hashCode; } @Override public StartTaskContactRequest clone() { return (StartTaskContactRequest) super.clone(); } }