Class MessageRequest
- java.lang.Object
-
- software.amazon.awssdk.services.pinpoint.model.MessageRequest
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<MessageRequest.Builder,MessageRequest>
@Generated("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.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMessageRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.Builderbuilder()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.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasAddresses()For responses, this returns true if the service returned a value for the Addresses property.booleanhasContext()For responses, this returns true if the service returned a value for the Context property.booleanhasEndpoints()For responses, this returns true if the service returned a value for the Endpoints property.inthashCode()DirectMessageConfigurationmessageConfiguration()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()TemplateConfigurationtemplateConfiguration()The message template to use for the message.MessageRequest.BuildertoBuilder()StringtoString()Returns a string representation of this object.StringtraceId()The unique identifier for tracing the message.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
hasAddresses
public final boolean hasAddresses()
For responses, this returns true if the service returned a value for the Addresses property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
addresses
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.- Returns:
- 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.
-
hasContext
public final boolean hasContext()
For responses, this returns true if the service returned a value for the Context property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
context
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.- Returns:
- 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.
-
hasEndpoints
public final boolean hasEndpoints()
For responses, this returns true if the service returned a value for the Endpoints property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
endpoints
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.- Returns:
- 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.
-
messageConfiguration
public final DirectMessageConfiguration messageConfiguration()
The settings and content for the default message and any default messages that you defined for specific channels.
- Returns:
- The settings and content for the default message and any default messages that you defined for specific channels.
-
templateConfiguration
public final TemplateConfiguration templateConfiguration()
The message template to use for the message.
- Returns:
- The message template to use for the message.
-
traceId
public final String traceId()
The unique identifier for tracing the message. This identifier is visible to message recipients.
- Returns:
- The unique identifier for tracing the message. This identifier is visible to message recipients.
-
toBuilder
public MessageRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<MessageRequest.Builder,MessageRequest>
-
builder
public static MessageRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends MessageRequest.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-