Class: AWSCDK::Pinpoint::CfnInAppTemplate::BodyConfigProperty

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

Overview

Specifies the configuration of the main body text of the in-app message.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alignment: nil, body: nil, text_color: nil) ⇒ BodyConfigProperty

Returns a new instance of BodyConfigProperty.

Parameters:

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

    The text alignment of the main body text of the message.

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

    The main body text of the message.

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

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



613
614
615
616
617
618
619
620
# File 'pinpoint/cfn_in_app_template.rb', line 613

def initialize(alignment: nil, body: nil, text_color: nil)
  @alignment = alignment
  Jsii::Type.check_type(@alignment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alignment") unless @alignment.nil?
  @body = body
  Jsii::Type.check_type(@body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "body") unless @body.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 main body text of the message.

Acceptable values: LEFT , CENTER , RIGHT .



628
629
630
# File 'pinpoint/cfn_in_app_template.rb', line 628

def alignment
  @alignment
end

#bodyString? (readonly)

The main body text of the message.



633
634
635
# File 'pinpoint/cfn_in_app_template.rb', line 633

def body
  @body
end

#text_colorString? (readonly)

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



638
639
640
# File 'pinpoint/cfn_in_app_template.rb', line 638

def text_color
  @text_color
end

Class Method Details

.jsii_propertiesObject



640
641
642
643
644
645
646
# File 'pinpoint/cfn_in_app_template.rb', line 640

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

Instance Method Details

#to_jsiiObject



648
649
650
651
652
653
654
655
656
# File 'pinpoint/cfn_in_app_template.rb', line 648

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