Class: AWSCDK::Pinpoint::CfnPushTemplateProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pinpoint::CfnPushTemplateProps
- Defined in:
- pinpoint/cfn_push_template_props.rb
Overview
Properties for defining a CfnPushTemplate.
Instance Attribute Summary collapse
-
#adm ⇒ AWSCDK::IResolvable, ...
readonly
The message template to use for the ADM (Amazon Device Messaging) channel.
-
#apns ⇒ AWSCDK::IResolvable, ...
readonly
The message template to use for the APNs (Apple Push Notification service) channel.
-
#baidu ⇒ AWSCDK::IResolvable, ...
readonly
The message template to use for the Baidu (Baidu Cloud Push) channel.
-
#default ⇒ AWSCDK::IResolvable, ...
readonly
The default message template to use for push notification channels.
-
#default_substitutions ⇒ String?
readonly
A JSON object that specifies the default values to use for message variables in the message template.
-
#gcm ⇒ AWSCDK::IResolvable, ...
readonly
The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service.
-
#tags ⇒ Object?
readonly
An array of key-value pairs to apply to this resource.
-
#template_description ⇒ String?
readonly
A custom description of the message template.
-
#template_name ⇒ String
readonly
The name of the message template to use for the message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(template_name:, adm: nil, apns: nil, baidu: nil, default: nil, default_substitutions: nil, gcm: nil, tags: nil, template_description: nil) ⇒ CfnPushTemplateProps
constructor
A new instance of CfnPushTemplateProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(template_name:, adm: nil, apns: nil, baidu: nil, default: nil, default_substitutions: nil, gcm: nil, tags: nil, template_description: nil) ⇒ CfnPushTemplateProps
Returns a new instance of CfnPushTemplateProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'pinpoint/cfn_push_template_props.rb', line 18 def initialize(template_name:, adm: nil, apns: nil, baidu: nil, default: nil, default_substitutions: nil, gcm: nil, tags: nil, template_description: nil) @template_name = template_name Jsii::Type.check_type(@template_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateName") @adm = adm.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnPushTemplate::AndroidPushNotificationTemplateProperty.new(**adm.transform_keys(&:to_sym)) : adm Jsii::Type.check_type(@adm, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5QdXNoVGVtcGxhdGUuQW5kcm9pZFB1c2hOb3RpZmljYXRpb25UZW1wbGF0ZVByb3BlcnR5In1dfX0=")), "adm") unless @adm.nil? @apns = apns.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnPushTemplate::APNSPushNotificationTemplateProperty.new(**apns.transform_keys(&:to_sym)) : apns Jsii::Type.check_type(@apns, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5QdXNoVGVtcGxhdGUuQVBOU1B1c2hOb3RpZmljYXRpb25UZW1wbGF0ZVByb3BlcnR5In1dfX0=")), "apns") unless @apns.nil? @baidu = baidu.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnPushTemplate::AndroidPushNotificationTemplateProperty.new(**baidu.transform_keys(&:to_sym)) : baidu Jsii::Type.check_type(@baidu, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5QdXNoVGVtcGxhdGUuQW5kcm9pZFB1c2hOb3RpZmljYXRpb25UZW1wbGF0ZVByb3BlcnR5In1dfX0=")), "baidu") unless @baidu.nil? @default = default.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnPushTemplate::DefaultPushNotificationTemplateProperty.new(**default.transform_keys(&:to_sym)) : default Jsii::Type.check_type(@default, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5QdXNoVGVtcGxhdGUuRGVmYXVsdFB1c2hOb3RpZmljYXRpb25UZW1wbGF0ZVByb3BlcnR5In1dfX0=")), "default") unless @default.nil? @default_substitutions = default_substitutions Jsii::Type.check_type(@default_substitutions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultSubstitutions") unless @default_substitutions.nil? @gcm = gcm.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnPushTemplate::AndroidPushNotificationTemplateProperty.new(**gcm.transform_keys(&:to_sym)) : gcm Jsii::Type.check_type(@gcm, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5QdXNoVGVtcGxhdGUuQW5kcm9pZFB1c2hOb3RpZmljYXRpb25UZW1wbGF0ZVByb3BlcnR5In1dfX0=")), "gcm") unless @gcm.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil? @template_description = template_description Jsii::Type.check_type(@template_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateDescription") unless @template_description.nil? end |
Instance Attribute Details
#adm ⇒ AWSCDK::IResolvable, ... (readonly)
The message template to use for the ADM (Amazon Device Messaging) channel.
This message template overrides the default template for push notification channels ( Default ).
52 53 54 |
# File 'pinpoint/cfn_push_template_props.rb', line 52 def adm @adm end |
#apns ⇒ AWSCDK::IResolvable, ... (readonly)
The message template to use for the APNs (Apple Push Notification service) channel.
This message template overrides the default template for push notification channels ( Default ).
59 60 61 |
# File 'pinpoint/cfn_push_template_props.rb', line 59 def apns @apns end |
#baidu ⇒ AWSCDK::IResolvable, ... (readonly)
The message template to use for the Baidu (Baidu Cloud Push) channel.
This message template overrides the default template for push notification channels ( Default ).
66 67 68 |
# File 'pinpoint/cfn_push_template_props.rb', line 66 def baidu @baidu end |
#default ⇒ AWSCDK::IResolvable, ... (readonly)
The default message template to use for push notification channels.
71 72 73 |
# File 'pinpoint/cfn_push_template_props.rb', line 71 def default @default end |
#default_substitutions ⇒ String? (readonly)
A JSON object that specifies the default values to use for message variables in the message template.
This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.
78 79 80 |
# File 'pinpoint/cfn_push_template_props.rb', line 78 def default_substitutions @default_substitutions end |
#gcm ⇒ AWSCDK::IResolvable, ... (readonly)
The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service.
This message template overrides the default template for push notification channels ( Default ).
85 86 87 |
# File 'pinpoint/cfn_push_template_props.rb', line 85 def gcm @gcm end |
#tags ⇒ Object? (readonly)
An array of key-value pairs to apply to this resource.
For more information, see Tag .
92 93 94 |
# File 'pinpoint/cfn_push_template_props.rb', line 92 def @tags end |
#template_description ⇒ String? (readonly)
A custom description of the message template.
97 98 99 |
# File 'pinpoint/cfn_push_template_props.rb', line 97 def template_description @template_description end |
#template_name ⇒ String (readonly)
The name of the message template to use for the message.
If specified, this value must match the name of an existing message template.
45 46 47 |
# File 'pinpoint/cfn_push_template_props.rb', line 45 def template_name @template_name end |
Class Method Details
.jsii_properties ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'pinpoint/cfn_push_template_props.rb', line 99 def self.jsii_properties { :template_name => "templateName", :adm => "adm", :apns => "apns", :baidu => "baidu", :default => "default", :default_substitutions => "defaultSubstitutions", :gcm => "gcm", :tags => "tags", :template_description => "templateDescription", } end |
Instance Method Details
#to_jsii ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'pinpoint/cfn_push_template_props.rb', line 113 def to_jsii result = {} result.merge!({ "templateName" => @template_name, "adm" => @adm, "apns" => @apns, "baidu" => @baidu, "default" => @default, "defaultSubstitutions" => @default_substitutions, "gcm" => @gcm, "tags" => @tags, "templateDescription" => @template_description, }) result.compact end |