public class MessageRequest extends Object implements Serializable
| Constructor and Description |
|---|
MessageRequest() |
| Modifier and Type | Method and Description |
|---|---|
MessageRequest |
addAddressesEntry(String key,
AddressConfiguration value)
A map of destination addresses, with the address as the key(Email
address, phone number or push token) and the Address Configuration as the
value.
|
MessageRequest |
addContextEntry(String key,
String value)
A map of custom attributes to attributes to be attached to the message.
|
MessageRequest |
addEndpointsEntry(String key,
EndpointSendConfiguration value)
A map of destination addresses, with the address as the key(Email
address, phone number or push token) and the Address Configuration as the
value.
|
MessageRequest |
clearAddressesEntries()
Removes all the entries added into Addresses.
|
MessageRequest |
clearContextEntries()
Removes all the entries added into Context.
|
MessageRequest |
clearEndpointsEntries()
Removes all the entries added into Endpoints.
|
boolean |
equals(Object obj) |
Map<String,AddressConfiguration> |
getAddresses()
A map of destination addresses, with the address as the key(Email
address, phone number or push token) and the Address Configuration as the
value.
|
Map<String,String> |
getContext()
A map of custom attributes to attributes to be attached to the message.
|
Map<String,EndpointSendConfiguration> |
getEndpoints()
A map of destination addresses, with the address as the key(Email
address, phone number or push token) and the Address Configuration as the
value.
|
DirectMessageConfiguration |
getMessageConfiguration()
Message configuration.
|
int |
hashCode() |
void |
setAddresses(Map<String,AddressConfiguration> addresses)
A map of destination addresses, with the address as the key(Email
address, phone number or push token) and the Address Configuration as the
value.
|
void |
setContext(Map<String,String> context)
A map of custom attributes to attributes to be attached to the message.
|
void |
setEndpoints(Map<String,EndpointSendConfiguration> endpoints)
A map of destination addresses, with the address as the key(Email
address, phone number or push token) and the Address Configuration as the
value.
|
void |
setMessageConfiguration(DirectMessageConfiguration messageConfiguration)
Message configuration.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
MessageRequest |
withAddresses(Map<String,AddressConfiguration> addresses)
A map of destination addresses, with the address as the key(Email
address, phone number or push token) and the Address Configuration as the
value.
|
MessageRequest |
withContext(Map<String,String> context)
A map of custom attributes to attributes to be attached to the message.
|
MessageRequest |
withEndpoints(Map<String,EndpointSendConfiguration> endpoints)
A map of destination addresses, with the address as the key(Email
address, phone number or push token) and the Address Configuration as the
value.
|
MessageRequest |
withMessageConfiguration(DirectMessageConfiguration messageConfiguration)
Message configuration.
|
public Map<String,AddressConfiguration> getAddresses()
public void setAddresses(Map<String,AddressConfiguration> addresses)
addresses - A map of destination addresses, with the address as the
key(Email address, phone number or push token) and the Address
Configuration as the value.public MessageRequest withAddresses(Map<String,AddressConfiguration> addresses)
Returns a reference to this object so that method calls can be chained together.
addresses - A map of destination addresses, with the address as the
key(Email address, phone number or push token) and the Address
Configuration as the value.public MessageRequest addAddressesEntry(String key, AddressConfiguration value)
The method adds a new key-value pair into Addresses 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 Addresses.value - The corresponding value of the entry to be added into
Addresses.public MessageRequest clearAddressesEntries()
Returns a reference to this object so that method calls can be chained together.
public Map<String,String> getContext()
public void setContext(Map<String,String> context)
context - A map of custom attributes to attributes to be attached to
the message. This payload is added to the push notification's
'data.pinpoint' object or added to the email/sms delivery
receipt event attributes.public MessageRequest withContext(Map<String,String> context)
Returns a reference to this object so that method calls can be chained together.
context - A map of custom attributes to attributes to be attached to
the message. This payload is added to the push notification's
'data.pinpoint' object or added to the email/sms delivery
receipt event attributes.public MessageRequest addContextEntry(String key, String value)
The method adds a new key-value pair into Context 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 Context.value - The corresponding value of the entry to be added into
Context.public MessageRequest clearContextEntries()
Returns a reference to this object so that method calls can be chained together.
public Map<String,EndpointSendConfiguration> getEndpoints()
public void setEndpoints(Map<String,EndpointSendConfiguration> endpoints)
endpoints - A map of destination addresses, with the address as the
key(Email address, phone number or push token) and the Address
Configuration as the value.public MessageRequest withEndpoints(Map<String,EndpointSendConfiguration> endpoints)
Returns a reference to this object so that method calls can be chained together.
endpoints - A map of destination addresses, with the address as the
key(Email address, phone number or push token) and the Address
Configuration as the value.public MessageRequest addEndpointsEntry(String key, EndpointSendConfiguration value)
The method adds a new key-value pair into Endpoints 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 Endpoints.value - The corresponding value of the entry to be added into
Endpoints.public MessageRequest clearEndpointsEntries()
Returns a reference to this object so that method calls can be chained together.
public DirectMessageConfiguration getMessageConfiguration()
public void setMessageConfiguration(DirectMessageConfiguration messageConfiguration)
messageConfiguration - Message configuration.public MessageRequest withMessageConfiguration(DirectMessageConfiguration messageConfiguration)
Returns a reference to this object so that method calls can be chained together.
messageConfiguration - Message configuration.public String toString()
toString in class ObjectObject.toString()Copyright © 2018. All rights reserved.