Package com.dropbox.core.v2.sharing
Class ShareFolderError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.ShareFolderError
-
public final class ShareFolderError extends java.lang.Object
This 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 class
ShareFolderError.Tag
Discriminating tag type forShareFolderError
.
-
Field Summary
Fields Modifier and Type Field Description static ShareFolderError
DISALLOWED_SHARED_LINK_POLICY
The current user's account is not allowed to select the specifiedShareFolderArgBase.getSharedLinkPolicy()
.static ShareFolderError
EMAIL_UNVERIFIED
This user's email address is not verified.static ShareFolderError
NO_PERMISSION
The current user does not have permission to perform this action.static ShareFolderError
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.static ShareFolderError
TEAM_POLICY_DISALLOWS_MEMBER_POLICY
Team policy is more restrictive thanShareFolderArgBase.getMemberPolicy()
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ShareFolderError
badPath(SharePathError value)
Returns an instance ofShareFolderError
that has its tag set toShareFolderError.Tag.BAD_PATH
.boolean
equals(java.lang.Object obj)
SharePathError
getBadPathValue()
ShareFolderArgBase.getPath()
is invalid.int
hashCode()
boolean
isBadPath()
boolean
isDisallowedSharedLinkPolicy()
Returnstrue
if this instance has the tagShareFolderError.Tag.DISALLOWED_SHARED_LINK_POLICY
,false
otherwise.boolean
isEmailUnverified()
boolean
isNoPermission()
boolean
isOther()
boolean
isTeamPolicyDisallowsMemberPolicy()
Returnstrue
if this instance has the tagShareFolderError.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY
,false
otherwise.ShareFolderError.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.
-
-
-
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 aswitch
statement to properly handle the different values for thisShareFolderError
.- Returns:
- the tag for this instance.
-
isEmailUnverified
public boolean isEmailUnverified()
- Returns:
true
if this instance is tagged asShareFolderError.Tag.EMAIL_UNVERIFIED
,false
otherwise.
-
isBadPath
public boolean isBadPath()
- Returns:
true
if this instance is tagged asShareFolderError.Tag.BAD_PATH
,false
otherwise.
-
badPath
public static ShareFolderError badPath(SharePathError value)
Returns an instance ofShareFolderError
that has its tag set toShareFolderError.Tag.BAD_PATH
.ShareFolderArgBase.getPath()
is invalid.- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
ShareFolderError
with its tag set toShareFolderError.Tag.BAD_PATH
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getBadPathValue
public SharePathError getBadPathValue()
ShareFolderArgBase.getPath()
is invalid.This instance must be tagged as
ShareFolderError.Tag.BAD_PATH
.- Returns:
- The
SharePathError
value associated with this instance ifisBadPath()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisBadPath()
isfalse
.
-
isTeamPolicyDisallowsMemberPolicy
public boolean isTeamPolicyDisallowsMemberPolicy()
Returnstrue
if this instance has the tagShareFolderError.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY
,false
otherwise.- Returns:
true
if this instance is tagged asShareFolderError.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY
,false
otherwise.
-
isDisallowedSharedLinkPolicy
public boolean isDisallowedSharedLinkPolicy()
Returnstrue
if this instance has the tagShareFolderError.Tag.DISALLOWED_SHARED_LINK_POLICY
,false
otherwise.- Returns:
true
if this instance is tagged asShareFolderError.Tag.DISALLOWED_SHARED_LINK_POLICY
,false
otherwise.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asShareFolderError.Tag.OTHER
,false
otherwise.
-
isNoPermission
public boolean isNoPermission()
- Returns:
true
if this instance is tagged asShareFolderError.Tag.NO_PERMISSION
,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
-
-