Class: AWSCDK::Wisdom::CfnMessageTemplate::EmailMessageTemplateContentBodyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wisdom/cfn_message_template.rb

Overview

The body to use in email messages.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html: nil, plain_text: nil) ⇒ EmailMessageTemplateContentBodyProperty

Returns a new instance of EmailMessageTemplateContentBodyProperty.

Parameters:



1347
1348
1349
1350
1351
1352
# File 'wisdom/cfn_message_template.rb', line 1347

def initialize(html: nil, plain_text: nil)
  @html = html.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnMessageTemplate::MessageTemplateBodyContentProviderProperty.new(**html.transform_keys(&:to_sym)) : html
  Jsii::Type.check_type(@html, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuTWVzc2FnZVRlbXBsYXRlLk1lc3NhZ2VUZW1wbGF0ZUJvZHlDb250ZW50UHJvdmlkZXJQcm9wZXJ0eSJ9XX19")), "html") unless @html.nil?
  @plain_text = plain_text.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnMessageTemplate::MessageTemplateBodyContentProviderProperty.new(**plain_text.transform_keys(&:to_sym)) : plain_text
  Jsii::Type.check_type(@plain_text, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuTWVzc2FnZVRlbXBsYXRlLk1lc3NhZ2VUZW1wbGF0ZUJvZHlDb250ZW50UHJvdmlkZXJQcm9wZXJ0eSJ9XX19")), "plainText") unless @plain_text.nil?
end

Instance Attribute Details

#htmlAWSCDK::IResolvable, ... (readonly)

The message body, in HTML format, to use in email messages that are based on the message template.

We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.



1360
1361
1362
# File 'wisdom/cfn_message_template.rb', line 1360

def html
  @html
end

#plain_textAWSCDK::IResolvable, ... (readonly)

The message body, in plain text format, to use in email messages that are based on the message template.

We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.



1367
1368
1369
# File 'wisdom/cfn_message_template.rb', line 1367

def plain_text
  @plain_text
end

Class Method Details

.jsii_propertiesObject



1369
1370
1371
1372
1373
1374
# File 'wisdom/cfn_message_template.rb', line 1369

def self.jsii_properties
  {
    :html => "html",
    :plain_text => "plainText",
  }
end

Instance Method Details

#to_jsiiObject



1376
1377
1378
1379
1380
1381
1382
1383
# File 'wisdom/cfn_message_template.rb', line 1376

def to_jsii
  result = {}
  result.merge!({
    "html" => @html,
    "plainText" => @plain_text,
  })
  result.compact
end