public class EmailMessage extends Object implements Serializable
| Constructor and Description |
|---|
EmailMessage() |
| Modifier and Type | Method and Description |
|---|---|
EmailMessage |
addSubstitutionsEntry(String key,
List<String> value)
Default message substitutions.
|
EmailMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
boolean |
equals(Object obj) |
String |
getBody()
The message body of the notification, the email body or the text message.
|
String |
getFromAddress()
The email address used to send the email from.
|
String |
getHtmlBody()
The HTML part of the email.
|
Map<String,List<String>> |
getSubstitutions()
Default message substitutions.
|
String |
getTemplateArn()
The ARN of the template to use for the email.
|
String |
getTitle()
The subject of the email.
|
int |
hashCode() |
void |
setBody(String body)
The message body of the notification, the email body or the text message.
|
void |
setFromAddress(String fromAddress)
The email address used to send the email from.
|
void |
setHtmlBody(String htmlBody)
The HTML part of the email.
|
void |
setSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
void |
setTemplateArn(String templateArn)
The ARN of the template to use for the email.
|
void |
setTitle(String title)
The subject of the email.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
EmailMessage |
withBody(String body)
The message body of the notification, the email body or the text message.
|
EmailMessage |
withFromAddress(String fromAddress)
The email address used to send the email from.
|
EmailMessage |
withHtmlBody(String htmlBody)
The HTML part of the email.
|
EmailMessage |
withSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
EmailMessage |
withTemplateArn(String templateArn)
The ARN of the template to use for the email.
|
EmailMessage |
withTitle(String title)
The subject of the email.
|
public String getBody()
public void setBody(String body)
body - The message body of the notification, the email body or the
text message.public EmailMessage withBody(String body)
Returns a reference to this object so that method calls can be chained together.
body - The message body of the notification, the email body or the
text message.public String getFromAddress()
public void setFromAddress(String fromAddress)
fromAddress - The email address used to send the email from.
Defaults to use FromAddress specified in the Email Channel.public EmailMessage withFromAddress(String fromAddress)
Returns a reference to this object so that method calls can be chained together.
fromAddress - The email address used to send the email from.
Defaults to use FromAddress specified in the Email Channel.public String getHtmlBody()
public void setHtmlBody(String htmlBody)
htmlBody - The HTML part of the email.public EmailMessage withHtmlBody(String htmlBody)
Returns a reference to this object so that method calls can be chained together.
htmlBody - The HTML part of the email.public Map<String,List<String>> getSubstitutions()
public void setSubstitutions(Map<String,List<String>> substitutions)
substitutions - Default message substitutions. Can be overridden by
individual address substitutions.public EmailMessage withSubstitutions(Map<String,List<String>> substitutions)
Returns a reference to this object so that method calls can be chained together.
substitutions - Default message substitutions. Can be overridden by
individual address substitutions.public EmailMessage addSubstitutionsEntry(String key, List<String> value)
The method adds a new key-value pair into Substitutions parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Substitutions.value - The corresponding value of the entry to be added into
Substitutions.public EmailMessage clearSubstitutionsEntries()
Returns a reference to this object so that method calls can be chained together.
public String getTemplateArn()
public void setTemplateArn(String templateArn)
templateArn - The ARN of the template to use for the email.public EmailMessage withTemplateArn(String templateArn)
Returns a reference to this object so that method calls can be chained together.
templateArn - The ARN of the template to use for the email.public String getTitle()
public void setTitle(String title)
title - The subject of the email.public EmailMessage withTitle(String title)
Returns a reference to this object so that method calls can be chained together.
title - The subject of the email.public String toString()
toString in class ObjectObject.toString()Copyright © 2017. All rights reserved.