Class AddMemberSelectorError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.AddMemberSelectorError
-
public final class AddMemberSelectorError extends java.lang.Object
This class is an open tagged union. Tagged unions instances are always associated to a specific tag. This means only one of theisAbc()
methods will returntrue
. You can usetag()
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AddMemberSelectorError.Tag
Discriminating tag type forAddMemberSelectorError
.
-
Field Summary
Fields Modifier and Type Field 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 inAddFolderMemberArg.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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getInvalidDropboxIdValue()
The value is the ID that could not be identified.java.lang.String
getInvalidEmailValue()
The value is the e-email address that is malformed.java.lang.String
getUnverifiedDropboxIdValue()
The value is the ID of the Dropbox user with an unverified e-mail address.int
hashCode()
static AddMemberSelectorError
invalidDropboxId(java.lang.String value)
Returns an instance ofAddMemberSelectorError
that has its tag set toAddMemberSelectorError.Tag.INVALID_DROPBOX_ID
.static AddMemberSelectorError
invalidEmail(java.lang.String value)
Returns an instance ofAddMemberSelectorError
that has its tag set toAddMemberSelectorError.Tag.INVALID_EMAIL
.boolean
isAutomaticGroup()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.AUTOMATIC_GROUP
,false
otherwise.boolean
isGroupDeleted()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.GROUP_DELETED
,false
otherwise.boolean
isGroupNotOnTeam()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM
,false
otherwise.boolean
isInvalidDropboxId()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.INVALID_DROPBOX_ID
,false
otherwise.boolean
isInvalidEmail()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.INVALID_EMAIL
,false
otherwise.boolean
isOther()
boolean
isUnverifiedDropboxId()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
,false
otherwise.AddMemberSelectorError.Tag
tag()
Returns the tag for this instance.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.static AddMemberSelectorError
unverifiedDropboxId(java.lang.String value)
Returns an instance ofAddMemberSelectorError
that has its tag set toAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
.
-
-
-
Field Detail
-
AUTOMATIC_GROUP
public static final AddMemberSelectorError AUTOMATIC_GROUP
Automatically created groups can only be added to team folders.
-
GROUP_DELETED
public static final AddMemberSelectorError GROUP_DELETED
At least one of the specified groups inAddFolderMemberArg.getMembers()
is deleted.
-
GROUP_NOT_ON_TEAM
public static final AddMemberSelectorError GROUP_NOT_ON_TEAM
Sharing to a group that is not on the current user's team.
-
OTHER
public static final AddMemberSelectorError OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.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.
-
-
Method Detail
-
tag
public AddMemberSelectorError.Tag tag()
Returns the tag for this instance.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 returntrue
. Callers are recommended to use the tag value in aswitch
statement to properly handle the different values for thisAddMemberSelectorError
.If a tag returned by the server is unrecognized by this SDK, the
AddMemberSelectorError.Tag.OTHER
value will be used.- Returns:
- the tag for this instance.
-
isAutomaticGroup
public boolean isAutomaticGroup()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.AUTOMATIC_GROUP
,false
otherwise.- Returns:
true
if this instance is tagged asAddMemberSelectorError.Tag.AUTOMATIC_GROUP
,false
otherwise.
-
isInvalidDropboxId
public boolean isInvalidDropboxId()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.INVALID_DROPBOX_ID
,false
otherwise.- Returns:
true
if this instance is tagged asAddMemberSelectorError.Tag.INVALID_DROPBOX_ID
,false
otherwise.
-
invalidDropboxId
public static AddMemberSelectorError invalidDropboxId(java.lang.String value)
Returns an instance ofAddMemberSelectorError
that has its tag set toAddMemberSelectorError.Tag.INVALID_DROPBOX_ID
.The value is the ID that could not be identified.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AddMemberSelectorError
with its tag set toAddMemberSelectorError.Tag.INVALID_DROPBOX_ID
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
is shorter than 1 or isnull
.
-
getInvalidDropboxIdValue
public java.lang.String getInvalidDropboxIdValue()
The value is the ID that could not be identified.This instance must be tagged as
AddMemberSelectorError.Tag.INVALID_DROPBOX_ID
.- Returns:
- The
String
value associated with this instance ifisInvalidDropboxId()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisInvalidDropboxId()
isfalse
.
-
isInvalidEmail
public boolean isInvalidEmail()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.INVALID_EMAIL
,false
otherwise.- Returns:
true
if this instance is tagged asAddMemberSelectorError.Tag.INVALID_EMAIL
,false
otherwise.
-
invalidEmail
public static AddMemberSelectorError invalidEmail(java.lang.String value)
Returns an instance ofAddMemberSelectorError
that has its tag set toAddMemberSelectorError.Tag.INVALID_EMAIL
.The value is the e-email address that is malformed.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AddMemberSelectorError
with its tag set toAddMemberSelectorError.Tag.INVALID_EMAIL
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
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 isnull
.
-
getInvalidEmailValue
public java.lang.String getInvalidEmailValue()
The value is the e-email address that is malformed.This instance must be tagged as
AddMemberSelectorError.Tag.INVALID_EMAIL
.- Returns:
- The
String
value associated with this instance ifisInvalidEmail()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisInvalidEmail()
isfalse
.
-
isUnverifiedDropboxId
public boolean isUnverifiedDropboxId()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
,false
otherwise.- Returns:
true
if this instance is tagged asAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
,false
otherwise.
-
unverifiedDropboxId
public static AddMemberSelectorError unverifiedDropboxId(java.lang.String value)
Returns an instance ofAddMemberSelectorError
that has its tag set toAddMemberSelectorError.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.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AddMemberSelectorError
with its tag set toAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
is shorter than 1 or isnull
.
-
getUnverifiedDropboxIdValue
public java.lang.String getUnverifiedDropboxIdValue()
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.This instance must be tagged as
AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID
.- Returns:
- The
String
value associated with this instance ifisUnverifiedDropboxId()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisUnverifiedDropboxId()
isfalse
.
-
isGroupDeleted
public boolean isGroupDeleted()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.GROUP_DELETED
,false
otherwise.- Returns:
true
if this instance is tagged asAddMemberSelectorError.Tag.GROUP_DELETED
,false
otherwise.
-
isGroupNotOnTeam
public boolean isGroupNotOnTeam()
Returnstrue
if this instance has the tagAddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM
,false
otherwise.- Returns:
true
if this instance is tagged asAddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM
,false
otherwise.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asAddMemberSelectorError.Tag.OTHER
,false
otherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringMultiline
public java.lang.String toStringMultiline()
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Returns:
- Formatted, multiline String representation of this object
-
-