Class Destination

java.lang.Object
com.amazonaws.services.simpleemail.model.Destination
All Implemented Interfaces:
Serializable, Cloneable

public class Destination extends Object implements Serializable, Cloneable

Represents the destination of the message, consisting of To:, CC:, and BCC: fields.

By default, the string must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. For more information, see RFC 2047.

See Also:
  • Constructor Details

    • Destination

      public Destination()
      Default constructor for Destination object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • Destination

      public Destination(List<String> toAddresses)
      Constructs a new Destination object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      toAddresses - The To: field(s) of the message.
  • Method Details

    • getToAddresses

      public List<String> getToAddresses()

      The To: field(s) of the message.

      Returns:
      The To: field(s) of the message.
    • setToAddresses

      public void setToAddresses(Collection<String> toAddresses)

      The To: field(s) of the message.

      Parameters:
      toAddresses - The To: field(s) of the message.
    • withToAddresses

      public Destination withToAddresses(String... toAddresses)

      The To: field(s) of the message.

      NOTE: This method appends the values to the existing list (if any). Use setToAddresses(java.util.Collection) or withToAddresses(java.util.Collection) if you want to override the existing values.

      Parameters:
      toAddresses - The To: field(s) of the message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withToAddresses

      public Destination withToAddresses(Collection<String> toAddresses)

      The To: field(s) of the message.

      Parameters:
      toAddresses - The To: field(s) of the message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getCcAddresses

      public List<String> getCcAddresses()

      The CC: field(s) of the message.

      Returns:
      The CC: field(s) of the message.
    • setCcAddresses

      public void setCcAddresses(Collection<String> ccAddresses)

      The CC: field(s) of the message.

      Parameters:
      ccAddresses - The CC: field(s) of the message.
    • withCcAddresses

      public Destination withCcAddresses(String... ccAddresses)

      The CC: field(s) of the message.

      NOTE: This method appends the values to the existing list (if any). Use setCcAddresses(java.util.Collection) or withCcAddresses(java.util.Collection) if you want to override the existing values.

      Parameters:
      ccAddresses - The CC: field(s) of the message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withCcAddresses

      public Destination withCcAddresses(Collection<String> ccAddresses)

      The CC: field(s) of the message.

      Parameters:
      ccAddresses - The CC: field(s) of the message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getBccAddresses

      public List<String> getBccAddresses()

      The BCC: field(s) of the message.

      Returns:
      The BCC: field(s) of the message.
    • setBccAddresses

      public void setBccAddresses(Collection<String> bccAddresses)

      The BCC: field(s) of the message.

      Parameters:
      bccAddresses - The BCC: field(s) of the message.
    • withBccAddresses

      public Destination withBccAddresses(String... bccAddresses)

      The BCC: field(s) of the message.

      NOTE: This method appends the values to the existing list (if any). Use setBccAddresses(java.util.Collection) or withBccAddresses(java.util.Collection) if you want to override the existing values.

      Parameters:
      bccAddresses - The BCC: field(s) of the message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withBccAddresses

      public Destination withBccAddresses(Collection<String> bccAddresses)

      The BCC: field(s) of the message.

      Parameters:
      bccAddresses - The BCC: field(s) of the message.
      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 Destination clone()
      Overrides:
      clone in class Object