Class: AWSCDK::Pinpoint::CfnPushTemplateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pinpoint/cfn_push_template_props.rb

Overview

Properties for defining a CfnPushTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:



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 = 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

#admAWSCDK::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

#apnsAWSCDK::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

#baiduAWSCDK::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

#defaultAWSCDK::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_substitutionsString? (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

#gcmAWSCDK::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

#tagsObject? (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
  @tags
end

#template_descriptionString? (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_nameString (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_propertiesObject



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_jsiiObject



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