@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Message extends Object implements Serializable, Cloneable, StructuredPojo
Represents the email message that you're sending. The Message
object consists of a subject line and a
message body.
Constructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
Message |
clone() |
boolean |
equals(Object obj) |
Body |
getBody()
The body of the message.
|
List<MessageHeader> |
getHeaders()
The list of message headers that will be added to the email message.
|
Content |
getSubject()
The subject line of the email.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setBody(Body body)
The body of the message.
|
void |
setHeaders(Collection<MessageHeader> headers)
The list of message headers that will be added to the email message.
|
void |
setSubject(Content subject)
The subject line of the email.
|
String |
toString()
Returns a string representation of this object.
|
Message |
withBody(Body body)
The body of the message.
|
Message |
withHeaders(Collection<MessageHeader> headers)
The list of message headers that will be added to the email message.
|
Message |
withHeaders(MessageHeader... headers)
The list of message headers that will be added to the email message.
|
Message |
withSubject(Content subject)
The subject line of the email.
|
public void setSubject(Content subject)
The subject line of the email. The subject line can only contain 7-bit ASCII characters. However, you can specify non-ASCII characters in the subject line by using encoded-word syntax, as described in RFC 2047.
subject
- The subject line of the email. The subject line can only contain 7-bit ASCII characters. However, you can
specify non-ASCII characters in the subject line by using encoded-word syntax, as described in RFC 2047.public Content getSubject()
The subject line of the email. The subject line can only contain 7-bit ASCII characters. However, you can specify non-ASCII characters in the subject line by using encoded-word syntax, as described in RFC 2047.
public Message withSubject(Content subject)
The subject line of the email. The subject line can only contain 7-bit ASCII characters. However, you can specify non-ASCII characters in the subject line by using encoded-word syntax, as described in RFC 2047.
subject
- The subject line of the email. The subject line can only contain 7-bit ASCII characters. However, you can
specify non-ASCII characters in the subject line by using encoded-word syntax, as described in RFC 2047.public void setBody(Body body)
The body of the message. You can specify an HTML version of the message, a text-only version of the message, or both.
body
- The body of the message. You can specify an HTML version of the message, a text-only version of the
message, or both.public Body getBody()
The body of the message. You can specify an HTML version of the message, a text-only version of the message, or both.
public Message withBody(Body body)
The body of the message. You can specify an HTML version of the message, a text-only version of the message, or both.
body
- The body of the message. You can specify an HTML version of the message, a text-only version of the
message, or both.public List<MessageHeader> getHeaders()
The list of message headers that will be added to the email message.
public void setHeaders(Collection<MessageHeader> headers)
The list of message headers that will be added to the email message.
headers
- The list of message headers that will be added to the email message.public Message withHeaders(MessageHeader... headers)
The list of message headers that will be added to the email message.
NOTE: This method appends the values to the existing list (if any). Use
setHeaders(java.util.Collection)
or withHeaders(java.util.Collection)
if you want to override
the existing values.
headers
- The list of message headers that will be added to the email message.public Message withHeaders(Collection<MessageHeader> headers)
The list of message headers that will be added to the email message.
headers
- The list of message headers that will be added to the email message.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.