Package com.dropbox.core.v2.sharing
Class ShareFolderError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.ShareFolderError
-
public final class ShareFolderError extends java.lang.ObjectThis class is a 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShareFolderError.TagDiscriminating tag type forShareFolderError.
-
Field Summary
Fields Modifier and Type Field Description static ShareFolderErrorDISALLOWED_SHARED_LINK_POLICYThe current user's account is not allowed to select the specifiedShareFolderArgBase.getSharedLinkPolicy().static ShareFolderErrorEMAIL_UNVERIFIEDThis user's email address is not verified.static ShareFolderErrorNO_PERMISSIONThe current user does not have permission to perform this action.static ShareFolderErrorOTHERCatch-all used for unknown tag values returned by the Dropbox servers.static ShareFolderErrorTEAM_POLICY_DISALLOWS_MEMBER_POLICYTeam policy is more restrictive thanShareFolderArgBase.getMemberPolicy().
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ShareFolderErrorbadPath(SharePathError value)Returns an instance ofShareFolderErrorthat has its tag set toShareFolderError.Tag.BAD_PATH.booleanequals(java.lang.Object obj)SharePathErrorgetBadPathValue()ShareFolderArgBase.getPath()is invalid.inthashCode()booleanisBadPath()booleanisDisallowedSharedLinkPolicy()Returnstrueif this instance has the tagShareFolderError.Tag.DISALLOWED_SHARED_LINK_POLICY,falseotherwise.booleanisEmailUnverified()booleanisNoPermission()booleanisOther()booleanisTeamPolicyDisallowsMemberPolicy()Returnstrueif this instance has the tagShareFolderError.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY,falseotherwise.ShareFolderError.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
-
EMAIL_UNVERIFIED
public static final ShareFolderError 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.
-
TEAM_POLICY_DISALLOWS_MEMBER_POLICY
public static final ShareFolderError TEAM_POLICY_DISALLOWS_MEMBER_POLICY
Team policy is more restrictive thanShareFolderArgBase.getMemberPolicy().
-
DISALLOWED_SHARED_LINK_POLICY
public static final ShareFolderError DISALLOWED_SHARED_LINK_POLICY
The current user's account is not allowed to select the specifiedShareFolderArgBase.getSharedLinkPolicy().
-
OTHER
public static final ShareFolderError 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.
-
NO_PERMISSION
public static final ShareFolderError NO_PERMISSION
The current user does not have permission to perform this action.
-
-
Method Detail
-
tag
public ShareFolderError.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 thisShareFolderError.- Returns:
- the tag for this instance.
-
isEmailUnverified
public boolean isEmailUnverified()
- Returns:
trueif this instance is tagged asShareFolderError.Tag.EMAIL_UNVERIFIED,falseotherwise.
-
isBadPath
public boolean isBadPath()
- Returns:
trueif this instance is tagged asShareFolderError.Tag.BAD_PATH,falseotherwise.
-
badPath
public static ShareFolderError badPath(SharePathError value)
Returns an instance ofShareFolderErrorthat has its tag set toShareFolderError.Tag.BAD_PATH.ShareFolderArgBase.getPath()is invalid.- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
ShareFolderErrorwith its tag set toShareFolderError.Tag.BAD_PATH. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getBadPathValue
public SharePathError getBadPathValue()
ShareFolderArgBase.getPath()is invalid.This instance must be tagged as
ShareFolderError.Tag.BAD_PATH.- Returns:
- The
SharePathErrorvalue associated with this instance ifisBadPath()istrue. - Throws:
java.lang.IllegalStateException- IfisBadPath()isfalse.
-
isTeamPolicyDisallowsMemberPolicy
public boolean isTeamPolicyDisallowsMemberPolicy()
Returnstrueif this instance has the tagShareFolderError.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY,falseotherwise.- Returns:
trueif this instance is tagged asShareFolderError.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY,falseotherwise.
-
isDisallowedSharedLinkPolicy
public boolean isDisallowedSharedLinkPolicy()
Returnstrueif this instance has the tagShareFolderError.Tag.DISALLOWED_SHARED_LINK_POLICY,falseotherwise.- Returns:
trueif this instance is tagged asShareFolderError.Tag.DISALLOWED_SHARED_LINK_POLICY,falseotherwise.
-
isOther
public boolean isOther()
- Returns:
trueif this instance is tagged asShareFolderError.Tag.OTHER,falseotherwise.
-
isNoPermission
public boolean isNoPermission()
- Returns:
trueif this instance is tagged asShareFolderError.Tag.NO_PERMISSION,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
-
-