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

* Places an outbound call to a contact, and then initiates the flow. It * performs the actions in the flow that's specified (in * ContactFlowId). *

*

* Agents do not initiate the outbound API, which means that they do not dial * the contact. If the flow places an outbound call to a contact, and then puts * the contact in queue, the call is then routed to the agent, like any other * inbound case. *

*

* There is a 60-second dialing timeout for this operation. If the call is not * connected after 60 seconds, it fails. *

* *

* UK numbers with a 447 prefix are not allowed by default. Before you can dial * these UK mobile numbers, you must submit a service quota increase request. * For more information, see Amazon Connect Service Quotas in the Amazon Connect Administrator * Guide. *

*
*

* Campaign calls are not allowed by default. Before you can make a call with * TrafficType = CAMPAIGN, you must submit a service * quota increase request to the quota Amazon Connect campaigns. *

*
*/ public class StartOutboundVoiceContactRequest extends AmazonWebServiceRequest implements Serializable { /** *

* The phone number of the customer, in E.164 format. *

*

* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
*/ private String destinationPhoneNumber; /** *

* The identifier of the flow for the outbound call. 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; /** *

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

* 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 token is valid for 7 * days after creation. If a contact is already started, the contact ID is * returned. *

*

* Constraints:
* Length: - 500
*/ private String clientToken; /** *

* The phone number associated with the Amazon Connect instance, in E.164 * format. If you do not specify a source phone number, you must specify a * queue. *

*

* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
*/ private String sourcePhoneNumber; /** *

* The queue for the call. If you specify a queue, the phone displayed for * caller ID is the phone number specified in the queue. If you do not * specify a queue, the queue defined in the flow is used. If you do not * specify a queue, you must specify a source phone number. *

*/ private String queueId; /** *

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

* Configuration of the answering machine detection for this outbound call. *

*/ private AnswerMachineDetectionConfig answerMachineDetectionConfig; /** *

* The campaign identifier of the outbound communication. *

*

* Constraints:
* Length: 1 - 100
*/ private String campaignId; /** *

* Denotes the class of traffic. Calls with different traffic types are * handled differently by Amazon Connect. The default value is * GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to true. * For all other cases, use GENERAL. *

*

* Constraints:
* Allowed Values: GENERAL, CAMPAIGN */ private String trafficType; /** *

* The phone number of the customer, in E.164 format. *

*

* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
* * @return

* The phone number of the customer, in E.164 format. *

*/ public String getDestinationPhoneNumber() { return destinationPhoneNumber; } /** *

* The phone number of the customer, in E.164 format. *

*

* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
* * @param destinationPhoneNumber

* The phone number of the customer, in E.164 format. *

*/ public void setDestinationPhoneNumber(String destinationPhoneNumber) { this.destinationPhoneNumber = destinationPhoneNumber; } /** *

* The phone number of the customer, in E.164 format. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
* * @param destinationPhoneNumber

* The phone number of the customer, in E.164 format. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StartOutboundVoiceContactRequest withDestinationPhoneNumber(String destinationPhoneNumber) { this.destinationPhoneNumber = destinationPhoneNumber; return this; } /** *

* The identifier of the flow for the outbound call. 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 the outbound call. 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 the outbound call. 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 the outbound call. 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 the outbound call. 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 the outbound call. 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 StartOutboundVoiceContactRequest withContactFlowId(String contactFlowId) { this.contactFlowId = contactFlowId; return this; } /** *

* 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 StartOutboundVoiceContactRequest withInstanceId(String instanceId) { this.instanceId = instanceId; 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. The token is valid for 7 * days after creation. If a contact is already started, the contact ID is * returned. *

*

* Constraints:
* Length: - 500
* * @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. The token is valid * for 7 days after creation. If a contact is already started, the * contact ID is returned. *

*/ public String getClientToken() { return 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. The token is valid for 7 * days after creation. If a contact is already started, the contact ID is * returned. *

*

* Constraints:
* Length: - 500
* * @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. The token is * valid for 7 days after creation. If a contact is already * started, the contact ID is returned. *

*/ 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. The token is valid for 7 * days after creation. If a contact is already started, the contact ID is * returned. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: - 500
* * @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. The token is * valid for 7 days after creation. If a contact is already * started, the contact ID is returned. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StartOutboundVoiceContactRequest withClientToken(String clientToken) { this.clientToken = clientToken; return this; } /** *

* The phone number associated with the Amazon Connect instance, in E.164 * format. If you do not specify a source phone number, you must specify a * queue. *

*

* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
* * @return

* The phone number associated with the Amazon Connect instance, in * E.164 format. If you do not specify a source phone number, you * must specify a queue. *

*/ public String getSourcePhoneNumber() { return sourcePhoneNumber; } /** *

* The phone number associated with the Amazon Connect instance, in E.164 * format. If you do not specify a source phone number, you must specify a * queue. *

*

* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
* * @param sourcePhoneNumber

* The phone number associated with the Amazon Connect instance, * in E.164 format. If you do not specify a source phone number, * you must specify a queue. *

*/ public void setSourcePhoneNumber(String sourcePhoneNumber) { this.sourcePhoneNumber = sourcePhoneNumber; } /** *

* The phone number associated with the Amazon Connect instance, in E.164 * format. If you do not specify a source phone number, you must specify a * queue. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Pattern: \\+[1-9]\\d{1,14}$
* * @param sourcePhoneNumber

* The phone number associated with the Amazon Connect instance, * in E.164 format. If you do not specify a source phone number, * you must specify a queue. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StartOutboundVoiceContactRequest withSourcePhoneNumber(String sourcePhoneNumber) { this.sourcePhoneNumber = sourcePhoneNumber; return this; } /** *

* The queue for the call. If you specify a queue, the phone displayed for * caller ID is the phone number specified in the queue. If you do not * specify a queue, the queue defined in the flow is used. If you do not * specify a queue, you must specify a source phone number. *

* * @return

* The queue for the call. If you specify a queue, the phone * displayed for caller ID is the phone number specified in the * queue. If you do not specify a queue, the queue defined in the * flow is used. If you do not specify a queue, you must specify a * source phone number. *

*/ public String getQueueId() { return queueId; } /** *

* The queue for the call. If you specify a queue, the phone displayed for * caller ID is the phone number specified in the queue. If you do not * specify a queue, the queue defined in the flow is used. If you do not * specify a queue, you must specify a source phone number. *

* * @param queueId

* The queue for the call. If you specify a queue, the phone * displayed for caller ID is the phone number specified in the * queue. If you do not specify a queue, the queue defined in the * flow is used. If you do not specify a queue, you must specify * a source phone number. *

*/ public void setQueueId(String queueId) { this.queueId = queueId; } /** *

* The queue for the call. If you specify a queue, the phone displayed for * caller ID is the phone number specified in the queue. If you do not * specify a queue, the queue defined in the flow is used. If you do not * specify a queue, you must specify a source phone number. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param queueId

* The queue for the call. If you specify a queue, the phone * displayed for caller ID is the phone number specified in the * queue. If you do not specify a queue, the queue defined in the * flow is used. If you do not specify a queue, you must specify * a source phone number. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StartOutboundVoiceContactRequest withQueueId(String queueId) { this.queueId = queueId; 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. *

*

* 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, 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 reference to this updated object so that method calls can be * chained together. */ public StartOutboundVoiceContactRequest withAttributes(java.util.Map attributes) { this.attributes = attributes; 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. *

*

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

* Returns a reference to this object so that method calls can be chained * together. */ public StartOutboundVoiceContactRequest clearAttributesEntries() { this.attributes = null; return this; } /** *

* Configuration of the answering machine detection for this outbound call. *

* * @return

* Configuration of the answering machine detection for this * outbound call. *

*/ public AnswerMachineDetectionConfig getAnswerMachineDetectionConfig() { return answerMachineDetectionConfig; } /** *

* Configuration of the answering machine detection for this outbound call. *

* * @param answerMachineDetectionConfig

* Configuration of the answering machine detection for this * outbound call. *

*/ public void setAnswerMachineDetectionConfig( AnswerMachineDetectionConfig answerMachineDetectionConfig) { this.answerMachineDetectionConfig = answerMachineDetectionConfig; } /** *

* Configuration of the answering machine detection for this outbound call. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param answerMachineDetectionConfig

* Configuration of the answering machine detection for this * outbound call. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StartOutboundVoiceContactRequest withAnswerMachineDetectionConfig( AnswerMachineDetectionConfig answerMachineDetectionConfig) { this.answerMachineDetectionConfig = answerMachineDetectionConfig; return this; } /** *

* The campaign identifier of the outbound communication. *

*

* Constraints:
* Length: 1 - 100
* * @return

* The campaign identifier of the outbound communication. *

*/ public String getCampaignId() { return campaignId; } /** *

* The campaign identifier of the outbound communication. *

*

* Constraints:
* Length: 1 - 100
* * @param campaignId

* The campaign identifier of the outbound communication. *

*/ public void setCampaignId(String campaignId) { this.campaignId = campaignId; } /** *

* The campaign identifier of the outbound communication. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 100
* * @param campaignId

* The campaign identifier of the outbound communication. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StartOutboundVoiceContactRequest withCampaignId(String campaignId) { this.campaignId = campaignId; return this; } /** *

* Denotes the class of traffic. Calls with different traffic types are * handled differently by Amazon Connect. The default value is * GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to true. * For all other cases, use GENERAL. *

*

* Constraints:
* Allowed Values: GENERAL, CAMPAIGN * * @return

* Denotes the class of traffic. Calls with different traffic types * are handled differently by Amazon Connect. The default value is * GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to * true. For all other cases, use GENERAL. *

* @see TrafficType */ public String getTrafficType() { return trafficType; } /** *

* Denotes the class of traffic. Calls with different traffic types are * handled differently by Amazon Connect. The default value is * GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to true. * For all other cases, use GENERAL. *

*

* Constraints:
* Allowed Values: GENERAL, CAMPAIGN * * @param trafficType

* Denotes the class of traffic. Calls with different traffic * types are handled differently by Amazon Connect. The default * value is GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to * true. For all other cases, use * GENERAL. *

* @see TrafficType */ public void setTrafficType(String trafficType) { this.trafficType = trafficType; } /** *

* Denotes the class of traffic. Calls with different traffic types are * handled differently by Amazon Connect. The default value is * GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to true. * For all other cases, use GENERAL. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: GENERAL, CAMPAIGN * * @param trafficType

* Denotes the class of traffic. Calls with different traffic * types are handled differently by Amazon Connect. The default * value is GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to * true. For all other cases, use * GENERAL. *

* @return A reference to this updated object so that method calls can be * chained together. * @see TrafficType */ public StartOutboundVoiceContactRequest withTrafficType(String trafficType) { this.trafficType = trafficType; return this; } /** *

* Denotes the class of traffic. Calls with different traffic types are * handled differently by Amazon Connect. The default value is * GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to true. * For all other cases, use GENERAL. *

*

* Constraints:
* Allowed Values: GENERAL, CAMPAIGN * * @param trafficType

* Denotes the class of traffic. Calls with different traffic * types are handled differently by Amazon Connect. The default * value is GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to * true. For all other cases, use * GENERAL. *

* @see TrafficType */ public void setTrafficType(TrafficType trafficType) { this.trafficType = trafficType.toString(); } /** *

* Denotes the class of traffic. Calls with different traffic types are * handled differently by Amazon Connect. The default value is * GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to true. * For all other cases, use GENERAL. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: GENERAL, CAMPAIGN * * @param trafficType

* Denotes the class of traffic. Calls with different traffic * types are handled differently by Amazon Connect. The default * value is GENERAL. Use CAMPAIGN if * EnableAnswerMachineDetection is set to * true. For all other cases, use * GENERAL. *

* @return A reference to this updated object so that method calls can be * chained together. * @see TrafficType */ public StartOutboundVoiceContactRequest withTrafficType(TrafficType trafficType) { this.trafficType = trafficType.toString(); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDestinationPhoneNumber() != null) sb.append("DestinationPhoneNumber: " + getDestinationPhoneNumber() + ","); if (getContactFlowId() != null) sb.append("ContactFlowId: " + getContactFlowId() + ","); if (getInstanceId() != null) sb.append("InstanceId: " + getInstanceId() + ","); if (getClientToken() != null) sb.append("ClientToken: " + getClientToken() + ","); if (getSourcePhoneNumber() != null) sb.append("SourcePhoneNumber: " + getSourcePhoneNumber() + ","); if (getQueueId() != null) sb.append("QueueId: " + getQueueId() + ","); if (getAttributes() != null) sb.append("Attributes: " + getAttributes() + ","); if (getAnswerMachineDetectionConfig() != null) sb.append("AnswerMachineDetectionConfig: " + getAnswerMachineDetectionConfig() + ","); if (getCampaignId() != null) sb.append("CampaignId: " + getCampaignId() + ","); if (getTrafficType() != null) sb.append("TrafficType: " + getTrafficType()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDestinationPhoneNumber() == null) ? 0 : getDestinationPhoneNumber() .hashCode()); hashCode = prime * hashCode + ((getContactFlowId() == null) ? 0 : getContactFlowId().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getSourcePhoneNumber() == null) ? 0 : getSourcePhoneNumber().hashCode()); hashCode = prime * hashCode + ((getQueueId() == null) ? 0 : getQueueId().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getAnswerMachineDetectionConfig() == null) ? 0 : getAnswerMachineDetectionConfig().hashCode()); hashCode = prime * hashCode + ((getCampaignId() == null) ? 0 : getCampaignId().hashCode()); hashCode = prime * hashCode + ((getTrafficType() == null) ? 0 : getTrafficType().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartOutboundVoiceContactRequest == false) return false; StartOutboundVoiceContactRequest other = (StartOutboundVoiceContactRequest) obj; if (other.getDestinationPhoneNumber() == null ^ this.getDestinationPhoneNumber() == null) return false; if (other.getDestinationPhoneNumber() != null && other.getDestinationPhoneNumber().equals(this.getDestinationPhoneNumber()) == 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.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == 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.getSourcePhoneNumber() == null ^ this.getSourcePhoneNumber() == null) return false; if (other.getSourcePhoneNumber() != null && other.getSourcePhoneNumber().equals(this.getSourcePhoneNumber()) == false) return false; if (other.getQueueId() == null ^ this.getQueueId() == null) return false; if (other.getQueueId() != null && other.getQueueId().equals(this.getQueueId()) == 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.getAnswerMachineDetectionConfig() == null ^ this.getAnswerMachineDetectionConfig() == null) return false; if (other.getAnswerMachineDetectionConfig() != null && other.getAnswerMachineDetectionConfig().equals( this.getAnswerMachineDetectionConfig()) == false) return false; if (other.getCampaignId() == null ^ this.getCampaignId() == null) return false; if (other.getCampaignId() != null && other.getCampaignId().equals(this.getCampaignId()) == false) return false; if (other.getTrafficType() == null ^ this.getTrafficType() == null) return false; if (other.getTrafficType() != null && other.getTrafficType().equals(this.getTrafficType()) == false) return false; return true; } }