Interface MessageRequest.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<MessageRequest.Builder,
,MessageRequest> SdkBuilder<MessageRequest.Builder,
,MessageRequest> SdkPojo
- Enclosing class:
MessageRequest
-
Method Summary
Modifier and TypeMethodDescriptionaddresses
(Map<String, AddressConfiguration> addresses) A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object.A map of custom attributes to attach to the message.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) The settings and content for the default message and any default messages that you defined for specific channels.messageConfiguration
(DirectMessageConfiguration messageConfiguration) The settings and content for the default message and any default messages that you defined for specific channels.default MessageRequest.Builder
templateConfiguration
(Consumer<TemplateConfiguration.Builder> templateConfiguration) The message template to use for the message.templateConfiguration
(TemplateConfiguration templateConfiguration) The message template to use for the message.The unique identifier for tracing the message.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
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.- Returns:
- 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. You can use an EndpointSendConfiguration object to tailor the message for an endpoint by specifying settings such as content overrides and message variables.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
messageConfiguration
The settings and content for the default message and any default messages that you defined for specific channels.
- Parameters:
messageConfiguration
- The settings and content for the default message and any default messages that you defined for specific channels.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
messageConfiguration
default MessageRequest.Builder messageConfiguration(Consumer<DirectMessageConfiguration.Builder> messageConfiguration) The settings and content for the default message and any default messages that you defined for specific channels.
This is a convenience method that creates an instance of theDirectMessageConfiguration.Builder
avoiding the need to create one manually viaDirectMessageConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tomessageConfiguration(DirectMessageConfiguration)
.- Parameters:
messageConfiguration
- a consumer that will call methods onDirectMessageConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
templateConfiguration
The message template to use for the message.
- Parameters:
templateConfiguration
- The message template to use for the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
templateConfiguration
default MessageRequest.Builder templateConfiguration(Consumer<TemplateConfiguration.Builder> templateConfiguration) The message template to use for the message.
This is a convenience method that creates an instance of theTemplateConfiguration.Builder
avoiding the need to create one manually viaTemplateConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totemplateConfiguration(TemplateConfiguration)
.- Parameters:
templateConfiguration
- a consumer that will call methods onTemplateConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
traceId
The unique identifier for tracing the message. This identifier is visible to message recipients.
- Parameters:
traceId
- The unique identifier for tracing the message. This identifier is visible to message recipients.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-