Class: AWSCDK::Pinpoint::CfnCampaign::InAppMessageContentProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pinpoint::CfnCampaign::InAppMessageContentProperty
- Defined in:
- pinpoint/cfn_campaign.rb
Overview
Specifies the configuration and contents of an in-app message.
Instance Attribute Summary collapse
-
#background_color ⇒ String?
readonly
The background color for an in-app message banner, expressed as a hex color code (such as #000000 for black).
-
#body_config ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the configuration of main body text in an in-app message template.
-
#header_config ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the configuration and content of the header or title text of the in-app message.
-
#image_url ⇒ String?
readonly
The URL of the image that appears on an in-app message banner.
-
#primary_btn ⇒ AWSCDK::IResolvable, ...
readonly
An object that contains configuration information about the primary button in an in-app message.
-
#secondary_btn ⇒ AWSCDK::IResolvable, ...
readonly
An object that contains configuration information about the secondary button in an in-app message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(background_color: nil, body_config: nil, header_config: nil, image_url: nil, primary_btn: nil, secondary_btn: nil) ⇒ InAppMessageContentProperty
constructor
A new instance of InAppMessageContentProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(background_color: nil, body_config: nil, header_config: nil, image_url: nil, primary_btn: nil, secondary_btn: nil) ⇒ InAppMessageContentProperty
Returns a new instance of InAppMessageContentProperty.
1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 |
# File 'pinpoint/cfn_campaign.rb', line 1463 def initialize(background_color: nil, body_config: nil, header_config: nil, image_url: nil, primary_btn: nil, secondary_btn: nil) @background_color = background_color Jsii::Type.check_type(@background_color, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "backgroundColor") unless @background_color.nil? @body_config = body_config.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::InAppMessageBodyConfigProperty.new(**body_config.transform_keys(&:to_sym)) : body_config Jsii::Type.check_type(@body_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5JbkFwcE1lc3NhZ2VCb2R5Q29uZmlnUHJvcGVydHkifV19fQ==")), "bodyConfig") unless @body_config.nil? @header_config = header_config.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::InAppMessageHeaderConfigProperty.new(**header_config.transform_keys(&:to_sym)) : header_config Jsii::Type.check_type(@header_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5JbkFwcE1lc3NhZ2VIZWFkZXJDb25maWdQcm9wZXJ0eSJ9XX19")), "headerConfig") unless @header_config.nil? @image_url = image_url Jsii::Type.check_type(@image_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageUrl") unless @image_url.nil? @primary_btn = primary_btn.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::InAppMessageButtonProperty.new(**primary_btn.transform_keys(&:to_sym)) : primary_btn Jsii::Type.check_type(@primary_btn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5JbkFwcE1lc3NhZ2VCdXR0b25Qcm9wZXJ0eSJ9XX19")), "primaryBtn") unless @primary_btn.nil? @secondary_btn = secondary_btn.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::InAppMessageButtonProperty.new(**secondary_btn.transform_keys(&:to_sym)) : secondary_btn Jsii::Type.check_type(@secondary_btn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5JbkFwcE1lc3NhZ2VCdXR0b25Qcm9wZXJ0eSJ9XX19")), "secondaryBtn") unless @secondary_btn.nil? end |
Instance Attribute Details
#background_color ⇒ String? (readonly)
The background color for an in-app message banner, expressed as a hex color code (such as #000000 for black).
1482 1483 1484 |
# File 'pinpoint/cfn_campaign.rb', line 1482 def background_color @background_color end |
#body_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies the configuration of main body text in an in-app message template.
1487 1488 1489 |
# File 'pinpoint/cfn_campaign.rb', line 1487 def body_config @body_config end |
#header_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies the configuration and content of the header or title text of the in-app message.
1492 1493 1494 |
# File 'pinpoint/cfn_campaign.rb', line 1492 def header_config @header_config end |
#image_url ⇒ String? (readonly)
The URL of the image that appears on an in-app message banner.
1497 1498 1499 |
# File 'pinpoint/cfn_campaign.rb', line 1497 def image_url @image_url end |
#primary_btn ⇒ AWSCDK::IResolvable, ... (readonly)
An object that contains configuration information about the primary button in an in-app message.
1502 1503 1504 |
# File 'pinpoint/cfn_campaign.rb', line 1502 def primary_btn @primary_btn end |
#secondary_btn ⇒ AWSCDK::IResolvable, ... (readonly)
An object that contains configuration information about the secondary button in an in-app message.
1507 1508 1509 |
# File 'pinpoint/cfn_campaign.rb', line 1507 def secondary_btn @secondary_btn end |
Class Method Details
.jsii_properties ⇒ Object
1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 |
# File 'pinpoint/cfn_campaign.rb', line 1509 def self.jsii_properties { :background_color => "backgroundColor", :body_config => "bodyConfig", :header_config => "headerConfig", :image_url => "imageUrl", :primary_btn => "primaryBtn", :secondary_btn => "secondaryBtn", } end |
Instance Method Details
#to_jsii ⇒ Object
1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 |
# File 'pinpoint/cfn_campaign.rb', line 1520 def to_jsii result = {} result.merge!({ "backgroundColor" => @background_color, "bodyConfig" => @body_config, "headerConfig" => @header_config, "imageUrl" => @image_url, "primaryBtn" => @primary_btn, "secondaryBtn" => @secondary_btn, }) result.compact end |