Class: AWSCDK::Pinpoint::CfnCampaign::CampaignInAppMessageProperty

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

Overview

Specifies the appearance of an in-app message, including the message type, the title and body text, text and background colors, and the configurations of buttons that appear in the message.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content: nil, custom_config: nil, layout: nil) ⇒ CampaignInAppMessageProperty

Returns a new instance of CampaignInAppMessageProperty.

Parameters:

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

    An array that contains configurtion information about the in-app message for the campaign, including title and body text, text colors, background colors, image URLs, and button configurations.

  • 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 describes how the in-app message will appear. You can specify one of the following:.



993
994
995
996
997
998
999
1000
# File 'pinpoint/cfn_campaign.rb', line 993

def initialize(content: nil, custom_config: nil, layout: nil)
  @content = content
  Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlucG9pbnQuQ2ZuQ2FtcGFpZ24uSW5BcHBNZXNzYWdlQ29udGVudFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "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?
end

Instance Attribute Details

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

An array that contains configurtion information about the in-app message for the campaign, including title and body text, text colors, background colors, image URLs, and button configurations.



1006
1007
1008
# File 'pinpoint/cfn_campaign.rb', line 1006

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.



1011
1012
1013
# File 'pinpoint/cfn_campaign.rb', line 1011

def custom_config
  @custom_config
end

#layoutString? (readonly)

A string that describes how the in-app message will appear. 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.


1023
1024
1025
# File 'pinpoint/cfn_campaign.rb', line 1023

def layout
  @layout
end

Class Method Details

.jsii_propertiesObject



1025
1026
1027
1028
1029
1030
1031
# File 'pinpoint/cfn_campaign.rb', line 1025

def self.jsii_properties
  {
    :content => "content",
    :custom_config => "customConfig",
    :layout => "layout",
  }
end

Instance Method Details

#to_jsiiObject



1033
1034
1035
1036
1037
1038
1039
1040
1041
# File 'pinpoint/cfn_campaign.rb', line 1033

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