Class PermissionDeniedReason
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PermissionDeniedReasonFolder is inside of another shared folder.static final PermissionDeniedReasonFolder is team folder for a limited team.static final PermissionDeniedReasonCatch-all used for unknown tag values returned by the Dropbox servers.static final PermissionDeniedReasonThe content owner needs to be on a Dropbox team to perform this action.static final PermissionDeniedReasonThe user does not have permission to perform this action on the link.static final PermissionDeniedReasonPolicy cannot be changed due to restrictions from parent folder.static final PermissionDeniedReasonThe user's team policy prevents performing this action on the link.static final PermissionDeniedReasonTarget is indirectly a member of the folder, for example by being part of a group.static final PermissionDeniedReasonTarget is the owner of the folder.static final PermissionDeniedReasonTarget is the user itself.static final PermissionDeniedReasonTarget is not an active member of the team.static final PermissionDeniedReasonThe user's account type does not support this action.static final PermissionDeniedReasonUser is prohibited by the owner from taking the action.static final PermissionDeniedReasonThe user needs to be on a Dropbox team to perform this action.static final PermissionDeniedReasonUser is not on the same team as the folder owner. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis instance must be tagged asPermissionDeniedReason.Tag.INSUFFICIENT_PLAN.inthashCode()static PermissionDeniedReasoninsufficientPlan(InsufficientPlan value) Returns an instance ofPermissionDeniedReasonthat has its tag set toPermissionDeniedReason.Tag.INSUFFICIENT_PLAN.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.FOLDER_IS_INSIDE_SHARED_FOLDER,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.FOLDER_IS_LIMITED_TEAM_FOLDER,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.INSUFFICIENT_PLAN,falseotherwise.booleanisOther()booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.OWNER_NOT_ON_TEAM,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.PERMISSION_DENIED,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.RESTRICTED_BY_PARENT_FOLDER,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.RESTRICTED_BY_TEAM,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_INDIRECT_MEMBER,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_OWNER,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_SELF,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_NOT_ACTIVE,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_ACCOUNT_TYPE,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_ALLOWED_BY_OWNER,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_ON_TEAM,falseotherwise.booleanReturnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_SAME_TEAM_AS_OWNER,falseotherwise.tag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
USER_NOT_SAME_TEAM_AS_OWNER
User is not on the same team as the folder owner. -
USER_NOT_ALLOWED_BY_OWNER
User is prohibited by the owner from taking the action. -
TARGET_IS_INDIRECT_MEMBER
Target is indirectly a member of the folder, for example by being part of a group. -
TARGET_IS_OWNER
Target is the owner of the folder. -
TARGET_IS_SELF
Target is the user itself. -
TARGET_NOT_ACTIVE
Target is not an active member of the team. -
FOLDER_IS_LIMITED_TEAM_FOLDER
Folder is team folder for a limited team. -
OWNER_NOT_ON_TEAM
The content owner needs to be on a Dropbox team to perform this action. -
PERMISSION_DENIED
The user does not have permission to perform this action on the link. -
RESTRICTED_BY_TEAM
The user's team policy prevents performing this action on the link. -
USER_ACCOUNT_TYPE
The user's account type does not support this action. -
USER_NOT_ON_TEAM
The user needs to be on a Dropbox team to perform this action. -
FOLDER_IS_INSIDE_SHARED_FOLDER
Folder is inside of another shared folder. -
RESTRICTED_BY_PARENT_FOLDER
Policy cannot be changed due to restrictions from parent folder. -
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 Details
-
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 thisPermissionDeniedReason.If a tag returned by the server is unrecognized by this SDK, the
PermissionDeniedReason.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isUserNotSameTeamAsOwner
public boolean isUserNotSameTeamAsOwner()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_SAME_TEAM_AS_OWNER,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.USER_NOT_SAME_TEAM_AS_OWNER,falseotherwise.
-
isUserNotAllowedByOwner
public boolean isUserNotAllowedByOwner()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_ALLOWED_BY_OWNER,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.USER_NOT_ALLOWED_BY_OWNER,falseotherwise.
-
isTargetIsIndirectMember
public boolean isTargetIsIndirectMember()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_INDIRECT_MEMBER,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.TARGET_IS_INDIRECT_MEMBER,falseotherwise.
-
isTargetIsOwner
public boolean isTargetIsOwner()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_OWNER,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.TARGET_IS_OWNER,falseotherwise.
-
isTargetIsSelf
public boolean isTargetIsSelf()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_SELF,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.TARGET_IS_SELF,falseotherwise.
-
isTargetNotActive
public boolean isTargetNotActive()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_NOT_ACTIVE,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.TARGET_NOT_ACTIVE,falseotherwise.
-
isFolderIsLimitedTeamFolder
public boolean isFolderIsLimitedTeamFolder()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.FOLDER_IS_LIMITED_TEAM_FOLDER,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.FOLDER_IS_LIMITED_TEAM_FOLDER,falseotherwise.
-
isOwnerNotOnTeam
public boolean isOwnerNotOnTeam()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.OWNER_NOT_ON_TEAM,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.OWNER_NOT_ON_TEAM,falseotherwise.
-
isPermissionDenied
public boolean isPermissionDenied()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.PERMISSION_DENIED,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.PERMISSION_DENIED,falseotherwise.
-
isRestrictedByTeam
public boolean isRestrictedByTeam()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.RESTRICTED_BY_TEAM,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.RESTRICTED_BY_TEAM,falseotherwise.
-
isUserAccountType
public boolean isUserAccountType()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_ACCOUNT_TYPE,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.USER_ACCOUNT_TYPE,falseotherwise.
-
isUserNotOnTeam
public boolean isUserNotOnTeam()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_ON_TEAM,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.USER_NOT_ON_TEAM,falseotherwise.
-
isRestrictedByParentFolder
public boolean isRestrictedByParentFolder()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.RESTRICTED_BY_PARENT_FOLDER,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.RESTRICTED_BY_PARENT_FOLDER,falseotherwise.
-
isInsufficientPlan
public boolean isInsufficientPlan()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.INSUFFICIENT_PLAN,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.INSUFFICIENT_PLAN,falseotherwise.
-
insufficientPlan
Returns an instance ofPermissionDeniedReasonthat has its tag set toPermissionDeniedReason.Tag.INSUFFICIENT_PLAN.None
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
PermissionDeniedReasonwith its tag set toPermissionDeniedReason.Tag.INSUFFICIENT_PLAN. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getInsufficientPlanValue
This instance must be tagged asPermissionDeniedReason.Tag.INSUFFICIENT_PLAN.- Returns:
- The
InsufficientPlanvalue associated with this instance ifisInsufficientPlan()istrue. - Throws:
IllegalStateException- IfisInsufficientPlan()isfalse.
-
isOther
public boolean isOther()- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.OTHER,falseotherwise.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-