Class: AWSCDK::Pinpoint::CfnCampaign::InAppMessageBodyConfigProperty

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

Overview

Specifies the configuration of 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) ⇒ InAppMessageBodyConfigProperty

Returns a new instance of InAppMessageBodyConfigProperty.

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 string consisting of a hex color code (such as "#000000" for black).



1342
1343
1344
1345
1346
1347
1348
1349
# File 'pinpoint/cfn_campaign.rb', line 1342

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 .



1357
1358
1359
# File 'pinpoint/cfn_campaign.rb', line 1357

def alignment
  @alignment
end

#bodyString? (readonly)

The main body text of the message.



1362
1363
1364
# File 'pinpoint/cfn_campaign.rb', line 1362

def body
  @body
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).



1367
1368
1369
# File 'pinpoint/cfn_campaign.rb', line 1367

def text_color
  @text_color
end

Class Method Details

.jsii_propertiesObject



1369
1370
1371
1372
1373
1374
1375
# File 'pinpoint/cfn_campaign.rb', line 1369

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

Instance Method Details

#to_jsiiObject



1377
1378
1379
1380
1381
1382
1383
1384
1385
# File 'pinpoint/cfn_campaign.rb', line 1377

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