Class MountFolderError
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MountFolderErrorThe shared folder is already mounted.static final MountFolderErrorMounting would cause a shared folder to be inside another, which is disallowed.static final MountFolderErrorThe shared folder is not mountable by directly call APIs, instead the automounter is responsible for mounting it.static final MountFolderErrorThe current user does not have permission to perform this action.static final MountFolderErrorThe shared folder is not mountable.static final MountFolderErrorCatch-all used for unknown tag values returned by the Dropbox servers. -
Method Summary
Modifier and TypeMethodDescriptionstatic MountFolderErrorReturns an instance ofMountFolderErrorthat has its tag set toMountFolderError.Tag.ACCESS_ERROR.booleanThis instance must be tagged asMountFolderError.Tag.ACCESS_ERROR.The current user does not have enough space to mount the shared folder.inthashCode()static MountFolderErrorReturns an instance ofMountFolderErrorthat has its tag set toMountFolderError.Tag.INSUFFICIENT_QUOTA.booleanbooleanbooleanReturnstrueif this instance has the tagMountFolderError.Tag.INSIDE_SHARED_FOLDER,falseotherwise.booleanbooleanbooleanbooleanbooleanisOther()tag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
INSIDE_SHARED_FOLDER
Mounting would cause a shared folder to be inside another, which is disallowed. -
ALREADY_MOUNTED
The shared folder is already mounted. -
NO_PERMISSION
The current user does not have permission to perform this action. -
NOT_MOUNTABLE
The shared folder is not mountable. One example where this can occur is when the shared folder belongs within a team folder in the user's Dropbox. -
MUST_AUTOMOUNT
The shared folder is not mountable by directly call APIs, instead the automounter is responsible for mounting it. -
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 Details
-
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 thisMountFolderError.If a tag returned by the server is unrecognized by this SDK, the
MountFolderError.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isAccessError
public boolean isAccessError()- Returns:
trueif this instance is tagged asMountFolderError.Tag.ACCESS_ERROR,falseotherwise.
-
getAccessErrorValue
This instance must be tagged asMountFolderError.Tag.ACCESS_ERROR.- Returns:
- The
SharedFolderAccessErrorvalue associated with this instance ifisAccessError()istrue. - Throws:
IllegalStateException- IfisAccessError()isfalse.
-
isInsufficientQuota
public boolean isInsufficientQuota()- Returns:
trueif this instance is tagged asMountFolderError.Tag.INSUFFICIENT_QUOTA,falseotherwise.
-
insufficientQuota
Returns an instance ofMountFolderErrorthat has its tag set toMountFolderError.Tag.INSUFFICIENT_QUOTA.The current user does not have enough space to mount the shared folder.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
MountFolderErrorwith its tag set toMountFolderError.Tag.INSUFFICIENT_QUOTA. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getInsufficientQuotaValue
The current user does not have enough space to mount the shared folder.This instance must be tagged as
MountFolderError.Tag.INSUFFICIENT_QUOTA.- Returns:
- The
InsufficientQuotaAmountsvalue associated with this instance ifisInsufficientQuota()istrue. - Throws:
IllegalStateException- IfisInsufficientQuota()isfalse.
-
isAlreadyMounted
public boolean isAlreadyMounted()- Returns:
trueif this instance is tagged asMountFolderError.Tag.ALREADY_MOUNTED,falseotherwise.
-
isNoPermission
public boolean isNoPermission()- Returns:
trueif this instance is tagged asMountFolderError.Tag.NO_PERMISSION,falseotherwise.
-
isNotMountable
public boolean isNotMountable()- Returns:
trueif this instance is tagged asMountFolderError.Tag.NOT_MOUNTABLE,falseotherwise.
-
isMustAutomount
public boolean isMustAutomount()- Returns:
trueif this instance is tagged asMountFolderError.Tag.MUST_AUTOMOUNT,falseotherwise.
-
isOther
public boolean isOther()- Returns:
trueif this instance is tagged asMountFolderError.Tag.OTHER,falseotherwise.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-