public class EmailAddress extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
EmailAddress.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<EmailAddress> |
CREATOR |
static JSONifiable.Creator<EmailAddress> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
EmailAddress()
Constructs a new empty instance.
|
protected |
EmailAddress(boolean noInit)
Constructs a new empty instance.
|
|
EmailAddress(EmailAddress src)
Constructs a new instance that is a deep copy of the source instance.
|
|
EmailAddress(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
EmailAddress(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCustomer()
Clears the 'customer' field, the 'has' method for this field will now return false
|
void |
clearEmailAddress()
Clears the 'emailAddress' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearPrimaryEmail()
Clears the 'primaryEmail' field, the 'has' method for this field will now return false
|
void |
clearVerifiedTime()
Clears the 'verifiedTime' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
EmailAddress |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Reference |
getCustomer()
Customer who this email address belongs to.
|
String |
getEmailAddress() |
protected GenericClient |
getGenericClient() |
String |
getId() |
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
Boolean |
getPrimaryEmail() |
Long |
getVerifiedTime() |
boolean |
hasCustomer()
Checks whether the 'customer' field has been set, however the value could be null
|
boolean |
hasEmailAddress()
Checks whether the 'emailAddress' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasPrimaryEmail()
Checks whether the 'primaryEmail' field has been set, however the value could be null
|
boolean |
hasVerifiedTime()
Checks whether the 'verifiedTime' field has been set, however the value could be null
|
boolean |
isNotNullCustomer()
Checks whether the 'customer' field is set and is not null
|
boolean |
isNotNullEmailAddress()
Checks whether the 'emailAddress' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullPrimaryEmail()
Checks whether the 'primaryEmail' field is set and is not null
|
boolean |
isNotNullVerifiedTime()
Checks whether the 'verifiedTime' field is set and is not null
|
void |
mergeChanges(EmailAddress src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
EmailAddress |
setCustomer(Reference customer)
Sets the field 'customer'.
|
EmailAddress |
setEmailAddress(String emailAddress)
Sets the field 'emailAddress'.
|
EmailAddress |
setId(String id)
Sets the field 'id'.
|
EmailAddress |
setPrimaryEmail(Boolean primaryEmail)
Sets the field 'primaryEmail'.
|
EmailAddress |
setVerifiedTime(Long verifiedTime)
Sets the field 'verifiedTime'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<EmailAddress> CREATOR
public static final JSONifiable.Creator<EmailAddress> JSON_CREATOR
public EmailAddress()
protected EmailAddress(boolean noInit)
public EmailAddress(String json) throws IllegalArgumentException
IllegalArgumentException
public EmailAddress(JSONObject jsonObject)
public EmailAddress(EmailAddress src)
public String getId()
public String getEmailAddress()
public Long getVerifiedTime()
public Boolean getPrimaryEmail()
public Reference getCustomer()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullEmailAddress()
public boolean isNotNullVerifiedTime()
public boolean isNotNullPrimaryEmail()
public boolean isNotNullCustomer()
public boolean hasId()
public boolean hasEmailAddress()
public boolean hasVerifiedTime()
public boolean hasPrimaryEmail()
public boolean hasCustomer()
public EmailAddress setId(String id)
public EmailAddress setEmailAddress(String emailAddress)
public EmailAddress setVerifiedTime(Long verifiedTime)
public EmailAddress setPrimaryEmail(Boolean primaryEmail)
public EmailAddress setCustomer(Reference customer)
public void clearId()
public void clearEmailAddress()
public void clearVerifiedTime()
public void clearPrimaryEmail()
public void clearCustomer()
public boolean containsChanges()
public void resetChangeLog()
public EmailAddress copyChanges()
public void mergeChanges(EmailAddress src)