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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Destination()
Default constructor for Destination object.Destination(List<String> toAddresses)
Constructs a new Destination object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Destination
clone()
boolean
equals(Object obj)
List<String>
getBccAddresses()
The BCC: field(s) of the message.List<String>
getCcAddresses()
The CC: field(s) of the message.List<String>
getToAddresses()
The To: field(s) of the message.int
hashCode()
void
setBccAddresses(Collection<String> bccAddresses)
The BCC: field(s) of the message.void
setCcAddresses(Collection<String> ccAddresses)
The CC: field(s) of the message.void
setToAddresses(Collection<String> toAddresses)
The To: field(s) of the message.String
toString()
Returns a string representation of this object; useful for testing and debugging.Destination
withBccAddresses(String... bccAddresses)
The BCC: field(s) of the message.Destination
withBccAddresses(Collection<String> bccAddresses)
The BCC: field(s) of the message.Destination
withCcAddresses(String... ccAddresses)
The CC: field(s) of the message.Destination
withCcAddresses(Collection<String> ccAddresses)
The CC: field(s) of the message.Destination
withToAddresses(String... toAddresses)
The To: field(s) of the message.Destination
withToAddresses(Collection<String> toAddresses)
The To: field(s) of the message.
-
-
-
Method Detail
-
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)
orwithToAddresses(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)
orwithCcAddresses(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)
orwithBccAddresses(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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public Destination clone()
-
-