Class: AWSCDK::Pinpoint::CfnInAppTemplate::HeaderConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pinpoint/cfn_in_app_template.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) ⇒ HeaderConfigProperty

Returns a new instance of HeaderConfigProperty.

Parameters:

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

    The text alignment of the title of the message.

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

    The title text of the in-app message.

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

    The color of the title text, expressed as a hex color code (such as #000000 for black).



830
831
832
833
834
835
836
837
# File 'pinpoint/cfn_in_app_template.rb', line 830

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 .



845
846
847
# File 'pinpoint/cfn_in_app_template.rb', line 845

def alignment
  @alignment
end

#headerString? (readonly)

The title text of the in-app message.



850
851
852
# File 'pinpoint/cfn_in_app_template.rb', line 850

def header
  @header
end

#text_colorString? (readonly)

The color of the title text, expressed as a hex color code (such as #000000 for black).



855
856
857
# File 'pinpoint/cfn_in_app_template.rb', line 855

def text_color
  @text_color
end

Class Method Details

.jsii_propertiesObject



857
858
859
860
861
862
863
# File 'pinpoint/cfn_in_app_template.rb', line 857

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

Instance Method Details

#to_jsiiObject



865
866
867
868
869
870
871
872
873
# File 'pinpoint/cfn_in_app_template.rb', line 865

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