Class AddFolderMemberError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.AddFolderMemberError
-
public final class AddFolderMemberError 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 classAddFolderMemberError.TagDiscriminating tag type forAddFolderMemberError.
-
Field Summary
Fields Modifier and Type Field Description static AddFolderMemberErrorBANNED_MEMBERThe current user has been banned.static AddFolderMemberErrorCANT_SHARE_OUTSIDE_TEAMYour team policy does not allow sharing outside of the team.static AddFolderMemberErrorEMAIL_UNVERIFIEDThis user's email address is not verified.static AddFolderMemberErrorINSUFFICIENT_PLANThe current user's account doesn't support this action.static AddFolderMemberErrorINVALID_SHARED_FOLDERInvalid shared folder error will be returned as an access_error.static AddFolderMemberErrorNO_PERMISSIONThe current user does not have permission to perform this action.static AddFolderMemberErrorOTHERCatch-all used for unknown tag values returned by the Dropbox servers.static AddFolderMemberErrorRATE_LIMITThe current user has hit the limit of invites they can send per day.static AddFolderMemberErrorTEAM_FOLDERThis action cannot be performed on a team shared folder.static AddFolderMemberErrorTOO_MANY_INVITEESThe current user is trying to share with too many people at once.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AddFolderMemberErroraccessError(SharedFolderAccessError value)Returns an instance ofAddFolderMemberErrorthat has its tag set toAddFolderMemberError.Tag.ACCESS_ERROR.static AddFolderMemberErrorbadMember(AddMemberSelectorError value)Returns an instance ofAddFolderMemberErrorthat has its tag set toAddFolderMemberError.Tag.BAD_MEMBER.booleanequals(java.lang.Object obj)SharedFolderAccessErrorgetAccessErrorValue()Unable to access shared folder.AddMemberSelectorErrorgetBadMemberValue()AddFolderMemberArg.getMembers()contains a bad invitation recipient.longgetTooManyMembersValue()The value is the member limit that was reached.longgetTooManyPendingInvitesValue()The value is the pending invite limit that was reached.inthashCode()booleanisAccessError()booleanisBadMember()booleanisBannedMember()booleanisCantShareOutsideTeam()Returnstrueif this instance has the tagAddFolderMemberError.Tag.CANT_SHARE_OUTSIDE_TEAM,falseotherwise.booleanisEmailUnverified()Returnstrueif this instance has the tagAddFolderMemberError.Tag.EMAIL_UNVERIFIED,falseotherwise.booleanisInsufficientPlan()Returnstrueif this instance has the tagAddFolderMemberError.Tag.INSUFFICIENT_PLAN,falseotherwise.booleanisInvalidSharedFolder()Returnstrueif this instance has the tagAddFolderMemberError.Tag.INVALID_SHARED_FOLDER,falseotherwise.booleanisNoPermission()booleanisOther()booleanisRateLimit()booleanisTeamFolder()booleanisTooManyInvitees()Returnstrueif this instance has the tagAddFolderMemberError.Tag.TOO_MANY_INVITEES,falseotherwise.booleanisTooManyMembers()Returnstrueif this instance has the tagAddFolderMemberError.Tag.TOO_MANY_MEMBERS,falseotherwise.booleanisTooManyPendingInvites()Returnstrueif this instance has the tagAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES,falseotherwise.AddFolderMemberError.Tagtag()Returns the tag for this instance.static AddFolderMemberErrortooManyMembers(long value)Returns an instance ofAddFolderMemberErrorthat has its tag set toAddFolderMemberError.Tag.TOO_MANY_MEMBERS.static AddFolderMemberErrortooManyPendingInvites(long value)Returns an instance ofAddFolderMemberErrorthat has its tag set toAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
EMAIL_UNVERIFIED
public static final AddFolderMemberError EMAIL_UNVERIFIED
This user's email address is not verified. This functionality is only available on accounts with a verified email address. Users can verify their email address here.
-
BANNED_MEMBER
public static final AddFolderMemberError BANNED_MEMBER
The current user has been banned.
-
CANT_SHARE_OUTSIDE_TEAM
public static final AddFolderMemberError CANT_SHARE_OUTSIDE_TEAM
Your team policy does not allow sharing outside of the team.
-
RATE_LIMIT
public static final AddFolderMemberError RATE_LIMIT
The current user has hit the limit of invites they can send per day. Try again in 24 hours.
-
TOO_MANY_INVITEES
public static final AddFolderMemberError TOO_MANY_INVITEES
The current user is trying to share with too many people at once.
-
INSUFFICIENT_PLAN
public static final AddFolderMemberError INSUFFICIENT_PLAN
The current user's account doesn't support this action. An example of this is when adding a read-only member. This action can only be performed by users that have upgraded to a Pro or Business plan.
-
TEAM_FOLDER
public static final AddFolderMemberError TEAM_FOLDER
This action cannot be performed on a team shared folder.
-
NO_PERMISSION
public static final AddFolderMemberError NO_PERMISSION
The current user does not have permission to perform this action.
-
INVALID_SHARED_FOLDER
public static final AddFolderMemberError INVALID_SHARED_FOLDER
Invalid shared folder error will be returned as an access_error.
-
OTHER
public static final AddFolderMemberError 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 AddFolderMemberError.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 thisAddFolderMemberError.If a tag returned by the server is unrecognized by this SDK, the
AddFolderMemberError.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isAccessError
public boolean isAccessError()
- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.ACCESS_ERROR,falseotherwise.
-
accessError
public static AddFolderMemberError accessError(SharedFolderAccessError value)
Returns an instance ofAddFolderMemberErrorthat has its tag set toAddFolderMemberError.Tag.ACCESS_ERROR.Unable to access shared folder.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AddFolderMemberErrorwith its tag set toAddFolderMemberError.Tag.ACCESS_ERROR. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getAccessErrorValue
public SharedFolderAccessError getAccessErrorValue()
Unable to access shared folder.This instance must be tagged as
AddFolderMemberError.Tag.ACCESS_ERROR.- Returns:
- The
SharedFolderAccessErrorvalue associated with this instance ifisAccessError()istrue. - Throws:
java.lang.IllegalStateException- IfisAccessError()isfalse.
-
isEmailUnverified
public boolean isEmailUnverified()
Returnstrueif this instance has the tagAddFolderMemberError.Tag.EMAIL_UNVERIFIED,falseotherwise.- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.EMAIL_UNVERIFIED,falseotherwise.
-
isBannedMember
public boolean isBannedMember()
- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.BANNED_MEMBER,falseotherwise.
-
isBadMember
public boolean isBadMember()
- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.BAD_MEMBER,falseotherwise.
-
badMember
public static AddFolderMemberError badMember(AddMemberSelectorError value)
Returns an instance ofAddFolderMemberErrorthat has its tag set toAddFolderMemberError.Tag.BAD_MEMBER.AddFolderMemberArg.getMembers()contains a bad invitation recipient.- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AddFolderMemberErrorwith its tag set toAddFolderMemberError.Tag.BAD_MEMBER. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getBadMemberValue
public AddMemberSelectorError getBadMemberValue()
AddFolderMemberArg.getMembers()contains a bad invitation recipient.This instance must be tagged as
AddFolderMemberError.Tag.BAD_MEMBER.- Returns:
- The
AddMemberSelectorErrorvalue associated with this instance ifisBadMember()istrue. - Throws:
java.lang.IllegalStateException- IfisBadMember()isfalse.
-
isCantShareOutsideTeam
public boolean isCantShareOutsideTeam()
Returnstrueif this instance has the tagAddFolderMemberError.Tag.CANT_SHARE_OUTSIDE_TEAM,falseotherwise.- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.CANT_SHARE_OUTSIDE_TEAM,falseotherwise.
-
isTooManyMembers
public boolean isTooManyMembers()
Returnstrueif this instance has the tagAddFolderMemberError.Tag.TOO_MANY_MEMBERS,falseotherwise.- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.TOO_MANY_MEMBERS,falseotherwise.
-
tooManyMembers
public static AddFolderMemberError tooManyMembers(long value)
Returns an instance ofAddFolderMemberErrorthat has its tag set toAddFolderMemberError.Tag.TOO_MANY_MEMBERS.The value is the member limit that was reached.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AddFolderMemberErrorwith its tag set toAddFolderMemberError.Tag.TOO_MANY_MEMBERS.
-
getTooManyMembersValue
public long getTooManyMembersValue()
The value is the member limit that was reached.This instance must be tagged as
AddFolderMemberError.Tag.TOO_MANY_MEMBERS.- Returns:
- The
longvalue associated with this instance ifisTooManyMembers()istrue. - Throws:
java.lang.IllegalStateException- IfisTooManyMembers()isfalse.
-
isTooManyPendingInvites
public boolean isTooManyPendingInvites()
Returnstrueif this instance has the tagAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES,falseotherwise.- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES,falseotherwise.
-
tooManyPendingInvites
public static AddFolderMemberError tooManyPendingInvites(long value)
Returns an instance ofAddFolderMemberErrorthat has its tag set toAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES.The value is the pending invite limit that was reached.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AddFolderMemberErrorwith its tag set toAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES.
-
getTooManyPendingInvitesValue
public long getTooManyPendingInvitesValue()
The value is the pending invite limit that was reached.This instance must be tagged as
AddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES.- Returns:
- The
longvalue associated with this instance ifisTooManyPendingInvites()istrue. - Throws:
java.lang.IllegalStateException- IfisTooManyPendingInvites()isfalse.
-
isRateLimit
public boolean isRateLimit()
- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.RATE_LIMIT,falseotherwise.
-
isTooManyInvitees
public boolean isTooManyInvitees()
Returnstrueif this instance has the tagAddFolderMemberError.Tag.TOO_MANY_INVITEES,falseotherwise.- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.TOO_MANY_INVITEES,falseotherwise.
-
isInsufficientPlan
public boolean isInsufficientPlan()
Returnstrueif this instance has the tagAddFolderMemberError.Tag.INSUFFICIENT_PLAN,falseotherwise.- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.INSUFFICIENT_PLAN,falseotherwise.
-
isTeamFolder
public boolean isTeamFolder()
- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.TEAM_FOLDER,falseotherwise.
-
isNoPermission
public boolean isNoPermission()
- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.NO_PERMISSION,falseotherwise.
-
isInvalidSharedFolder
public boolean isInvalidSharedFolder()
Returnstrueif this instance has the tagAddFolderMemberError.Tag.INVALID_SHARED_FOLDER,falseotherwise.- Returns:
trueif this instance is tagged asAddFolderMemberError.Tag.INVALID_SHARED_FOLDER,falseotherwise.
-
isOther
public boolean isOther()
- Returns:
trueif this instance is tagged asAddFolderMemberError.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
-
-