public class Destination
extends java.lang.Object
implements java.io.Serializable, java.lang.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.
Modifier and Type | Field and Description |
---|---|
private SdkInternalList<java.lang.String> |
bccAddresses
The BCC: field(s) of the message.
|
private SdkInternalList<java.lang.String> |
ccAddresses
The CC: field(s) of the message.
|
private SdkInternalList<java.lang.String> |
toAddresses
The To: field(s) of the message.
|
Constructor and Description |
---|
Destination()
Default constructor for Destination object.
|
Destination(java.util.List<java.lang.String> toAddresses)
Constructs a new Destination object.
|
Modifier and Type | Method and Description |
---|---|
Destination |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getBccAddresses()
The BCC: field(s) of the message.
|
java.util.List<java.lang.String> |
getCcAddresses()
The CC: field(s) of the message.
|
java.util.List<java.lang.String> |
getToAddresses()
The To: field(s) of the message.
|
int |
hashCode() |
void |
setBccAddresses(java.util.Collection<java.lang.String> bccAddresses)
The BCC: field(s) of the message.
|
void |
setCcAddresses(java.util.Collection<java.lang.String> ccAddresses)
The CC: field(s) of the message.
|
void |
setToAddresses(java.util.Collection<java.lang.String> toAddresses)
The To: field(s) of the message.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Destination |
withBccAddresses(java.util.Collection<java.lang.String> bccAddresses)
The BCC: field(s) of the message.
|
Destination |
withBccAddresses(java.lang.String... bccAddresses)
The BCC: field(s) of the message.
|
Destination |
withCcAddresses(java.util.Collection<java.lang.String> ccAddresses)
The CC: field(s) of the message.
|
Destination |
withCcAddresses(java.lang.String... ccAddresses)
The CC: field(s) of the message.
|
Destination |
withToAddresses(java.util.Collection<java.lang.String> toAddresses)
The To: field(s) of the message.
|
Destination |
withToAddresses(java.lang.String... toAddresses)
The To: field(s) of the message.
|
private SdkInternalList<java.lang.String> toAddresses
The To: field(s) of the message.
private SdkInternalList<java.lang.String> ccAddresses
The CC: field(s) of the message.
private SdkInternalList<java.lang.String> bccAddresses
The BCC: field(s) of the message.
public Destination()
public Destination(java.util.List<java.lang.String> toAddresses)
toAddresses
- The To: field(s) of the message.public java.util.List<java.lang.String> getToAddresses()
The To: field(s) of the message.
public void setToAddresses(java.util.Collection<java.lang.String> toAddresses)
The To: field(s) of the message.
toAddresses
- The To: field(s) of the message.public Destination withToAddresses(java.lang.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.
toAddresses
- The To: field(s) of the message.public Destination withToAddresses(java.util.Collection<java.lang.String> toAddresses)
The To: field(s) of the message.
toAddresses
- The To: field(s) of the message.public java.util.List<java.lang.String> getCcAddresses()
The CC: field(s) of the message.
public void setCcAddresses(java.util.Collection<java.lang.String> ccAddresses)
The CC: field(s) of the message.
ccAddresses
- The CC: field(s) of the message.public Destination withCcAddresses(java.lang.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.
ccAddresses
- The CC: field(s) of the message.public Destination withCcAddresses(java.util.Collection<java.lang.String> ccAddresses)
The CC: field(s) of the message.
ccAddresses
- The CC: field(s) of the message.public java.util.List<java.lang.String> getBccAddresses()
The BCC: field(s) of the message.
public void setBccAddresses(java.util.Collection<java.lang.String> bccAddresses)
The BCC: field(s) of the message.
bccAddresses
- The BCC: field(s) of the message.public Destination withBccAddresses(java.lang.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.
bccAddresses
- The BCC: field(s) of the message.public Destination withBccAddresses(java.util.Collection<java.lang.String> bccAddresses)
The BCC: field(s) of the message.
bccAddresses
- The BCC: field(s) of the message.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Destination clone()
clone
in class java.lang.Object