public static interface MessageRequest.Builder extends SdkPojo, CopyableBuilder<MessageRequest.Builder,MessageRequest>
Modifier and Type | Method and Description |
---|---|
MessageRequest.Builder |
addresses(Map<String,AddressConfiguration> addresses)
A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object.
|
MessageRequest.Builder |
context(Map<String,String> context)
A map of custom attributes to attributes to be attached to the message.
|
MessageRequest.Builder |
endpoints(Map<String,EndpointSendConfiguration> endpoints)
A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration
object.
|
default MessageRequest.Builder |
messageConfiguration(Consumer<DirectMessageConfiguration.Builder> messageConfiguration)
Message configuration.
|
MessageRequest.Builder |
messageConfiguration(DirectMessageConfiguration messageConfiguration)
Message configuration.
|
MessageRequest.Builder |
traceId(String traceId)
A unique ID that you can use to trace a message.
|
copy
applyMutation, build
MessageRequest.Builder addresses(Map<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.MessageRequest.Builder context(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.MessageRequest.Builder endpoints(Map<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.MessageRequest.Builder messageConfiguration(DirectMessageConfiguration messageConfiguration)
messageConfiguration
- Message configuration.default MessageRequest.Builder messageConfiguration(Consumer<DirectMessageConfiguration.Builder> messageConfiguration)
DirectMessageConfiguration.Builder
avoiding the need to create one manually via
DirectMessageConfiguration.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately
and its result is passed to messageConfiguration(DirectMessageConfiguration)
.messageConfiguration
- a consumer that will call methods on DirectMessageConfiguration.Builder
messageConfiguration(DirectMessageConfiguration)
MessageRequest.Builder traceId(String traceId)
traceId
- A unique ID that you can use to trace a message. This ID is visible to recipients.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.