public class Message
extends java.lang.Object
implements java.io.Serializable
Represents the message to be sent, composed of a subject and a body.
Constructor and Description |
---|
Message()
Default constructor for Message object.
|
Message(Content subject,
Body body)
Constructs a new Message object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Body |
getBody()
The message body.
|
Content |
getSubject()
The subject of the message: A short summary of the content, which will
appear in the recipient's inbox.
|
int |
hashCode() |
void |
setBody(Body body)
The message body.
|
void |
setSubject(Content subject)
The subject of the message: A short summary of the content, which will
appear in the recipient's inbox.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Message |
withBody(Body body)
The message body.
|
Message |
withSubject(Content subject)
The subject of the message: A short summary of the content, which will
appear in the recipient's inbox.
|
public Message()
public Message(Content subject, Body body)
subject
- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
body
- The message body.
public Content getSubject()
The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
public void setSubject(Content subject)
The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
subject
- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
public Message withSubject(Content subject)
The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
Returns a reference to this object so that method calls can be chained together.
subject
- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
public Body getBody()
The message body.
The message body.
public void setBody(Body body)
The message body.
body
- The message body.
public Message withBody(Body body)
The message body.
Returns a reference to this object so that method calls can be chained together.
body
- The message body.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.