Class: AWSCDK::Pinpoint::CfnPushTemplate::AndroidPushNotificationTemplateProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pinpoint::CfnPushTemplate::AndroidPushNotificationTemplateProperty
- Defined in:
- pinpoint/cfn_push_template.rb
Overview
Specifies channel-specific content and settings for a message template that can be used in push notifications that are sent through the ADM (Amazon Device Messaging), Baidu (Baidu Cloud Push), or GCM (Firebase Cloud Messaging, formerly Google Cloud Messaging) 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 a push notification that's based on the message template.
-
#image_icon_url ⇒ String?
readonly
The URL of the large icon image to display in the content view of a push notification that's based on the message template.
-
#image_url ⇒ String?
readonly
The URL of an image to display in a push notification that's based on the message template.
-
#small_image_icon_url ⇒ String?
readonly
The URL of the small icon image to display in the status bar and the content view of a push notification that's 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 a push notification that's 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, image_icon_url: nil, image_url: nil, small_image_icon_url: nil, sound: nil, title: nil, url: nil) ⇒ AndroidPushNotificationTemplateProperty
constructor
A new instance of AndroidPushNotificationTemplateProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action: nil, body: nil, image_icon_url: nil, image_url: nil, small_image_icon_url: nil, sound: nil, title: nil, url: nil) ⇒ AndroidPushNotificationTemplateProperty
Returns a new instance of AndroidPushNotificationTemplateProperty.
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 |
# File 'pinpoint/cfn_push_template.rb', line 733 def initialize(action: nil, body: nil, image_icon_url: nil, image_url: nil, small_image_icon_url: 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? @image_icon_url = image_icon_url Jsii::Type.check_type(@image_icon_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageIconUrl") unless @image_icon_url.nil? @image_url = image_url Jsii::Type.check_type(@image_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageUrl") unless @image_url.nil? @small_image_icon_url = small_image_icon_url Jsii::Type.check_type(@small_image_icon_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "smallImageIconUrl") unless @small_image_icon_url.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 action uses the deep-linking features of the Android platform.URL– The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
762 763 764 |
# File 'pinpoint/cfn_push_template.rb', line 762 def action @action end |
#body ⇒ String? (readonly)
The message body to use in a push notification that's based on the message template.
767 768 769 |
# File 'pinpoint/cfn_push_template.rb', line 767 def body @body end |
#image_icon_url ⇒ String? (readonly)
The URL of the large icon image to display in the content view of a push notification that's based on the message template.
772 773 774 |
# File 'pinpoint/cfn_push_template.rb', line 772 def image_icon_url @image_icon_url end |
#image_url ⇒ String? (readonly)
The URL of an image to display in a push notification that's based on the message template.
777 778 779 |
# File 'pinpoint/cfn_push_template.rb', line 777 def image_url @image_url end |
#small_image_icon_url ⇒ String? (readonly)
The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.
782 783 784 |
# File 'pinpoint/cfn_push_template.rb', line 782 def small_image_icon_url @small_image_icon_url 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/ .
789 790 791 |
# File 'pinpoint/cfn_push_template.rb', line 789 def sound @sound end |
#title ⇒ String? (readonly)
The title to use in a push notification that's based on the message template.
This title appears above the notification message on a recipient's device.
796 797 798 |
# File 'pinpoint/cfn_push_template.rb', line 796 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 .
801 802 803 |
# File 'pinpoint/cfn_push_template.rb', line 801 def url @url end |
Class Method Details
.jsii_properties ⇒ Object
803 804 805 806 807 808 809 810 811 812 813 814 |
# File 'pinpoint/cfn_push_template.rb', line 803 def self.jsii_properties { :action => "action", :body => "body", :image_icon_url => "imageIconUrl", :image_url => "imageUrl", :small_image_icon_url => "smallImageIconUrl", :sound => "sound", :title => "title", :url => "url", } end |
Instance Method Details
#to_jsii ⇒ Object
816 817 818 819 820 821 822 823 824 825 826 827 828 829 |
# File 'pinpoint/cfn_push_template.rb', line 816 def to_jsii result = {} result.merge!({ "action" => @action, "body" => @body, "imageIconUrl" => @image_icon_url, "imageUrl" => @image_url, "smallImageIconUrl" => @small_image_icon_url, "sound" => @sound, "title" => @title, "url" => @url, }) result.compact end |