public final class AddMemberSelectorError extends Object
isAbc()
methods will return true
. You can use tag()
to determine the
tag associated with this instance.
Open unions may be extended in the future with additional tags. If a new
tag is introduced that this SDK does not recognized, the OTHER
value
will be used.
Modifier and Type | Class and Description |
---|---|
static class |
AddMemberSelectorError.Tag
Discriminating tag type for
AddMemberSelectorError . |
Modifier and Type | Field and Description |
---|---|
static AddMemberSelectorError |
AUTOMATIC_GROUP
Automatically created groups can only be added to team folders.
|
static AddMemberSelectorError |
GROUP_DELETED
At least one of the specified groups in
AddFolderMemberArg.getMembers() is deleted. |
static AddMemberSelectorError |
GROUP_NOT_ON_TEAM
Sharing to a group that is not on the current user's team.
|
static AddMemberSelectorError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getInvalidDropboxIdValue()
The value is the ID that could not be identified.
|
String |
getInvalidEmailValue()
The value is the e-email address that is malformed.
|
String |
getUnverifiedDropboxIdValue()
The value is the ID of the Dropbox user with an unverified e-mail
address.
|
int |
hashCode() |
static AddMemberSelectorError |
invalidDropboxId(String value)
Returns an instance of
AddMemberSelectorError that has its tag
set to AddMemberSelectorError.Tag.INVALID_DROPBOX_ID . |
static AddMemberSelectorError |
invalidEmail(String value)
Returns an instance of
AddMemberSelectorError that has its tag
set to AddMemberSelectorError.Tag.INVALID_EMAIL . |
boolean |
isAutomaticGroup()
Returns
true if this instance has the tag AddMemberSelectorError.Tag.AUTOMATIC_GROUP , false otherwise. |
boolean |
isGroupDeleted()
Returns
true if this instance has the tag AddMemberSelectorError.Tag.GROUP_DELETED , false otherwise. |
boolean |
isGroupNotOnTeam()
Returns
true if this instance has the tag AddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM , false otherwise. |
boolean |
isInvalidDropboxId()
Returns
true if this instance has the tag AddMemberSelectorError.Tag.INVALID_DROPBOX_ID , false otherwise. |
boolean |
isInvalidEmail()
Returns
true if this instance has the tag AddMemberSelectorError.Tag.INVALID_EMAIL , false otherwise. |
boolean |
isOther()
|
boolean |
isUnverifiedDropboxId()
Returns
true if this instance has the tag AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID , false otherwise. |
AddMemberSelectorError.Tag |
tag()
Returns the tag for this instance.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
static AddMemberSelectorError |
unverifiedDropboxId(String value)
Returns an instance of
AddMemberSelectorError that has its tag
set to AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID . |
public static final AddMemberSelectorError AUTOMATIC_GROUP
public static final AddMemberSelectorError GROUP_DELETED
AddFolderMemberArg.getMembers()
is deleted.public static final AddMemberSelectorError GROUP_NOT_ON_TEAM
public static final AddMemberSelectorError OTHER
Receiving a catch-all value typically indicates this SDK version is not up to date. Consider updating your SDK version to handle the new tags.
public AddMemberSelectorError.Tag tag()
This class is a tagged union. Tagged unions instances are always
associated to a specific tag. This means only one of the isXyz()
methods will return true
. Callers are recommended to use the tag
value in a switch
statement to properly handle the different
values for this AddMemberSelectorError
.
If a tag returned by the server is unrecognized by this SDK, the
AddMemberSelectorError.Tag.OTHER
value will be used.
public boolean isAutomaticGroup()
true
if this instance has the tag AddMemberSelectorError.Tag.AUTOMATIC_GROUP
, false
otherwise.true
if this instance is tagged as AddMemberSelectorError.Tag.AUTOMATIC_GROUP
, false
otherwise.public boolean isInvalidDropboxId()
true
if this instance has the tag AddMemberSelectorError.Tag.INVALID_DROPBOX_ID
, false
otherwise.true
if this instance is tagged as AddMemberSelectorError.Tag.INVALID_DROPBOX_ID
, false
otherwise.public static AddMemberSelectorError invalidDropboxId(String value)
AddMemberSelectorError
that has its tag
set to AddMemberSelectorError.Tag.INVALID_DROPBOX_ID
.
The value is the ID that could not be identified.
value
- value to assign to this instance.AddMemberSelectorError
with its tag set to
AddMemberSelectorError.Tag.INVALID_DROPBOX_ID
.IllegalArgumentException
- if value
is shorter than 1 or
is null
.public String getInvalidDropboxIdValue()
This instance must be tagged as AddMemberSelectorError.Tag.INVALID_DROPBOX_ID
.
String
value associated with this instance if isInvalidDropboxId()
is true
.IllegalStateException
- If isInvalidDropboxId()
is false
.public boolean isInvalidEmail()
true
if this instance has the tag AddMemberSelectorError.Tag.INVALID_EMAIL
, false
otherwise.true
if this instance is tagged as AddMemberSelectorError.Tag.INVALID_EMAIL
, false
otherwise.public static AddMemberSelectorError invalidEmail(String value)
AddMemberSelectorError
that has its tag
set to AddMemberSelectorError.Tag.INVALID_EMAIL
.
The value is the e-email address that is malformed.
value
- value to assign to this instance.AddMemberSelectorError
with its tag set to
AddMemberSelectorError.Tag.INVALID_EMAIL
.IllegalArgumentException
- if value
is longer than 255,
does not match pattern "^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*.[A-Za-z]{2,15}$
",
or is null
.public String getInvalidEmailValue()
This instance must be tagged as AddMemberSelectorError.Tag.INVALID_EMAIL
.
String
value associated with this instance if isInvalidEmail()
is true
.IllegalStateException
- If isInvalidEmail()
is false
.public boolean isUnverifiedDropboxId()
true
if this instance has the tag AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
, false
otherwise.true
if this instance is tagged as AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
, false
otherwise.public static AddMemberSelectorError unverifiedDropboxId(String value)
AddMemberSelectorError
that has its tag
set to AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
.
The value is the ID of the Dropbox user with an unverified e-mail address. Invite unverified users by e-mail address instead of by their Dropbox ID.
value
- value to assign to this instance.AddMemberSelectorError
with its tag set to
AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
.IllegalArgumentException
- if value
is shorter than 1 or
is null
.public String getUnverifiedDropboxIdValue()
This instance must be tagged as AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
.
String
value associated with this instance if isUnverifiedDropboxId()
is true
.IllegalStateException
- If isUnverifiedDropboxId()
is
false
.public boolean isGroupDeleted()
true
if this instance has the tag AddMemberSelectorError.Tag.GROUP_DELETED
, false
otherwise.true
if this instance is tagged as AddMemberSelectorError.Tag.GROUP_DELETED
, false
otherwise.public boolean isGroupNotOnTeam()
true
if this instance has the tag AddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM
, false
otherwise.true
if this instance is tagged as AddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM
, false
otherwise.public boolean isOther()
true
if this instance is tagged as AddMemberSelectorError.Tag.OTHER
,
false
otherwise.public String toStringMultiline()
The returned String may contain newlines.