Class: AWSCDK::Pinpoint::CfnPushTemplate::DefaultPushNotificationTemplateProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pinpoint::CfnPushTemplate::DefaultPushNotificationTemplateProperty
- Defined in:
- pinpoint/cfn_push_template.rb
Overview
Specifies the default settings and content for a message template that can be used in messages that are sent through a push notification channel.
Instance Attribute Summary collapse
-
#action ⇒ String?
readonly
The action to occur if a recipient taps a push notification that's based on the message template.
-
#body ⇒ String?
readonly
The message body to use in push notifications that are based on the message template.
-
#sound ⇒ String?
readonly
The sound to play when a recipient receives a push notification that's based on the message template.
-
#title ⇒ String?
readonly
The title to use in push notifications that are based on the message template.
-
#url ⇒ String?
readonly
The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the
Actionproperty isURL.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action: nil, body: nil, sound: nil, title: nil, url: nil) ⇒ DefaultPushNotificationTemplateProperty
constructor
A new instance of DefaultPushNotificationTemplateProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action: nil, body: nil, sound: nil, title: nil, url: nil) ⇒ DefaultPushNotificationTemplateProperty
Returns a new instance of DefaultPushNotificationTemplateProperty.
843 844 845 846 847 848 849 850 851 852 853 854 |
# File 'pinpoint/cfn_push_template.rb', line 843 def initialize(action: nil, body: nil, sound: nil, title: nil, url: nil) @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") unless @action.nil? @body = body Jsii::Type.check_type(@body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "body") unless @body.nil? @sound = sound Jsii::Type.check_type(@sound, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sound") unless @sound.nil? @title = title Jsii::Type.check_type(@title, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "title") unless @title.nil? @url = url Jsii::Type.check_type(@url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "url") unless @url.nil? end |
Instance Attribute Details
#action ⇒ String? (readonly)
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 and Android platforms.URL– The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
866 867 868 |
# File 'pinpoint/cfn_push_template.rb', line 866 def action @action end |
#body ⇒ String? (readonly)
The message body to use in push notifications that are based on the message template.
871 872 873 |
# File 'pinpoint/cfn_push_template.rb', line 871 def body @body end |
#sound ⇒ String? (readonly)
The sound to play when a recipient receives a push notification that's based on the message template.
You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/ .
For an iOS platform, this value is the key for the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.
880 881 882 |
# File 'pinpoint/cfn_push_template.rb', line 880 def sound @sound end |
#title ⇒ String? (readonly)
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.
887 888 889 |
# File 'pinpoint/cfn_push_template.rb', line 887 def title @title end |
#url ⇒ String? (readonly)
The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL .
892 893 894 |
# File 'pinpoint/cfn_push_template.rb', line 892 def url @url end |
Class Method Details
.jsii_properties ⇒ Object
894 895 896 897 898 899 900 901 902 |
# File 'pinpoint/cfn_push_template.rb', line 894 def self.jsii_properties { :action => "action", :body => "body", :sound => "sound", :title => "title", :url => "url", } end |
Instance Method Details
#to_jsii ⇒ Object
904 905 906 907 908 909 910 911 912 913 914 |
# File 'pinpoint/cfn_push_template.rb', line 904 def to_jsii result = {} result.merge!({ "action" => @action, "body" => @body, "sound" => @sound, "title" => @title, "url" => @url, }) result.compact end |