public class MessageRequest
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
MessageRequest() |
Modifier and Type | Method and Description |
---|---|
MessageRequest |
addAddressesEntry(java.lang.String key,
AddressConfiguration value)
A map of key-value pairs, where each key is an address and each value is
an AddressConfiguration object.
|
MessageRequest |
addContextEntry(java.lang.String key,
java.lang.String value)
A map of custom attributes to attributes to be attached to the message.
|
MessageRequest |
addEndpointsEntry(java.lang.String key,
EndpointSendConfiguration value)
A map of key-value pairs, where each key is an endpoint ID and each value
is an EndpointSendConfiguration object.
|
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(java.lang.Object obj) |
java.util.Map<java.lang.String,AddressConfiguration> |
getAddresses()
A map of key-value pairs, where each key is an address and each value is
an AddressConfiguration object.
|
java.util.Map<java.lang.String,java.lang.String> |
getContext()
A map of custom attributes to attributes to be attached to the message.
|
java.util.Map<java.lang.String,EndpointSendConfiguration> |
getEndpoints()
A map of key-value pairs, where each key is an endpoint ID and each value
is an EndpointSendConfiguration object.
|
DirectMessageConfiguration |
getMessageConfiguration()
Message configuration.
|
java.lang.String |
getTraceId()
A unique ID that you can use to trace a message.
|
int |
hashCode() |
void |
setAddresses(java.util.Map<java.lang.String,AddressConfiguration> addresses)
A map of key-value pairs, where each key is an address and each value is
an AddressConfiguration object.
|
void |
setContext(java.util.Map<java.lang.String,java.lang.String> context)
A map of custom attributes to attributes to be attached to the message.
|
void |
setEndpoints(java.util.Map<java.lang.String,EndpointSendConfiguration> endpoints)
A map of key-value pairs, where each key is an endpoint ID and each value
is an EndpointSendConfiguration object.
|
void |
setMessageConfiguration(DirectMessageConfiguration messageConfiguration)
Message configuration.
|
void |
setTraceId(java.lang.String traceId)
A unique ID that you can use to trace a message.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
MessageRequest |
withAddresses(java.util.Map<java.lang.String,AddressConfiguration> addresses)
A map of key-value pairs, where each key is an address and each value is
an AddressConfiguration object.
|
MessageRequest |
withContext(java.util.Map<java.lang.String,java.lang.String> context)
A map of custom attributes to attributes to be attached to the message.
|
MessageRequest |
withEndpoints(java.util.Map<java.lang.String,EndpointSendConfiguration> endpoints)
A map of key-value pairs, where each key is an endpoint ID and each value
is an EndpointSendConfiguration object.
|
MessageRequest |
withMessageConfiguration(DirectMessageConfiguration messageConfiguration)
Message configuration.
|
MessageRequest |
withTraceId(java.lang.String traceId)
A unique ID that you can use to trace a message.
|
public java.util.Map<java.lang.String,AddressConfiguration> getAddresses()
public void setAddresses(java.util.Map<java.lang.String,AddressConfiguration> addresses)
addresses
- A map of key-value pairs, where each key is an address
and each value is an AddressConfiguration object. An address
can be a push notification token, a phone number, or an email
address.public MessageRequest withAddresses(java.util.Map<java.lang.String,AddressConfiguration> addresses)
Returns a reference to this object so that method calls can be chained together.
addresses
- A map of key-value pairs, where each key is an address
and each value is an AddressConfiguration object. An address
can be a push notification token, a phone number, or an email
address.public MessageRequest addAddressesEntry(java.lang.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 java.util.Map<java.lang.String,java.lang.String> getContext()
public void setContext(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.lang.String key, java.lang.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 java.util.Map<java.lang.String,EndpointSendConfiguration> getEndpoints()
public void setEndpoints(java.util.Map<java.lang.String,EndpointSendConfiguration> endpoints)
endpoints
- A map of key-value pairs, where each key is an endpoint
ID and each value is an EndpointSendConfiguration object.
Within an EndpointSendConfiguration object, you can tailor the
message for an endpoint by specifying message overrides or
substitutions.public MessageRequest withEndpoints(java.util.Map<java.lang.String,EndpointSendConfiguration> endpoints)
Returns a reference to this object so that method calls can be chained together.
endpoints
- A map of key-value pairs, where each key is an endpoint
ID and each value is an EndpointSendConfiguration object.
Within an EndpointSendConfiguration object, you can tailor the
message for an endpoint by specifying message overrides or
substitutions.public MessageRequest addEndpointsEntry(java.lang.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 java.lang.String getTraceId()
public void setTraceId(java.lang.String traceId)
traceId
- A unique ID that you can use to trace a message. This ID
is visible to recipients.public MessageRequest withTraceId(java.lang.String traceId)
Returns a reference to this object so that method calls can be chained together.
traceId
- A unique ID that you can use to trace a message. This ID
is visible to recipients.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.