Class AddMemberSelectorError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.AddMemberSelectorError
-
public final class AddMemberSelectorError extends java.lang.ObjectThis 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
OTHERvalue will be used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAddMemberSelectorError.TagDiscriminating tag type forAddMemberSelectorError.
-
Field Summary
Fields Modifier and Type Field Description static AddMemberSelectorErrorAUTOMATIC_GROUPAutomatically created groups can only be added to team folders.static AddMemberSelectorErrorGROUP_DELETEDAt least one of the specified groups inAddFolderMemberArg.getMembers()is deleted.static AddMemberSelectorErrorGROUP_NOT_ON_TEAMSharing to a group that is not on the current user's team.static AddMemberSelectorErrorOTHERCatch-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 booleanequals(java.lang.Object obj)java.lang.StringgetInvalidDropboxIdValue()The value is the ID that could not be identified.java.lang.StringgetInvalidEmailValue()The value is the e-email address that is malformed.java.lang.StringgetUnverifiedDropboxIdValue()The value is the ID of the Dropbox user with an unverified email address.inthashCode()static AddMemberSelectorErrorinvalidDropboxId(java.lang.String value)Returns an instance ofAddMemberSelectorErrorthat has its tag set toAddMemberSelectorError.Tag.INVALID_DROPBOX_ID.static AddMemberSelectorErrorinvalidEmail(java.lang.String value)Returns an instance ofAddMemberSelectorErrorthat has its tag set toAddMemberSelectorError.Tag.INVALID_EMAIL.booleanisAutomaticGroup()Returnstrueif this instance has the tagAddMemberSelectorError.Tag.AUTOMATIC_GROUP,falseotherwise.booleanisGroupDeleted()Returnstrueif this instance has the tagAddMemberSelectorError.Tag.GROUP_DELETED,falseotherwise.booleanisGroupNotOnTeam()Returnstrueif this instance has the tagAddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM,falseotherwise.booleanisInvalidDropboxId()Returnstrueif this instance has the tagAddMemberSelectorError.Tag.INVALID_DROPBOX_ID,falseotherwise.booleanisInvalidEmail()Returnstrueif this instance has the tagAddMemberSelectorError.Tag.INVALID_EMAIL,falseotherwise.booleanisOther()booleanisUnverifiedDropboxId()Returnstrueif this instance has the tagAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID,falseotherwise.AddMemberSelectorError.Tagtag()Returns the tag for this instance.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.static AddMemberSelectorErrorunverifiedDropboxId(java.lang.String value)Returns an instance ofAddMemberSelectorErrorthat 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 aswitchstatement to properly handle the different values for thisAddMemberSelectorError.If a tag returned by the server is unrecognized by this SDK, the
AddMemberSelectorError.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isAutomaticGroup
public boolean isAutomaticGroup()
Returnstrueif this instance has the tagAddMemberSelectorError.Tag.AUTOMATIC_GROUP,falseotherwise.- Returns:
trueif this instance is tagged asAddMemberSelectorError.Tag.AUTOMATIC_GROUP,falseotherwise.
-
isInvalidDropboxId
public boolean isInvalidDropboxId()
Returnstrueif this instance has the tagAddMemberSelectorError.Tag.INVALID_DROPBOX_ID,falseotherwise.- Returns:
trueif this instance is tagged asAddMemberSelectorError.Tag.INVALID_DROPBOX_ID,falseotherwise.
-
invalidDropboxId
public static AddMemberSelectorError invalidDropboxId(java.lang.String value)
Returns an instance ofAddMemberSelectorErrorthat 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
AddMemberSelectorErrorwith its tag set toAddMemberSelectorError.Tag.INVALID_DROPBOX_ID. - Throws:
java.lang.IllegalArgumentException- ifvalueis 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
Stringvalue associated with this instance ifisInvalidDropboxId()istrue. - Throws:
java.lang.IllegalStateException- IfisInvalidDropboxId()isfalse.
-
isInvalidEmail
public boolean isInvalidEmail()
Returnstrueif this instance has the tagAddMemberSelectorError.Tag.INVALID_EMAIL,falseotherwise.- Returns:
trueif this instance is tagged asAddMemberSelectorError.Tag.INVALID_EMAIL,falseotherwise.
-
invalidEmail
public static AddMemberSelectorError invalidEmail(java.lang.String value)
Returns an instance ofAddMemberSelectorErrorthat 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
AddMemberSelectorErrorwith its tag set toAddMemberSelectorError.Tag.INVALID_EMAIL. - Throws:
java.lang.IllegalArgumentException- ifvalueis 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
Stringvalue associated with this instance ifisInvalidEmail()istrue. - Throws:
java.lang.IllegalStateException- IfisInvalidEmail()isfalse.
-
isUnverifiedDropboxId
public boolean isUnverifiedDropboxId()
Returnstrueif this instance has the tagAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID,falseotherwise.- Returns:
trueif this instance is tagged asAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID,falseotherwise.
-
unverifiedDropboxId
public static AddMemberSelectorError unverifiedDropboxId(java.lang.String value)
Returns an instance ofAddMemberSelectorErrorthat has its tag set toAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID.The value is the ID of the Dropbox user with an unverified email address. Invite unverified users by email address instead of by their Dropbox ID.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AddMemberSelectorErrorwith its tag set toAddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID. - Throws:
java.lang.IllegalArgumentException- ifvalueis shorter than 1 or isnull.
-
getUnverifiedDropboxIdValue
public java.lang.String getUnverifiedDropboxIdValue()
The value is the ID of the Dropbox user with an unverified email address. Invite unverified users by email address instead of by their Dropbox ID.This instance must be tagged as
AddMemberSelectorError.Tag.UNVERIFIED_DROPBOX_ID.- Returns:
- The
Stringvalue associated with this instance ifisUnverifiedDropboxId()istrue. - Throws:
java.lang.IllegalStateException- IfisUnverifiedDropboxId()isfalse.
-
isGroupDeleted
public boolean isGroupDeleted()
Returnstrueif this instance has the tagAddMemberSelectorError.Tag.GROUP_DELETED,falseotherwise.- Returns:
trueif this instance is tagged asAddMemberSelectorError.Tag.GROUP_DELETED,falseotherwise.
-
isGroupNotOnTeam
public boolean isGroupNotOnTeam()
Returnstrueif this instance has the tagAddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM,falseotherwise.- Returns:
trueif this instance is tagged asAddMemberSelectorError.Tag.GROUP_NOT_ON_TEAM,falseotherwise.
-
isOther
public boolean isOther()
- Returns:
trueif this instance is tagged asAddMemberSelectorError.Tag.OTHER,falseotherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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
-
-