Class: AWSCDK::Pinpoint::CfnPushTemplate::APNSPushNotificationTemplateProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pinpoint::CfnPushTemplate::APNSPushNotificationTemplateProperty
- 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 APNs (Apple Push Notification service) 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.
-
#media_url ⇒ String?
readonly
The URL of an image or video to display in push notifications that are based on the message template.
-
#sound ⇒ String?
readonly
The key for the sound to play when the 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 the 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, media_url: nil, sound: nil, title: nil, url: nil) ⇒ APNSPushNotificationTemplateProperty
constructor
A new instance of APNSPushNotificationTemplateProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action: nil, body: nil, media_url: nil, sound: nil, title: nil, url: nil) ⇒ APNSPushNotificationTemplateProperty
Returns a new instance of APNSPushNotificationTemplateProperty.
638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'pinpoint/cfn_push_template.rb', line 638 def initialize(action: nil, body: nil, media_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? @media_url = media_url Jsii::Type.check_type(@media_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mediaUrl") unless @media_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 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.
663 664 665 |
# File 'pinpoint/cfn_push_template.rb', line 663 def action @action end |
#body ⇒ String? (readonly)
The message body to use in push notifications that are based on the message template.
668 669 670 |
# File 'pinpoint/cfn_push_template.rb', line 668 def body @body end |
#media_url ⇒ String? (readonly)
The URL of an image or video to display in push notifications that are based on the message template.
673 674 675 |
# File 'pinpoint/cfn_push_template.rb', line 673 def media_url @media_url end |
#sound ⇒ String? (readonly)
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 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.
680 681 682 |
# File 'pinpoint/cfn_push_template.rb', line 680 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.
687 688 689 |
# File 'pinpoint/cfn_push_template.rb', line 687 def title @title end |
#url ⇒ String? (readonly)
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 the Action property is URL .
692 693 694 |
# File 'pinpoint/cfn_push_template.rb', line 692 def url @url end |
Class Method Details
.jsii_properties ⇒ Object
694 695 696 697 698 699 700 701 702 703 |
# File 'pinpoint/cfn_push_template.rb', line 694 def self.jsii_properties { :action => "action", :body => "body", :media_url => "mediaUrl", :sound => "sound", :title => "title", :url => "url", } end |
Instance Method Details
#to_jsii ⇒ Object
705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'pinpoint/cfn_push_template.rb', line 705 def to_jsii result = {} result.merge!({ "action" => @action, "body" => @body, "mediaUrl" => @media_url, "sound" => @sound, "title" => @title, "url" => @url, }) result.compact end |