Class: AWSCDK::Pinpoint::CfnInAppTemplateProps

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

Overview

Properties for defining a CfnInAppTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template_name:, content: nil, custom_config: nil, layout: nil, tags: nil, template_description: nil) ⇒ CfnInAppTemplateProps

Returns a new instance of CfnInAppTemplateProps.

Parameters:

  • template_name (String)

    The name of the in-app message template.

  • content (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Pinpoint::CfnInAppTemplate::InAppMessageContentProperty>, nil) (defaults to: nil)

    An object that contains information about the content of an in-app message, including its title and body text, text colors, background colors, images, buttons, and behaviors.

  • custom_config (Object, nil) (defaults to: nil)

    Custom data, in the form of key-value pairs, that is included in an in-app messaging payload.

  • layout (String, nil) (defaults to: nil)

    A string that determines the appearance of the in-app message. You can specify one of the following:.

  • tags (Object, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.

  • template_description (String, nil) (defaults to: nil)

    An optional description of the in-app template.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'pinpoint/cfn_in_app_template_props.rb', line 15

def initialize(template_name:, content: nil, custom_config: nil, layout: nil, tags: nil, template_description: nil)
  @template_name = template_name
  Jsii::Type.check_type(@template_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateName")
  @content = content
  Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlucG9pbnQuQ2ZuSW5BcHBUZW1wbGF0ZS5JbkFwcE1lc3NhZ2VDb250ZW50UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "content") unless @content.nil?
  @custom_config = custom_config
  Jsii::Type.check_type(@custom_config, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "customConfig") unless @custom_config.nil?
  @layout = layout
  Jsii::Type.check_type(@layout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "layout") unless @layout.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

#contentAWSCDK::IResolvable, ... (readonly)

An object that contains information about the content of an in-app message, including its title and body text, text colors, background colors, images, buttons, and behaviors.



39
40
41
# File 'pinpoint/cfn_in_app_template_props.rb', line 39

def content
  @content
end

#custom_configObject? (readonly)

Custom data, in the form of key-value pairs, that is included in an in-app messaging payload.



44
45
46
# File 'pinpoint/cfn_in_app_template_props.rb', line 44

def custom_config
  @custom_config
end

#layoutString? (readonly)

A string that determines the appearance of the in-app message. You can specify one of the following:.

  • BOTTOM_BANNER – a message that appears as a banner at the bottom of the page.
  • TOP_BANNER – a message that appears as a banner at the top of the page.
  • OVERLAYS – a message that covers entire screen.
  • MOBILE_FEED – a message that appears in a window in front of the page.
  • MIDDLE_BANNER – a message that appears as a banner in the middle of the page.
  • CAROUSEL – a scrollable layout of up to five unique messages.


56
57
58
# File 'pinpoint/cfn_in_app_template_props.rb', line 56

def layout
  @layout
end

#tagsObject? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag .



63
64
65
# File 'pinpoint/cfn_in_app_template_props.rb', line 63

def tags
  @tags
end

#template_descriptionString? (readonly)

An optional description of the in-app template.



68
69
70
# File 'pinpoint/cfn_in_app_template_props.rb', line 68

def template_description
  @template_description
end

#template_nameString (readonly)

The name of the in-app message template.



34
35
36
# File 'pinpoint/cfn_in_app_template_props.rb', line 34

def template_name
  @template_name
end

Class Method Details

.jsii_propertiesObject



70
71
72
73
74
75
76
77
78
79
# File 'pinpoint/cfn_in_app_template_props.rb', line 70

def self.jsii_properties
  {
    :template_name => "templateName",
    :content => "content",
    :custom_config => "customConfig",
    :layout => "layout",
    :tags => "tags",
    :template_description => "templateDescription",
  }
end

Instance Method Details

#to_jsiiObject



81
82
83
84
85
86
87
88
89
90
91
92
# File 'pinpoint/cfn_in_app_template_props.rb', line 81

def to_jsii
  result = {}
  result.merge!({
    "templateName" => @template_name,
    "content" => @content,
    "customConfig" => @custom_config,
    "layout" => @layout,
    "tags" => @tags,
    "templateDescription" => @template_description,
  })
  result.compact
end