Class PermissionDeniedReason
- java.lang.Object
-
- com.dropbox.core.v2.sharing.PermissionDeniedReason
-
public final class PermissionDeniedReason extends java.lang.ObjectPossible reasons the user is denied a permission.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 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 classPermissionDeniedReason.TagDiscriminating tag type forPermissionDeniedReason.
-
Field Summary
Fields Modifier and Type Field Description static PermissionDeniedReasonFOLDER_IS_INSIDE_SHARED_FOLDERFolder is inside of another shared folder.static PermissionDeniedReasonFOLDER_IS_LIMITED_TEAM_FOLDERFolder is team folder for a limited team.static PermissionDeniedReasonOTHERCatch-all used for unknown tag values returned by the Dropbox servers.static PermissionDeniedReasonOWNER_NOT_ON_TEAMThe content owner needs to be on a Dropbox team to perform this action.static PermissionDeniedReasonPERMISSION_DENIEDThe user does not have permission to perform this action on the link.static PermissionDeniedReasonRESTRICTED_BY_PARENT_FOLDERPolicy cannot be changed due to restrictions from parent folder.static PermissionDeniedReasonRESTRICTED_BY_TEAMThe user's team policy prevents performing this action on the link.static PermissionDeniedReasonTARGET_IS_INDIRECT_MEMBERTarget is indirectly a member of the folder, for example by being part of a group.static PermissionDeniedReasonTARGET_IS_OWNERTarget is the owner of the folder.static PermissionDeniedReasonTARGET_IS_SELFTarget is the user itself.static PermissionDeniedReasonTARGET_NOT_ACTIVETarget is not an active member of the team.static PermissionDeniedReasonUSER_ACCOUNT_TYPEThe user's account type does not support this action.static PermissionDeniedReasonUSER_NOT_ALLOWED_BY_OWNERUser is prohibited by the owner from taking the action.static PermissionDeniedReasonUSER_NOT_ON_TEAMThe user needs to be on a Dropbox team to perform this action.static PermissionDeniedReasonUSER_NOT_SAME_TEAM_AS_OWNERUser is not on the same team as the folder owner.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)InsufficientPlangetInsufficientPlanValue()This 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.booleanisFolderIsInsideSharedFolder()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.FOLDER_IS_INSIDE_SHARED_FOLDER,falseotherwise.booleanisFolderIsLimitedTeamFolder()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.FOLDER_IS_LIMITED_TEAM_FOLDER,falseotherwise.booleanisInsufficientPlan()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.INSUFFICIENT_PLAN,falseotherwise.booleanisOther()booleanisOwnerNotOnTeam()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.OWNER_NOT_ON_TEAM,falseotherwise.booleanisPermissionDenied()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.PERMISSION_DENIED,falseotherwise.booleanisRestrictedByParentFolder()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.RESTRICTED_BY_PARENT_FOLDER,falseotherwise.booleanisRestrictedByTeam()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.RESTRICTED_BY_TEAM,falseotherwise.booleanisTargetIsIndirectMember()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_INDIRECT_MEMBER,falseotherwise.booleanisTargetIsOwner()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_OWNER,falseotherwise.booleanisTargetIsSelf()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_IS_SELF,falseotherwise.booleanisTargetNotActive()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.TARGET_NOT_ACTIVE,falseotherwise.booleanisUserAccountType()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_ACCOUNT_TYPE,falseotherwise.booleanisUserNotAllowedByOwner()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_ALLOWED_BY_OWNER,falseotherwise.booleanisUserNotOnTeam()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_ON_TEAM,falseotherwise.booleanisUserNotSameTeamAsOwner()Returnstrueif this instance has the tagPermissionDeniedReason.Tag.USER_NOT_SAME_TEAM_AS_OWNER,falseotherwise.PermissionDeniedReason.Tagtag()Returns the tag for this instance.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
USER_NOT_SAME_TEAM_AS_OWNER
public static final PermissionDeniedReason USER_NOT_SAME_TEAM_AS_OWNER
User is not on the same team as the folder owner.
-
USER_NOT_ALLOWED_BY_OWNER
public static final PermissionDeniedReason USER_NOT_ALLOWED_BY_OWNER
User is prohibited by the owner from taking the action.
-
TARGET_IS_INDIRECT_MEMBER
public static final PermissionDeniedReason TARGET_IS_INDIRECT_MEMBER
Target is indirectly a member of the folder, for example by being part of a group.
-
TARGET_IS_OWNER
public static final PermissionDeniedReason TARGET_IS_OWNER
Target is the owner of the folder.
-
TARGET_IS_SELF
public static final PermissionDeniedReason TARGET_IS_SELF
Target is the user itself.
-
TARGET_NOT_ACTIVE
public static final PermissionDeniedReason TARGET_NOT_ACTIVE
Target is not an active member of the team.
-
FOLDER_IS_LIMITED_TEAM_FOLDER
public static final PermissionDeniedReason FOLDER_IS_LIMITED_TEAM_FOLDER
Folder is team folder for a limited team.
-
OWNER_NOT_ON_TEAM
public static final PermissionDeniedReason OWNER_NOT_ON_TEAM
The content owner needs to be on a Dropbox team to perform this action.
-
PERMISSION_DENIED
public static final PermissionDeniedReason PERMISSION_DENIED
The user does not have permission to perform this action on the link.
-
RESTRICTED_BY_TEAM
public static final PermissionDeniedReason RESTRICTED_BY_TEAM
The user's team policy prevents performing this action on the link.
-
USER_ACCOUNT_TYPE
public static final PermissionDeniedReason USER_ACCOUNT_TYPE
The user's account type does not support this action.
-
USER_NOT_ON_TEAM
public static final PermissionDeniedReason USER_NOT_ON_TEAM
The user needs to be on a Dropbox team to perform this action.
-
FOLDER_IS_INSIDE_SHARED_FOLDER
public static final PermissionDeniedReason FOLDER_IS_INSIDE_SHARED_FOLDER
Folder is inside of another shared folder.
-
RESTRICTED_BY_PARENT_FOLDER
public static final PermissionDeniedReason RESTRICTED_BY_PARENT_FOLDER
Policy cannot be changed due to restrictions from parent folder.
-
OTHER
public static final PermissionDeniedReason 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 PermissionDeniedReason.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 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.
-
isFolderIsInsideSharedFolder
public boolean isFolderIsInsideSharedFolder()
Returnstrueif this instance has the tagPermissionDeniedReason.Tag.FOLDER_IS_INSIDE_SHARED_FOLDER,falseotherwise.- Returns:
trueif this instance is tagged asPermissionDeniedReason.Tag.FOLDER_IS_INSIDE_SHARED_FOLDER,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
public static PermissionDeniedReason insufficientPlan(InsufficientPlan value)
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:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getInsufficientPlanValue
public InsufficientPlan getInsufficientPlanValue()
This instance must be tagged asPermissionDeniedReason.Tag.INSUFFICIENT_PLAN.- Returns:
- The
InsufficientPlanvalue associated with this instance ifisInsufficientPlan()istrue. - Throws:
java.lang.IllegalStateException- IfisInsufficientPlan()isfalse.
-
isOther
public boolean isOther()
- Returns:
trueif this instance is tagged asPermissionDeniedReason.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
-
-