/* * 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.pinpointsmsvoicev2.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 SendVoiceMessageRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The destination phone number in E.164 format. *
*/ private String destinationPhoneNumber; /** ** The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, * PoolId, or PoolArn. *
*/ private String originationIdentity; /** ** The text to convert to a voice message. *
*/ private String messageBody; /** ** Specifies if the MessageBody field contains text or speech synthesis markup language (SSML). *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** The voice for the Amazon Polly service to * use. By default this is set to "MATTHEW". *
*/ private String voiceId; /** ** The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn. *
*/ private String configurationSetName; /** ** The maximum amount to spend per voice message, in US dollars. *
*/ private String maxPricePerMinute; /** ** How long the voice message is valid for. By default this is 72 hours. *
*/ private Integer timeToLive; /** ** You can specify custom data in this field. If you do, that data is logged to the event destination. *
*/ private java.util.Map* When set to true, the message is checked and validated, but isn't sent to the end recipient. *
*/ private Boolean dryRun; /** ** The destination phone number in E.164 format. *
* * @param destinationPhoneNumber * The destination phone number in E.164 format. */ public void setDestinationPhoneNumber(String destinationPhoneNumber) { this.destinationPhoneNumber = destinationPhoneNumber; } /** ** The destination phone number in E.164 format. *
* * @return The destination phone number in E.164 format. */ public String getDestinationPhoneNumber() { return this.destinationPhoneNumber; } /** ** The destination phone number in E.164 format. *
* * @param destinationPhoneNumber * The destination phone number in E.164 format. * @return Returns a reference to this object so that method calls can be chained together. */ public SendVoiceMessageRequest withDestinationPhoneNumber(String destinationPhoneNumber) { setDestinationPhoneNumber(destinationPhoneNumber); return this; } /** ** The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, * PoolId, or PoolArn. *
* * @param originationIdentity * The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, * PhoneNumberArn, PoolId, or PoolArn. */ public void setOriginationIdentity(String originationIdentity) { this.originationIdentity = originationIdentity; } /** ** The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, * PoolId, or PoolArn. *
* * @return The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, * PhoneNumberArn, PoolId, or PoolArn. */ public String getOriginationIdentity() { return this.originationIdentity; } /** ** The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, * PoolId, or PoolArn. *
* * @param originationIdentity * The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, * PhoneNumberArn, PoolId, or PoolArn. * @return Returns a reference to this object so that method calls can be chained together. */ public SendVoiceMessageRequest withOriginationIdentity(String originationIdentity) { setOriginationIdentity(originationIdentity); return this; } /** ** The text to convert to a voice message. *
* * @param messageBody * The text to convert to a voice message. */ public void setMessageBody(String messageBody) { this.messageBody = messageBody; } /** ** The text to convert to a voice message. *
* * @return The text to convert to a voice message. */ public String getMessageBody() { return this.messageBody; } /** ** The text to convert to a voice message. *
* * @param messageBody * The text to convert to a voice message. * @return Returns a reference to this object so that method calls can be chained together. */ public SendVoiceMessageRequest withMessageBody(String messageBody) { setMessageBody(messageBody); return this; } /** ** Specifies if the MessageBody field contains text or speech synthesis markup language (SSML). *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** Specifies if the MessageBody field contains text or speech synthesis markup language (SSML). *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** Specifies if the MessageBody field contains text or speech synthesis markup language (SSML). *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** Specifies if the MessageBody field contains text or speech synthesis markup language (SSML). *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** TEXT: This is the default value. When used the maximum character limit is 3000. *
** SSML: When used the maximum character limit is 6000 including SSML tagging. *
** The voice for the Amazon Polly service to * use. By default this is set to "MATTHEW". *
* * @param voiceId * The voice for the Amazon Polly * service to use. By default this is set to "MATTHEW". * @see VoiceId */ public void setVoiceId(String voiceId) { this.voiceId = voiceId; } /** ** The voice for the Amazon Polly service to * use. By default this is set to "MATTHEW". *
* * @return The voice for the Amazon Polly * service to use. By default this is set to "MATTHEW". * @see VoiceId */ public String getVoiceId() { return this.voiceId; } /** ** The voice for the Amazon Polly service to * use. By default this is set to "MATTHEW". *
* * @param voiceId * The voice for the Amazon Polly * service to use. By default this is set to "MATTHEW". * @return Returns a reference to this object so that method calls can be chained together. * @see VoiceId */ public SendVoiceMessageRequest withVoiceId(String voiceId) { setVoiceId(voiceId); return this; } /** ** The voice for the Amazon Polly service to * use. By default this is set to "MATTHEW". *
* * @param voiceId * The voice for the Amazon Polly * service to use. By default this is set to "MATTHEW". * @return Returns a reference to this object so that method calls can be chained together. * @see VoiceId */ public SendVoiceMessageRequest withVoiceId(VoiceId voiceId) { this.voiceId = voiceId.toString(); return this; } /** ** The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn. *
* * @param configurationSetName * The name of the configuration set to use. This can be either the ConfigurationSetName or * ConfigurationSetArn. */ public void setConfigurationSetName(String configurationSetName) { this.configurationSetName = configurationSetName; } /** ** The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn. *
* * @return The name of the configuration set to use. This can be either the ConfigurationSetName or * ConfigurationSetArn. */ public String getConfigurationSetName() { return this.configurationSetName; } /** ** The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn. *
* * @param configurationSetName * The name of the configuration set to use. This can be either the ConfigurationSetName or * ConfigurationSetArn. * @return Returns a reference to this object so that method calls can be chained together. */ public SendVoiceMessageRequest withConfigurationSetName(String configurationSetName) { setConfigurationSetName(configurationSetName); return this; } /** ** The maximum amount to spend per voice message, in US dollars. *
* * @param maxPricePerMinute * The maximum amount to spend per voice message, in US dollars. */ public void setMaxPricePerMinute(String maxPricePerMinute) { this.maxPricePerMinute = maxPricePerMinute; } /** ** The maximum amount to spend per voice message, in US dollars. *
* * @return The maximum amount to spend per voice message, in US dollars. */ public String getMaxPricePerMinute() { return this.maxPricePerMinute; } /** ** The maximum amount to spend per voice message, in US dollars. *
* * @param maxPricePerMinute * The maximum amount to spend per voice message, in US dollars. * @return Returns a reference to this object so that method calls can be chained together. */ public SendVoiceMessageRequest withMaxPricePerMinute(String maxPricePerMinute) { setMaxPricePerMinute(maxPricePerMinute); return this; } /** ** How long the voice message is valid for. By default this is 72 hours. *
* * @param timeToLive * How long the voice message is valid for. By default this is 72 hours. */ public void setTimeToLive(Integer timeToLive) { this.timeToLive = timeToLive; } /** ** How long the voice message is valid for. By default this is 72 hours. *
* * @return How long the voice message is valid for. By default this is 72 hours. */ public Integer getTimeToLive() { return this.timeToLive; } /** ** How long the voice message is valid for. By default this is 72 hours. *
* * @param timeToLive * How long the voice message is valid for. By default this is 72 hours. * @return Returns a reference to this object so that method calls can be chained together. */ public SendVoiceMessageRequest withTimeToLive(Integer timeToLive) { setTimeToLive(timeToLive); return this; } /** ** You can specify custom data in this field. If you do, that data is logged to the event destination. *
* * @return You can specify custom data in this field. If you do, that data is logged to the event destination. */ public java.util.Map* You can specify custom data in this field. If you do, that data is logged to the event destination. *
* * @param context * You can specify custom data in this field. If you do, that data is logged to the event destination. */ public void setContext(java.util.Map* You can specify custom data in this field. If you do, that data is logged to the event destination. *
* * @param context * You can specify custom data in this field. If you do, that data is logged to the event destination. * @return Returns a reference to this object so that method calls can be chained together. */ public SendVoiceMessageRequest withContext(java.util.Map* When set to true, the message is checked and validated, but isn't sent to the end recipient. *
* * @param dryRun * When set to true, the message is checked and validated, but isn't sent to the end recipient. */ public void setDryRun(Boolean dryRun) { this.dryRun = dryRun; } /** ** When set to true, the message is checked and validated, but isn't sent to the end recipient. *
* * @return When set to true, the message is checked and validated, but isn't sent to the end recipient. */ public Boolean getDryRun() { return this.dryRun; } /** ** When set to true, the message is checked and validated, but isn't sent to the end recipient. *
* * @param dryRun * When set to true, the message is checked and validated, but isn't sent to the end recipient. * @return Returns a reference to this object so that method calls can be chained together. */ public SendVoiceMessageRequest withDryRun(Boolean dryRun) { setDryRun(dryRun); return this; } /** ** When set to true, the message is checked and validated, but isn't sent to the end recipient. *
* * @return When set to true, the message is checked and validated, but isn't sent to the end recipient. */ public Boolean isDryRun() { return this.dryRun; } /** * 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 (getDestinationPhoneNumber() != null) sb.append("DestinationPhoneNumber: ").append(getDestinationPhoneNumber()).append(","); if (getOriginationIdentity() != null) sb.append("OriginationIdentity: ").append(getOriginationIdentity()).append(","); if (getMessageBody() != null) sb.append("MessageBody: ").append(getMessageBody()).append(","); if (getMessageBodyTextType() != null) sb.append("MessageBodyTextType: ").append(getMessageBodyTextType()).append(","); if (getVoiceId() != null) sb.append("VoiceId: ").append(getVoiceId()).append(","); if (getConfigurationSetName() != null) sb.append("ConfigurationSetName: ").append(getConfigurationSetName()).append(","); if (getMaxPricePerMinute() != null) sb.append("MaxPricePerMinute: ").append(getMaxPricePerMinute()).append(","); if (getTimeToLive() != null) sb.append("TimeToLive: ").append(getTimeToLive()).append(","); if (getContext() != null) sb.append("Context: ").append(getContext()).append(","); if (getDryRun() != null) sb.append("DryRun: ").append(getDryRun()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SendVoiceMessageRequest == false) return false; SendVoiceMessageRequest other = (SendVoiceMessageRequest) obj; if (other.getDestinationPhoneNumber() == null ^ this.getDestinationPhoneNumber() == null) return false; if (other.getDestinationPhoneNumber() != null && other.getDestinationPhoneNumber().equals(this.getDestinationPhoneNumber()) == false) return false; if (other.getOriginationIdentity() == null ^ this.getOriginationIdentity() == null) return false; if (other.getOriginationIdentity() != null && other.getOriginationIdentity().equals(this.getOriginationIdentity()) == false) return false; if (other.getMessageBody() == null ^ this.getMessageBody() == null) return false; if (other.getMessageBody() != null && other.getMessageBody().equals(this.getMessageBody()) == false) return false; if (other.getMessageBodyTextType() == null ^ this.getMessageBodyTextType() == null) return false; if (other.getMessageBodyTextType() != null && other.getMessageBodyTextType().equals(this.getMessageBodyTextType()) == false) return false; if (other.getVoiceId() == null ^ this.getVoiceId() == null) return false; if (other.getVoiceId() != null && other.getVoiceId().equals(this.getVoiceId()) == false) return false; if (other.getConfigurationSetName() == null ^ this.getConfigurationSetName() == null) return false; if (other.getConfigurationSetName() != null && other.getConfigurationSetName().equals(this.getConfigurationSetName()) == false) return false; if (other.getMaxPricePerMinute() == null ^ this.getMaxPricePerMinute() == null) return false; if (other.getMaxPricePerMinute() != null && other.getMaxPricePerMinute().equals(this.getMaxPricePerMinute()) == false) return false; if (other.getTimeToLive() == null ^ this.getTimeToLive() == null) return false; if (other.getTimeToLive() != null && other.getTimeToLive().equals(this.getTimeToLive()) == false) return false; if (other.getContext() == null ^ this.getContext() == null) return false; if (other.getContext() != null && other.getContext().equals(this.getContext()) == false) return false; if (other.getDryRun() == null ^ this.getDryRun() == null) return false; if (other.getDryRun() != null && other.getDryRun().equals(this.getDryRun()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDestinationPhoneNumber() == null) ? 0 : getDestinationPhoneNumber().hashCode()); hashCode = prime * hashCode + ((getOriginationIdentity() == null) ? 0 : getOriginationIdentity().hashCode()); hashCode = prime * hashCode + ((getMessageBody() == null) ? 0 : getMessageBody().hashCode()); hashCode = prime * hashCode + ((getMessageBodyTextType() == null) ? 0 : getMessageBodyTextType().hashCode()); hashCode = prime * hashCode + ((getVoiceId() == null) ? 0 : getVoiceId().hashCode()); hashCode = prime * hashCode + ((getConfigurationSetName() == null) ? 0 : getConfigurationSetName().hashCode()); hashCode = prime * hashCode + ((getMaxPricePerMinute() == null) ? 0 : getMaxPricePerMinute().hashCode()); hashCode = prime * hashCode + ((getTimeToLive() == null) ? 0 : getTimeToLive().hashCode()); hashCode = prime * hashCode + ((getContext() == null) ? 0 : getContext().hashCode()); hashCode = prime * hashCode + ((getDryRun() == null) ? 0 : getDryRun().hashCode()); return hashCode; } @Override public SendVoiceMessageRequest clone() { return (SendVoiceMessageRequest) super.clone(); } }