public final class MountFolderError 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 |
MountFolderError.Tag
Discriminating tag type for
MountFolderError . |
Modifier and Type | Field and Description |
---|---|
static MountFolderError |
ALREADY_MOUNTED
The shared folder is already mounted.
|
static MountFolderError |
INSIDE_SHARED_FOLDER
Mounting would cause a shared folder to be inside another, which is
disallowed.
|
static MountFolderError |
NO_PERMISSION
The current user does not have permission to perform this action.
|
static MountFolderError |
NOT_MOUNTABLE
The shared folder is not mountable.
|
static MountFolderError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
Modifier and Type | Method and Description |
---|---|
static MountFolderError |
accessError(SharedFolderAccessError value)
Returns an instance of
MountFolderError that has its tag set to
MountFolderError.Tag.ACCESS_ERROR . |
boolean |
equals(Object obj) |
SharedFolderAccessError |
getAccessErrorValue()
This instance must be tagged as
MountFolderError.Tag.ACCESS_ERROR . |
InsufficientQuotaAmounts |
getInsufficientQuotaValue()
The current user does not have enough space to mount the shared folder.
|
int |
hashCode() |
static MountFolderError |
insufficientQuota(InsufficientQuotaAmounts value)
Returns an instance of
MountFolderError that has its tag set to
MountFolderError.Tag.INSUFFICIENT_QUOTA . |
boolean |
isAccessError()
|
boolean |
isAlreadyMounted()
|
boolean |
isInsideSharedFolder()
Returns
true if this instance has the tag MountFolderError.Tag.INSIDE_SHARED_FOLDER , false otherwise. |
boolean |
isInsufficientQuota()
|
boolean |
isNoPermission()
|
boolean |
isNotMountable()
|
boolean |
isOther()
|
MountFolderError.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 MountFolderError INSIDE_SHARED_FOLDER
public static final MountFolderError ALREADY_MOUNTED
public static final MountFolderError NO_PERMISSION
public static final MountFolderError NOT_MOUNTABLE
public static final MountFolderError 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 MountFolderError.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 MountFolderError
.
If a tag returned by the server is unrecognized by this SDK, the
MountFolderError.Tag.OTHER
value will be used.
public boolean isAccessError()
true
if this instance is tagged as MountFolderError.Tag.ACCESS_ERROR
, false
otherwise.public static MountFolderError accessError(SharedFolderAccessError value)
MountFolderError
that has its tag set to
MountFolderError.Tag.ACCESS_ERROR
.
None
value
- value to assign to this instance.MountFolderError
with its tag set to MountFolderError.Tag.ACCESS_ERROR
.IllegalArgumentException
- if value
is null
.public SharedFolderAccessError getAccessErrorValue()
MountFolderError.Tag.ACCESS_ERROR
.SharedFolderAccessError
value associated with this
instance if isAccessError()
is true
.IllegalStateException
- If isAccessError()
is false
.public boolean isInsideSharedFolder()
true
if this instance has the tag MountFolderError.Tag.INSIDE_SHARED_FOLDER
, false
otherwise.true
if this instance is tagged as MountFolderError.Tag.INSIDE_SHARED_FOLDER
, false
otherwise.public boolean isInsufficientQuota()
true
if this instance is tagged as MountFolderError.Tag.INSUFFICIENT_QUOTA
, false
otherwise.public static MountFolderError insufficientQuota(InsufficientQuotaAmounts value)
MountFolderError
that has its tag set to
MountFolderError.Tag.INSUFFICIENT_QUOTA
.
The current user does not have enough space to mount the shared folder.
value
- value to assign to this instance.MountFolderError
with its tag set to MountFolderError.Tag.INSUFFICIENT_QUOTA
.IllegalArgumentException
- if value
is null
.public InsufficientQuotaAmounts getInsufficientQuotaValue()
This instance must be tagged as MountFolderError.Tag.INSUFFICIENT_QUOTA
.
InsufficientQuotaAmounts
value associated with this
instance if isInsufficientQuota()
is true
.IllegalStateException
- If isInsufficientQuota()
is false
.public boolean isAlreadyMounted()
true
if this instance is tagged as MountFolderError.Tag.ALREADY_MOUNTED
, false
otherwise.public boolean isNoPermission()
true
if this instance is tagged as MountFolderError.Tag.NO_PERMISSION
, false
otherwise.public boolean isNotMountable()
true
if this instance is tagged as MountFolderError.Tag.NOT_MOUNTABLE
, false
otherwise.public boolean isOther()
true
if this instance is tagged as MountFolderError.Tag.OTHER
,
false
otherwise.public String toStringMultiline()
The returned String may contain newlines.