Class: AWSCDK::Pinpoint::CfnCampaign::InAppMessageHeaderConfigProperty

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

Overview

Specifies the configuration and content of the header or title text of the in-app message.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alignment: nil, header: nil, text_color: nil) ⇒ InAppMessageHeaderConfigProperty

Returns a new instance of InAppMessageHeaderConfigProperty.

Parameters:

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

    The text alignment of the title of the message.

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

    The header or title text of the in-app message.

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

    The color of the body text, expressed as a string consisting of a hex color code (such as "#000000" for black).



1543
1544
1545
1546
1547
1548
1549
1550
# File 'pinpoint/cfn_campaign.rb', line 1543

def initialize(alignment: nil, header: nil, text_color: nil)
  @alignment = alignment
  Jsii::Type.check_type(@alignment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alignment") unless @alignment.nil?
  @header = header
  Jsii::Type.check_type(@header, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "header") unless @header.nil?
  @text_color = text_color
  Jsii::Type.check_type(@text_color, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "textColor") unless @text_color.nil?
end

Instance Attribute Details

#alignmentString? (readonly)

The text alignment of the title of the message.

Acceptable values: LEFT , CENTER , RIGHT .



1558
1559
1560
# File 'pinpoint/cfn_campaign.rb', line 1558

def alignment
  @alignment
end

#headerString? (readonly)

The header or title text of the in-app message.



1563
1564
1565
# File 'pinpoint/cfn_campaign.rb', line 1563

def header
  @header
end

#text_colorString? (readonly)

The color of the body text, expressed as a string consisting of a hex color code (such as "#000000" for black).



1568
1569
1570
# File 'pinpoint/cfn_campaign.rb', line 1568

def text_color
  @text_color
end

Class Method Details

.jsii_propertiesObject



1570
1571
1572
1573
1574
1575
1576
# File 'pinpoint/cfn_campaign.rb', line 1570

def self.jsii_properties
  {
    :alignment => "alignment",
    :header => "header",
    :text_color => "textColor",
  }
end

Instance Method Details

#to_jsiiObject



1578
1579
1580
1581
1582
1583
1584
1585
1586
# File 'pinpoint/cfn_campaign.rb', line 1578

def to_jsii
  result = {}
  result.merge!({
    "alignment" => @alignment,
    "header" => @header,
    "textColor" => @text_color,
  })
  result.compact
end