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:
  • Constructor Details

    • 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 Details

    • 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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Message clone()
      Overrides:
      clone in class Object