public final class PermissionDeniedReason
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 the 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 |
PermissionDeniedReason.Tag
Discriminating tag type for
PermissionDeniedReason . |
Modifier and Type | Field and Description |
---|---|
static PermissionDeniedReason |
FOLDER_IS_INSIDE_SHARED_FOLDER
Folder is inside of another shared folder.
|
static PermissionDeniedReason |
FOLDER_IS_LIMITED_TEAM_FOLDER
Folder is team folder for a limited team.
|
static PermissionDeniedReason |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
static PermissionDeniedReason |
OWNER_NOT_ON_TEAM
The content owner needs to be on a Dropbox team to perform this action.
|
static PermissionDeniedReason |
PERMISSION_DENIED
The user does not have permission to perform this action on the link.
|
static PermissionDeniedReason |
RESTRICTED_BY_PARENT_FOLDER
Policy cannot be changed due to restrictions from parent folder.
|
static PermissionDeniedReason |
RESTRICTED_BY_TEAM
The user's team policy prevents performing this action on the link.
|
static PermissionDeniedReason |
TARGET_IS_INDIRECT_MEMBER
Target is indirectly a member of the folder, for example by being part of
a group.
|
static PermissionDeniedReason |
TARGET_IS_OWNER
Target is the owner of the folder.
|
static PermissionDeniedReason |
TARGET_IS_SELF
Target is the user itself.
|
static PermissionDeniedReason |
TARGET_NOT_ACTIVE
Target is not an active member of the team.
|
static PermissionDeniedReason |
USER_ACCOUNT_TYPE
The user's account type does not support this action.
|
static PermissionDeniedReason |
USER_NOT_ALLOWED_BY_OWNER
User is prohibited by the owner from taking the action.
|
static PermissionDeniedReason |
USER_NOT_ON_TEAM
The user needs to be on a Dropbox team to perform this action.
|
static PermissionDeniedReason |
USER_NOT_SAME_TEAM_AS_OWNER
User is not on the same team as the folder owner.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
InsufficientPlan |
getInsufficientPlanValue()
This instance must be tagged as
PermissionDeniedReason.Tag.INSUFFICIENT_PLAN . |
int |
hashCode() |
static PermissionDeniedReason |
insufficientPlan(InsufficientPlan value)
Returns an instance of
PermissionDeniedReason that has its tag
set to PermissionDeniedReason.Tag.INSUFFICIENT_PLAN . |
boolean |
isFolderIsInsideSharedFolder()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.FOLDER_IS_INSIDE_SHARED_FOLDER , false otherwise. |
boolean |
isFolderIsLimitedTeamFolder()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.FOLDER_IS_LIMITED_TEAM_FOLDER , false otherwise. |
boolean |
isInsufficientPlan()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.INSUFFICIENT_PLAN , false otherwise. |
boolean |
isOther()
|
boolean |
isOwnerNotOnTeam()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.OWNER_NOT_ON_TEAM , false otherwise. |
boolean |
isPermissionDenied()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.PERMISSION_DENIED , false otherwise. |
boolean |
isRestrictedByParentFolder()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.RESTRICTED_BY_PARENT_FOLDER , false otherwise. |
boolean |
isRestrictedByTeam()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.RESTRICTED_BY_TEAM , false otherwise. |
boolean |
isTargetIsIndirectMember()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.TARGET_IS_INDIRECT_MEMBER , false otherwise. |
boolean |
isTargetIsOwner()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.TARGET_IS_OWNER , false otherwise. |
boolean |
isTargetIsSelf()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.TARGET_IS_SELF , false otherwise. |
boolean |
isTargetNotActive()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.TARGET_NOT_ACTIVE , false otherwise. |
boolean |
isUserAccountType()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.USER_ACCOUNT_TYPE , false otherwise. |
boolean |
isUserNotAllowedByOwner()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.USER_NOT_ALLOWED_BY_OWNER , false otherwise. |
boolean |
isUserNotOnTeam()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.USER_NOT_ON_TEAM , false otherwise. |
boolean |
isUserNotSameTeamAsOwner()
Returns
true if this instance has the tag PermissionDeniedReason.Tag.USER_NOT_SAME_TEAM_AS_OWNER , false otherwise. |
PermissionDeniedReason.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.
|
public static final PermissionDeniedReason USER_NOT_SAME_TEAM_AS_OWNER
public static final PermissionDeniedReason USER_NOT_ALLOWED_BY_OWNER
public static final PermissionDeniedReason TARGET_IS_INDIRECT_MEMBER
public static final PermissionDeniedReason TARGET_IS_OWNER
public static final PermissionDeniedReason TARGET_IS_SELF
public static final PermissionDeniedReason TARGET_NOT_ACTIVE
public static final PermissionDeniedReason FOLDER_IS_LIMITED_TEAM_FOLDER
public static final PermissionDeniedReason OWNER_NOT_ON_TEAM
public static final PermissionDeniedReason PERMISSION_DENIED
public static final PermissionDeniedReason RESTRICTED_BY_TEAM
public static final PermissionDeniedReason USER_ACCOUNT_TYPE
public static final PermissionDeniedReason USER_NOT_ON_TEAM
public static final PermissionDeniedReason FOLDER_IS_INSIDE_SHARED_FOLDER
public static final PermissionDeniedReason RESTRICTED_BY_PARENT_FOLDER
public static final PermissionDeniedReason 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 PermissionDeniedReason.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 PermissionDeniedReason
.
If a tag returned by the server is unrecognized by this SDK, the
PermissionDeniedReason.Tag.OTHER
value will be used.
public boolean isUserNotSameTeamAsOwner()
true
if this instance has the tag PermissionDeniedReason.Tag.USER_NOT_SAME_TEAM_AS_OWNER
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.USER_NOT_SAME_TEAM_AS_OWNER
, false
otherwise.public boolean isUserNotAllowedByOwner()
true
if this instance has the tag PermissionDeniedReason.Tag.USER_NOT_ALLOWED_BY_OWNER
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.USER_NOT_ALLOWED_BY_OWNER
, false
otherwise.public boolean isTargetIsIndirectMember()
true
if this instance has the tag PermissionDeniedReason.Tag.TARGET_IS_INDIRECT_MEMBER
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.TARGET_IS_INDIRECT_MEMBER
, false
otherwise.public boolean isTargetIsOwner()
true
if this instance has the tag PermissionDeniedReason.Tag.TARGET_IS_OWNER
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.TARGET_IS_OWNER
, false
otherwise.public boolean isTargetIsSelf()
true
if this instance has the tag PermissionDeniedReason.Tag.TARGET_IS_SELF
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.TARGET_IS_SELF
, false
otherwise.public boolean isTargetNotActive()
true
if this instance has the tag PermissionDeniedReason.Tag.TARGET_NOT_ACTIVE
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.TARGET_NOT_ACTIVE
, false
otherwise.public boolean isFolderIsLimitedTeamFolder()
true
if this instance has the tag PermissionDeniedReason.Tag.FOLDER_IS_LIMITED_TEAM_FOLDER
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.FOLDER_IS_LIMITED_TEAM_FOLDER
, false
otherwise.public boolean isOwnerNotOnTeam()
true
if this instance has the tag PermissionDeniedReason.Tag.OWNER_NOT_ON_TEAM
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.OWNER_NOT_ON_TEAM
, false
otherwise.public boolean isPermissionDenied()
true
if this instance has the tag PermissionDeniedReason.Tag.PERMISSION_DENIED
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.PERMISSION_DENIED
, false
otherwise.public boolean isRestrictedByTeam()
true
if this instance has the tag PermissionDeniedReason.Tag.RESTRICTED_BY_TEAM
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.RESTRICTED_BY_TEAM
, false
otherwise.public boolean isUserAccountType()
true
if this instance has the tag PermissionDeniedReason.Tag.USER_ACCOUNT_TYPE
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.USER_ACCOUNT_TYPE
, false
otherwise.public boolean isUserNotOnTeam()
true
if this instance has the tag PermissionDeniedReason.Tag.USER_NOT_ON_TEAM
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.USER_NOT_ON_TEAM
, false
otherwise.public boolean isFolderIsInsideSharedFolder()
true
if this instance has the tag PermissionDeniedReason.Tag.FOLDER_IS_INSIDE_SHARED_FOLDER
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.FOLDER_IS_INSIDE_SHARED_FOLDER
, false
otherwise.public boolean isRestrictedByParentFolder()
true
if this instance has the tag PermissionDeniedReason.Tag.RESTRICTED_BY_PARENT_FOLDER
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.RESTRICTED_BY_PARENT_FOLDER
, false
otherwise.public boolean isInsufficientPlan()
true
if this instance has the tag PermissionDeniedReason.Tag.INSUFFICIENT_PLAN
, false
otherwise.true
if this instance is tagged as PermissionDeniedReason.Tag.INSUFFICIENT_PLAN
, false
otherwise.public static PermissionDeniedReason insufficientPlan(InsufficientPlan value)
PermissionDeniedReason
that has its tag
set to PermissionDeniedReason.Tag.INSUFFICIENT_PLAN
.
None
value
- value to assign to this instance.PermissionDeniedReason
with its tag set to
PermissionDeniedReason.Tag.INSUFFICIENT_PLAN
.java.lang.IllegalArgumentException
- if value
is null
.public InsufficientPlan getInsufficientPlanValue()
PermissionDeniedReason.Tag.INSUFFICIENT_PLAN
.InsufficientPlan
value associated with this instance
if isInsufficientPlan()
is true
.java.lang.IllegalStateException
- If isInsufficientPlan()
is false
.public boolean isOther()
true
if this instance is tagged as PermissionDeniedReason.Tag.OTHER
,
false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.