Class AddFolderMemberError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.AddFolderMemberError
-
public final class AddFolderMemberError 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
AddFolderMemberError.Tag
Discriminating tag type forAddFolderMemberError
.
-
Field Summary
Fields Modifier and Type Field Description static AddFolderMemberError
BANNED_MEMBER
The current user has been banned.static AddFolderMemberError
CANT_SHARE_OUTSIDE_TEAM
Your team policy does not allow sharing outside of the team.static AddFolderMemberError
EMAIL_UNVERIFIED
The current user's e-mail address is unverified.static AddFolderMemberError
INSUFFICIENT_PLAN
The current user's account doesn't support this action.static AddFolderMemberError
INVALID_SHARED_FOLDER
Invalid shared folder error will be returned as an access_error.static AddFolderMemberError
NO_PERMISSION
The current user does not have permission to perform this action.static AddFolderMemberError
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.static AddFolderMemberError
RATE_LIMIT
The current user has hit the limit of invites they can send per day.static AddFolderMemberError
TEAM_FOLDER
This action cannot be performed on a team shared folder.static AddFolderMemberError
TOO_MANY_INVITEES
The 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 AddFolderMemberError
accessError(SharedFolderAccessError value)
Returns an instance ofAddFolderMemberError
that has its tag set toAddFolderMemberError.Tag.ACCESS_ERROR
.static AddFolderMemberError
badMember(AddMemberSelectorError value)
Returns an instance ofAddFolderMemberError
that has its tag set toAddFolderMemberError.Tag.BAD_MEMBER
.boolean
equals(java.lang.Object obj)
SharedFolderAccessError
getAccessErrorValue()
Unable to access shared folder.AddMemberSelectorError
getBadMemberValue()
AddFolderMemberArg.getMembers()
contains a bad invitation recipient.long
getTooManyMembersValue()
The value is the member limit that was reached.long
getTooManyPendingInvitesValue()
The value is the pending invite limit that was reached.int
hashCode()
boolean
isAccessError()
boolean
isBadMember()
boolean
isBannedMember()
boolean
isCantShareOutsideTeam()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.CANT_SHARE_OUTSIDE_TEAM
,false
otherwise.boolean
isEmailUnverified()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.EMAIL_UNVERIFIED
,false
otherwise.boolean
isInsufficientPlan()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.INSUFFICIENT_PLAN
,false
otherwise.boolean
isInvalidSharedFolder()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.INVALID_SHARED_FOLDER
,false
otherwise.boolean
isNoPermission()
boolean
isOther()
boolean
isRateLimit()
boolean
isTeamFolder()
boolean
isTooManyInvitees()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.TOO_MANY_INVITEES
,false
otherwise.boolean
isTooManyMembers()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.TOO_MANY_MEMBERS
,false
otherwise.boolean
isTooManyPendingInvites()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES
,false
otherwise.AddFolderMemberError.Tag
tag()
Returns the tag for this instance.static AddFolderMemberError
tooManyMembers(long value)
Returns an instance ofAddFolderMemberError
that has its tag set toAddFolderMemberError.Tag.TOO_MANY_MEMBERS
.static AddFolderMemberError
tooManyPendingInvites(long value)
Returns an instance ofAddFolderMemberError
that has its tag set toAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES
.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
EMAIL_UNVERIFIED
public static final AddFolderMemberError EMAIL_UNVERIFIED
The current user's e-mail address is unverified.
-
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 aswitch
statement to properly handle the different values for thisAddFolderMemberError
.If a tag returned by the server is unrecognized by this SDK, the
AddFolderMemberError.Tag.OTHER
value will be used.- Returns:
- the tag for this instance.
-
isAccessError
public boolean isAccessError()
- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.ACCESS_ERROR
,false
otherwise.
-
accessError
public static AddFolderMemberError accessError(SharedFolderAccessError value)
Returns an instance ofAddFolderMemberError
that has its tag set toAddFolderMemberError.Tag.ACCESS_ERROR
.Unable to access shared folder.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AddFolderMemberError
with its tag set toAddFolderMemberError.Tag.ACCESS_ERROR
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getAccessErrorValue
public SharedFolderAccessError getAccessErrorValue()
Unable to access shared folder.This instance must be tagged as
AddFolderMemberError.Tag.ACCESS_ERROR
.- Returns:
- The
SharedFolderAccessError
value associated with this instance ifisAccessError()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisAccessError()
isfalse
.
-
isEmailUnverified
public boolean isEmailUnverified()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.EMAIL_UNVERIFIED
,false
otherwise.- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.EMAIL_UNVERIFIED
,false
otherwise.
-
isBannedMember
public boolean isBannedMember()
- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.BANNED_MEMBER
,false
otherwise.
-
isBadMember
public boolean isBadMember()
- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.BAD_MEMBER
,false
otherwise.
-
badMember
public static AddFolderMemberError badMember(AddMemberSelectorError value)
Returns an instance ofAddFolderMemberError
that 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
AddFolderMemberError
with its tag set toAddFolderMemberError.Tag.BAD_MEMBER
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getBadMemberValue
public AddMemberSelectorError getBadMemberValue()
AddFolderMemberArg.getMembers()
contains a bad invitation recipient.This instance must be tagged as
AddFolderMemberError.Tag.BAD_MEMBER
.- Returns:
- The
AddMemberSelectorError
value associated with this instance ifisBadMember()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisBadMember()
isfalse
.
-
isCantShareOutsideTeam
public boolean isCantShareOutsideTeam()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.CANT_SHARE_OUTSIDE_TEAM
,false
otherwise.- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.CANT_SHARE_OUTSIDE_TEAM
,false
otherwise.
-
isTooManyMembers
public boolean isTooManyMembers()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.TOO_MANY_MEMBERS
,false
otherwise.- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.TOO_MANY_MEMBERS
,false
otherwise.
-
tooManyMembers
public static AddFolderMemberError tooManyMembers(long value)
Returns an instance ofAddFolderMemberError
that 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
AddFolderMemberError
with 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
long
value associated with this instance ifisTooManyMembers()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisTooManyMembers()
isfalse
.
-
isTooManyPendingInvites
public boolean isTooManyPendingInvites()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES
,false
otherwise.- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.TOO_MANY_PENDING_INVITES
,false
otherwise.
-
tooManyPendingInvites
public static AddFolderMemberError tooManyPendingInvites(long value)
Returns an instance ofAddFolderMemberError
that 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
AddFolderMemberError
with 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
long
value associated with this instance ifisTooManyPendingInvites()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisTooManyPendingInvites()
isfalse
.
-
isRateLimit
public boolean isRateLimit()
- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.RATE_LIMIT
,false
otherwise.
-
isTooManyInvitees
public boolean isTooManyInvitees()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.TOO_MANY_INVITEES
,false
otherwise.- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.TOO_MANY_INVITEES
,false
otherwise.
-
isInsufficientPlan
public boolean isInsufficientPlan()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.INSUFFICIENT_PLAN
,false
otherwise.- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.INSUFFICIENT_PLAN
,false
otherwise.
-
isTeamFolder
public boolean isTeamFolder()
- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.TEAM_FOLDER
,false
otherwise.
-
isNoPermission
public boolean isNoPermission()
- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.NO_PERMISSION
,false
otherwise.
-
isInvalidSharedFolder
public boolean isInvalidSharedFolder()
Returnstrue
if this instance has the tagAddFolderMemberError.Tag.INVALID_SHARED_FOLDER
,false
otherwise.- Returns:
true
if this instance is tagged asAddFolderMemberError.Tag.INVALID_SHARED_FOLDER
,false
otherwise.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asAddFolderMemberError.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
-
-