public class VoiceMessage extends Object implements Serializable
| Constructor and Description |
|---|
VoiceMessage() |
| Modifier and Type | Method and Description |
|---|---|
VoiceMessage |
addSubstitutionsEntry(String key,
List<String> value)
Default message substitutions.
|
VoiceMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
boolean |
equals(Object obj) |
String |
getBody()
The message body of the notification, the email body or the text message.
|
String |
getLanguageCode()
Language of sent message
|
String |
getOriginationNumber()
Is the number from the pool or messaging service to send from.
|
Map<String,List<String>> |
getSubstitutions()
Default message substitutions.
|
String |
getVoiceId()
Voice ID of sent message.
|
int |
hashCode() |
void |
setBody(String body)
The message body of the notification, the email body or the text message.
|
void |
setLanguageCode(String languageCode)
Language of sent message
|
void |
setOriginationNumber(String originationNumber)
Is the number from the pool or messaging service to send from.
|
void |
setSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
void |
setVoiceId(String voiceId)
Voice ID of sent message.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
VoiceMessage |
withBody(String body)
The message body of the notification, the email body or the text message.
|
VoiceMessage |
withLanguageCode(String languageCode)
Language of sent message
|
VoiceMessage |
withOriginationNumber(String originationNumber)
Is the number from the pool or messaging service to send from.
|
VoiceMessage |
withSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
VoiceMessage |
withVoiceId(String voiceId)
Voice ID of sent message.
|
public String getBody()
public void setBody(String body)
body - The message body of the notification, the email body or the
text message.public VoiceMessage withBody(String body)
Returns a reference to this object so that method calls can be chained together.
body - The message body of the notification, the email body or the
text message.public String getLanguageCode()
public void setLanguageCode(String languageCode)
languageCode - Language of sent messagepublic VoiceMessage withLanguageCode(String languageCode)
Returns a reference to this object so that method calls can be chained together.
languageCode - Language of sent messagepublic String getOriginationNumber()
public void setOriginationNumber(String originationNumber)
originationNumber - Is the number from the pool or messaging service
to send from.public VoiceMessage withOriginationNumber(String originationNumber)
Returns a reference to this object so that method calls can be chained together.
originationNumber - Is the number from the pool or messaging service
to send from.public Map<String,List<String>> getSubstitutions()
public void setSubstitutions(Map<String,List<String>> substitutions)
substitutions - Default message substitutions. Can be overridden by
individual address substitutions.public VoiceMessage withSubstitutions(Map<String,List<String>> substitutions)
Returns a reference to this object so that method calls can be chained together.
substitutions - Default message substitutions. Can be overridden by
individual address substitutions.public VoiceMessage addSubstitutionsEntry(String key, List<String> value)
The method adds a new key-value pair into Substitutions parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Substitutions.value - The corresponding value of the entry to be added into
Substitutions.public VoiceMessage clearSubstitutionsEntries()
Returns a reference to this object so that method calls can be chained together.
public String getVoiceId()
public void setVoiceId(String voiceId)
voiceId - Voice ID of sent message.public VoiceMessage withVoiceId(String voiceId)
Returns a reference to this object so that method calls can be chained together.
voiceId - Voice ID of sent message.public String toString()
toString in class ObjectObject.toString()Copyright © 2019. All rights reserved.