@Generated(value="software.amazon.awssdk:codegen") public final class MessageRequest extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MessageRequest.Builder,MessageRequest>
Specifies the configuration and other settings for a message.
| Modifier and Type | Class and Description |
|---|---|
static interface |
MessageRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
Map<String,AddressConfiguration> |
addresses()
A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object.
|
static MessageRequest.Builder |
builder() |
Map<String,String> |
context()
A map of custom attributes to attach to the message.
|
Map<String,EndpointSendConfiguration> |
endpoints()
A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration object.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasAddresses()
For responses, this returns true if the service returned a value for the Addresses property.
|
boolean |
hasContext()
For responses, this returns true if the service returned a value for the Context property.
|
boolean |
hasEndpoints()
For responses, this returns true if the service returned a value for the Endpoints property.
|
int |
hashCode() |
DirectMessageConfiguration |
messageConfiguration()
The settings and content for the default message and any default messages that you defined for specific channels.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends MessageRequest.Builder> |
serializableBuilderClass() |
TemplateConfiguration |
templateConfiguration()
The message template to use for the message.
|
MessageRequest.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
String |
traceId()
The unique identifier for tracing the message.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final boolean hasAddresses()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final Map<String,AddressConfiguration> 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. You can use an AddressConfiguration object to tailor the message for an address by specifying settings such as content overrides and message variables.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasAddresses() method.
public final boolean hasContext()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final Map<String,String> context()
A map of custom attributes to attach to the message. For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasContext() method.
public final boolean hasEndpoints()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final Map<String,EndpointSendConfiguration> endpoints()
A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration object. You can use an EndpointSendConfiguration object to tailor the message for an endpoint by specifying settings such as content overrides and message variables.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasEndpoints() method.
public final DirectMessageConfiguration messageConfiguration()
The settings and content for the default message and any default messages that you defined for specific channels.
public final TemplateConfiguration templateConfiguration()
The message template to use for the message.
public final String traceId()
The unique identifier for tracing the message. This identifier is visible to message recipients.
public MessageRequest.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<MessageRequest.Builder,MessageRequest>public static MessageRequest.Builder builder()
public static Class<? extends MessageRequest.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.