Class Message
- java.lang.Object
-
- com.amazonaws.services.simpleemail.model.Message
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Message extends Object implements Serializable, Cloneable
Represents the message to be sent, composed of a subject and a body.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Message
clone()
boolean
equals(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.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.
-
-
-
Constructor Detail
-
Message
public Message()
Default constructor for Message object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
Message
public Message(Content subject, Body body)
Constructs a new Message object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
subject
- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.body
- The message body.
-
-
Method Detail
-
setSubject
public void setSubject(Content subject)
The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
- Parameters:
subject
- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
-
getSubject
public Content getSubject()
The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
- Returns:
- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
-
withSubject
public Message withSubject(Content subject)
The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
- Parameters:
subject
- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setBody
public void setBody(Body body)
The message body.
- Parameters:
body
- The message body.
-
getBody
public Body getBody()
The message body.
- Returns:
- The message body.
-
withBody
public Message withBody(Body body)
The message body.
- Parameters:
body
- The message body.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-