com.amazonaws.services.simpleemail.model
Class Message

java.lang.Object
  extended by com.amazonaws.services.simpleemail.model.Message

public class Message
extends Object

Represents the message to be sent, composed of a subject and a body.


Constructor Summary
Message()
          Default constructor for a new Message object.
Message(Content subject, Body body)
          Constructs a new Message object.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message()
Default constructor for a new Message object. Callers should use the setter or fluent setter (with...) methods to initialize this 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

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.

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.

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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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 updated object so that method calls can be chained together.

getBody

public Body getBody()
The message body.

Returns:
The message body.

setBody

public void setBody(Body body)
The message body.

Parameters:
body - The message body.

withBody

public Message withBody(Body body)
The message body.

Returns a reference to this object so that method calls can be chained together.

Parameters:
body - The message body.
Returns:
A reference to this updated 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 class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.