Class: AWSCDK::Pinpoint::CfnCampaign::CampaignEmailMessageProperty

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

Overview

Specifies the content and "From" address for an email message that's sent to recipients of a campaign.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body: nil, from_address: nil, html_body: nil, title: nil) ⇒ CampaignEmailMessageProperty

Returns a new instance of CampaignEmailMessageProperty.

Parameters:

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

    The body of the email for recipients whose email clients don't render HTML content.

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

    The verified email address to send the email from.

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

    The body of the email, in HTML format, for recipients whose email clients render HTML content.

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

    The subject line, or title, of the email.



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

def initialize(body: nil, from_address: nil, html_body: nil, title: nil)
  @body = body
  Jsii::Type.check_type(@body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "body") unless @body.nil?
  @from_address = from_address
  Jsii::Type.check_type(@from_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fromAddress") unless @from_address.nil?
  @html_body = html_body
  Jsii::Type.check_type(@html_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "htmlBody") unless @html_body.nil?
  @title = title
  Jsii::Type.check_type(@title, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "title") unless @title.nil?
end

Instance Attribute Details

#bodyString? (readonly)

The body of the email for recipients whose email clients don't render HTML content.



843
844
845
# File 'pinpoint/cfn_campaign.rb', line 843

def body
  @body
end

#from_addressString? (readonly)

The verified email address to send the email from.

The default address is the FromAddress specified for the email channel for the application.



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

def from_address
  @from_address
end

#html_bodyString? (readonly)

The body of the email, in HTML format, for recipients whose email clients render HTML content.



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

def html_body
  @html_body
end

#titleString? (readonly)

The subject line, or title, of the email.



860
861
862
# File 'pinpoint/cfn_campaign.rb', line 860

def title
  @title
end

Class Method Details

.jsii_propertiesObject



862
863
864
865
866
867
868
869
# File 'pinpoint/cfn_campaign.rb', line 862

def self.jsii_properties
  {
    :body => "body",
    :from_address => "fromAddress",
    :html_body => "htmlBody",
    :title => "title",
  }
end

Instance Method Details

#to_jsiiObject



871
872
873
874
875
876
877
878
879
880
# File 'pinpoint/cfn_campaign.rb', line 871

def to_jsii
  result = {}
  result.merge!({
    "body" => @body,
    "fromAddress" => @from_address,
    "htmlBody" => @html_body,
    "title" => @title,
  })
  result.compact
end