Class CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder
java.lang.Object
software.amazon.awscdk.services.pinpoint.CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnPushTemplate.APNSPushNotificationTemplateProperty>
- Enclosing interface:
- CfnPushTemplate.APNSPushNotificationTemplateProperty
@Stability(Stable)
public static final class CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnPushTemplate.APNSPushNotificationTemplateProperty>
A builder for
CfnPushTemplate.APNSPushNotificationTemplateProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getAction()Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getBody()build()Builds the configured instance.Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getMediaUrl()Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getSound()Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getTitle()Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getUrl()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
action
@Stability(Stable) public CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder action(String action) Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getAction()- Parameters:
action- The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:OPEN_APP– Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.DEEP_LINK– Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.URL– The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
- Returns:
this
-
body
@Stability(Stable) public CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder body(String body) Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getBody()- Parameters:
body- The message body to use in push notifications that are based on the message template.- Returns:
this
-
mediaUrl
@Stability(Stable) public CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder mediaUrl(String mediaUrl) Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getMediaUrl()- Parameters:
mediaUrl- The URL of an image or video to display in push notifications that are based on the message template.- Returns:
this
-
sound
@Stability(Stable) public CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder sound(String sound) Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getSound()- Parameters:
sound- The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or theLibrary/Soundsfolder in your app's data container. If the sound file can't be found or you specifydefaultfor the value, the system plays the default alert sound.- Returns:
this
-
title
@Stability(Stable) public CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder title(String title) Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getTitle()- Parameters:
title- The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.- Returns:
this
-
url
@Stability(Stable) public CfnPushTemplate.APNSPushNotificationTemplateProperty.Builder url(String url) Sets the value ofCfnPushTemplate.APNSPushNotificationTemplateProperty.getUrl()- Parameters:
url- The URL to open in the recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of theActionproperty isURL.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnPushTemplate.APNSPushNotificationTemplateProperty>- Returns:
- a new instance of
CfnPushTemplate.APNSPushNotificationTemplateProperty - Throws:
NullPointerException- if any required attribute was not provided
-