public class SMSMessage
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
SMSMessage() |
Modifier and Type | Method and Description |
---|---|
SMSMessage |
addSubstitutionsEntry(java.lang.String key,
java.util.List<java.lang.String> value)
Default message substitutions.
|
SMSMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getBody()
The body of the SMS message.
|
java.lang.String |
getKeyword()
The SMS program name that you provided to AWS Support when you requested
your dedicated number.
|
java.lang.String |
getMessageType()
Is this a transaction priority message or lower priority.
|
java.lang.String |
getOriginationNumber()
The phone number that the SMS message originates from.
|
java.lang.String |
getSenderId()
The sender ID that is shown as the message sender on the recipient's
device.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getSubstitutions()
Default message substitutions.
|
int |
hashCode() |
void |
setBody(java.lang.String body)
The body of the SMS message.
|
void |
setKeyword(java.lang.String keyword)
The SMS program name that you provided to AWS Support when you requested
your dedicated number.
|
void |
setMessageType(MessageType messageType)
Is this a transaction priority message or lower priority.
|
void |
setMessageType(java.lang.String messageType)
Is this a transaction priority message or lower priority.
|
void |
setOriginationNumber(java.lang.String originationNumber)
The phone number that the SMS message originates from.
|
void |
setSenderId(java.lang.String senderId)
The sender ID that is shown as the message sender on the recipient's
device.
|
void |
setSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
Default message substitutions.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SMSMessage |
withBody(java.lang.String body)
The body of the SMS message.
|
SMSMessage |
withKeyword(java.lang.String keyword)
The SMS program name that you provided to AWS Support when you requested
your dedicated number.
|
SMSMessage |
withMessageType(MessageType messageType)
Is this a transaction priority message or lower priority.
|
SMSMessage |
withMessageType(java.lang.String messageType)
Is this a transaction priority message or lower priority.
|
SMSMessage |
withOriginationNumber(java.lang.String originationNumber)
The phone number that the SMS message originates from.
|
SMSMessage |
withSenderId(java.lang.String senderId)
The sender ID that is shown as the message sender on the recipient's
device.
|
SMSMessage |
withSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
Default message substitutions.
|
public java.lang.String getBody()
public void setBody(java.lang.String body)
body
- The body of the SMS message.public SMSMessage withBody(java.lang.String body)
Returns a reference to this object so that method calls can be chained together.
body
- The body of the SMS message.public java.lang.String getKeyword()
public void setKeyword(java.lang.String keyword)
keyword
- The SMS program name that you provided to AWS Support when
you requested your dedicated number.public SMSMessage withKeyword(java.lang.String keyword)
Returns a reference to this object so that method calls can be chained together.
keyword
- The SMS program name that you provided to AWS Support when
you requested your dedicated number.public java.lang.String getMessageType()
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
MessageType
public void setMessageType(java.lang.String messageType)
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
messageType
- Is this a transaction priority message or lower
priority.MessageType
public SMSMessage withMessageType(java.lang.String messageType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
messageType
- Is this a transaction priority message or lower
priority.MessageType
public void setMessageType(MessageType messageType)
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
messageType
- Is this a transaction priority message or lower
priority.MessageType
public SMSMessage withMessageType(MessageType messageType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: TRANSACTIONAL, PROMOTIONAL
messageType
- Is this a transaction priority message or lower
priority.MessageType
public java.lang.String getOriginationNumber()
public void setOriginationNumber(java.lang.String originationNumber)
originationNumber
- The phone number that the SMS message originates
from. Specify one of the dedicated long codes or short codes
that you requested from AWS Support and that is assigned to
your account. If this attribute is not specified, Amazon
Pinpoint randomly assigns a long code.public SMSMessage withOriginationNumber(java.lang.String originationNumber)
Returns a reference to this object so that method calls can be chained together.
originationNumber
- The phone number that the SMS message originates
from. Specify one of the dedicated long codes or short codes
that you requested from AWS Support and that is assigned to
your account. If this attribute is not specified, Amazon
Pinpoint randomly assigns a long code.public java.lang.String getSenderId()
public void setSenderId(java.lang.String senderId)
senderId
- The sender ID that is shown as the message sender on the
recipient's device. Support for sender IDs varies by country
or region.public SMSMessage withSenderId(java.lang.String senderId)
Returns a reference to this object so that method calls can be chained together.
senderId
- The sender ID that is shown as the message sender on the
recipient's device. Support for sender IDs varies by country
or region.public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSubstitutions()
public void setSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
substitutions
- Default message substitutions. Can be overridden by
individual address substitutions.public SMSMessage withSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.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 SMSMessage addSubstitutionsEntry(java.lang.String key, java.util.List<java.lang.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 SMSMessage clearSubstitutionsEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.