public final class ShareFolderErrorBase extends Object
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 |
ShareFolderErrorBase.Tag
Discriminating tag type for
ShareFolderErrorBase . |
Modifier and Type | Field and Description |
---|---|
static ShareFolderErrorBase |
DISALLOWED_SHARED_LINK_POLICY
The current user's account is not allowed to select the specified the
sharedLinkPolicy argument to DbxUserSharingRequests.shareFolder(String) . |
static ShareFolderErrorBase |
EMAIL_UNVERIFIED
The current user's e-mail address is unverified.
|
static ShareFolderErrorBase |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
static ShareFolderErrorBase |
TEAM_POLICY_DISALLOWS_MEMBER_POLICY
Team policy is more restrictive than the
memberPolicy argument to
DbxUserSharingRequests.shareFolder(String) . |
Modifier and Type | Method and Description |
---|---|
static ShareFolderErrorBase |
badPath(SharePathError value)
Returns an instance of
ShareFolderErrorBase that has its tag set
to ShareFolderErrorBase.Tag.BAD_PATH . |
boolean |
equals(Object obj) |
SharePathError |
getBadPathValue()
the
path argument to DbxUserSharingRequests.shareFolder(String) is invalid. |
int |
hashCode() |
boolean |
isBadPath()
|
boolean |
isDisallowedSharedLinkPolicy()
Returns
true if this instance has the tag ShareFolderErrorBase.Tag.DISALLOWED_SHARED_LINK_POLICY , false otherwise. |
boolean |
isEmailUnverified()
Returns
true if this instance has the tag ShareFolderErrorBase.Tag.EMAIL_UNVERIFIED , false otherwise. |
boolean |
isOther()
|
boolean |
isTeamPolicyDisallowsMemberPolicy()
Returns
true if this instance has the tag ShareFolderErrorBase.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY , false otherwise. |
ShareFolderErrorBase.Tag |
tag()
Returns the tag for this instance.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final ShareFolderErrorBase EMAIL_UNVERIFIED
public static final ShareFolderErrorBase TEAM_POLICY_DISALLOWS_MEMBER_POLICY
memberPolicy
argument to
DbxUserSharingRequests.shareFolder(String)
.public static final ShareFolderErrorBase DISALLOWED_SHARED_LINK_POLICY
sharedLinkPolicy
argument to DbxUserSharingRequests.shareFolder(String)
.public static final ShareFolderErrorBase 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 ShareFolderErrorBase.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 ShareFolderErrorBase
.
If a tag returned by the server is unrecognized by this SDK, the
ShareFolderErrorBase.Tag.OTHER
value will be used.
public boolean isEmailUnverified()
true
if this instance has the tag ShareFolderErrorBase.Tag.EMAIL_UNVERIFIED
, false
otherwise.true
if this instance is tagged as ShareFolderErrorBase.Tag.EMAIL_UNVERIFIED
, false
otherwise.public boolean isBadPath()
true
if this instance is tagged as ShareFolderErrorBase.Tag.BAD_PATH
,
false
otherwise.public static ShareFolderErrorBase badPath(SharePathError value)
ShareFolderErrorBase
that has its tag set
to ShareFolderErrorBase.Tag.BAD_PATH
.
the path
argument to DbxUserSharingRequests.shareFolder(String)
is invalid.
value
- value to assign to this instance.ShareFolderErrorBase
with its tag set to
ShareFolderErrorBase.Tag.BAD_PATH
.IllegalArgumentException
- if value
is null
.public SharePathError getBadPathValue()
path
argument to DbxUserSharingRequests.shareFolder(String)
is invalid.
This instance must be tagged as ShareFolderErrorBase.Tag.BAD_PATH
.
badPath(com.dropbox.core.v2.sharing.SharePathError)
value associated with
this instance if isBadPath()
is true
.IllegalStateException
- If isBadPath()
is false
.public boolean isTeamPolicyDisallowsMemberPolicy()
true
if this instance has the tag ShareFolderErrorBase.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY
, false
otherwise.true
if this instance is tagged as ShareFolderErrorBase.Tag.TEAM_POLICY_DISALLOWS_MEMBER_POLICY
, false
otherwise.public boolean isDisallowedSharedLinkPolicy()
true
if this instance has the tag ShareFolderErrorBase.Tag.DISALLOWED_SHARED_LINK_POLICY
, false
otherwise.true
if this instance is tagged as ShareFolderErrorBase.Tag.DISALLOWED_SHARED_LINK_POLICY
, false
otherwise.public boolean isOther()
true
if this instance is tagged as ShareFolderErrorBase.Tag.OTHER
,
false
otherwise.public String toStringMultiline()
The returned String may contain newlines.