Class RelocationError
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 RelocationErrorShared folders can't be copied.static final RelocationErrorYou cannot move a folder into itself.static final RelocationErrorCan't move the shared folder to the given destination.static final RelocationErrorYour move operation would result in nested shared folders.static final RelocationErrorYour move operation would result in an ownership transfer.static final RelocationErrorThere are duplicated/nested paths amongRelocationPath.getFromPath()andRelocationPath.getToPath().static final RelocationErrorThe current user does not have enough space to move or copy the files.static final RelocationErrorSomething went wrong with the job on Dropbox's end.static final RelocationErrorCatch-all used for unknown tag values returned by the Dropbox servers.static final RelocationErrorThe operation would involve more than 10,000 files and folders. -
Method Summary
Modifier and TypeMethodDescriptionstatic RelocationErrorReturns an instance ofRelocationErrorthat has its tag set toRelocationError.Tag.CANT_MOVE_INTO_FAMILY.static RelocationErrorReturns an instance ofRelocationErrorthat has its tag set toRelocationError.Tag.CANT_MOVE_INTO_VAULT.booleanstatic RelocationErrorfromLookup(LookupError value) Returns an instance ofRelocationErrorthat has its tag set toRelocationError.Tag.FROM_LOOKUP.static RelocationErrorfromWrite(WriteError value) Returns an instance ofRelocationErrorthat has its tag set toRelocationError.Tag.FROM_WRITE.Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error.Some content cannot be moved into Vault under certain circumstances, see detailed error.This instance must be tagged asRelocationError.Tag.FROM_LOOKUP.This instance must be tagged asRelocationError.Tag.FROM_WRITE.This instance must be tagged asRelocationError.Tag.TO.inthashCode()booleanReturnstrueif this instance has the tagRelocationError.Tag.CANT_COPY_SHARED_FOLDER,falseotherwise.booleanReturnstrueif this instance has the tagRelocationError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF,falseotherwise.booleanReturnstrueif this instance has the tagRelocationError.Tag.CANT_MOVE_INTO_FAMILY,falseotherwise.booleanReturnstrueif this instance has the tagRelocationError.Tag.CANT_MOVE_INTO_VAULT,falseotherwise.booleanReturnstrueif this instance has the tagRelocationError.Tag.CANT_MOVE_SHARED_FOLDER,falseotherwise.booleanReturnstrueif this instance has the tagRelocationError.Tag.CANT_NEST_SHARED_FOLDER,falseotherwise.booleanReturnstrueif this instance has the tagRelocationError.Tag.CANT_TRANSFER_OWNERSHIP,falseotherwise.booleanReturnstrueif this instance has the tagRelocationError.Tag.DUPLICATED_OR_NESTED_PATHS,falseotherwise.booleanbooleanbooleanbooleanbooleanisOther()booleanisTo()booleantag()Returns the tag for this instance.static RelocationErrorto(WriteError value) Returns an instance ofRelocationErrorthat has its tag set toRelocationError.Tag.TO.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
CANT_COPY_SHARED_FOLDER
Shared folders can't be copied. -
CANT_NEST_SHARED_FOLDER
Your move operation would result in nested shared folders. This is not allowed. -
CANT_MOVE_FOLDER_INTO_ITSELF
You cannot move a folder into itself. -
TOO_MANY_FILES
The operation would involve more than 10,000 files and folders. -
DUPLICATED_OR_NESTED_PATHS
There are duplicated/nested paths amongRelocationPath.getFromPath()andRelocationPath.getToPath(). -
CANT_TRANSFER_OWNERSHIP
Your move operation would result in an ownership transfer. You may reissue the request with the fieldRelocationArg.getAllowOwnershipTransfer()to true. -
INSUFFICIENT_QUOTA
The current user does not have enough space to move or copy the files. -
INTERNAL_ERROR
Something went wrong with the job on Dropbox's end. You'll need to verify that the action you were taking succeeded, and if not, try again. This should happen very rarely. -
CANT_MOVE_SHARED_FOLDER
Can't move the shared folder to the given destination. -
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 thisRelocationError.If a tag returned by the server is unrecognized by this SDK, the
RelocationError.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isFromLookup
public boolean isFromLookup()- Returns:
trueif this instance is tagged asRelocationError.Tag.FROM_LOOKUP,falseotherwise.
-
fromLookup
Returns an instance ofRelocationErrorthat has its tag set toRelocationError.Tag.FROM_LOOKUP.None
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
RelocationErrorwith its tag set toRelocationError.Tag.FROM_LOOKUP. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getFromLookupValue
This instance must be tagged asRelocationError.Tag.FROM_LOOKUP.- Returns:
- The
LookupErrorvalue associated with this instance ifisFromLookup()istrue. - Throws:
IllegalStateException- IfisFromLookup()isfalse.
-
isFromWrite
public boolean isFromWrite()- Returns:
trueif this instance is tagged asRelocationError.Tag.FROM_WRITE,falseotherwise.
-
fromWrite
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
RelocationErrorwith its tag set toRelocationError.Tag.FROM_WRITE. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getFromWriteValue
This instance must be tagged asRelocationError.Tag.FROM_WRITE.- Returns:
- The
WriteErrorvalue associated with this instance ifisFromWrite()istrue. - Throws:
IllegalStateException- IfisFromWrite()isfalse.
-
isTo
public boolean isTo()- Returns:
trueif this instance is tagged asRelocationError.Tag.TO,falseotherwise.
-
to
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
RelocationErrorwith its tag set toRelocationError.Tag.TO. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getToValue
This instance must be tagged asRelocationError.Tag.TO.- Returns:
- The
WriteErrorvalue associated with this instance ifisTo()istrue. - Throws:
IllegalStateException- IfisTo()isfalse.
-
isCantMoveFolderIntoItself
public boolean isCantMoveFolderIntoItself()Returnstrueif this instance has the tagRelocationError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF,falseotherwise.- Returns:
trueif this instance is tagged asRelocationError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF,falseotherwise.
-
isTooManyFiles
public boolean isTooManyFiles()- Returns:
trueif this instance is tagged asRelocationError.Tag.TOO_MANY_FILES,falseotherwise.
-
isDuplicatedOrNestedPaths
public boolean isDuplicatedOrNestedPaths()Returnstrueif this instance has the tagRelocationError.Tag.DUPLICATED_OR_NESTED_PATHS,falseotherwise.- Returns:
trueif this instance is tagged asRelocationError.Tag.DUPLICATED_OR_NESTED_PATHS,falseotherwise.
-
isCantTransferOwnership
public boolean isCantTransferOwnership()Returnstrueif this instance has the tagRelocationError.Tag.CANT_TRANSFER_OWNERSHIP,falseotherwise.- Returns:
trueif this instance is tagged asRelocationError.Tag.CANT_TRANSFER_OWNERSHIP,falseotherwise.
-
isInsufficientQuota
public boolean isInsufficientQuota()- Returns:
trueif this instance is tagged asRelocationError.Tag.INSUFFICIENT_QUOTA,falseotherwise.
-
isInternalError
public boolean isInternalError()- Returns:
trueif this instance is tagged asRelocationError.Tag.INTERNAL_ERROR,falseotherwise.
-
isCantMoveIntoVault
public boolean isCantMoveIntoVault()Returnstrueif this instance has the tagRelocationError.Tag.CANT_MOVE_INTO_VAULT,falseotherwise.- Returns:
trueif this instance is tagged asRelocationError.Tag.CANT_MOVE_INTO_VAULT,falseotherwise.
-
cantMoveIntoVault
Returns an instance ofRelocationErrorthat has its tag set toRelocationError.Tag.CANT_MOVE_INTO_VAULT.Some content cannot be moved into Vault under certain circumstances, see detailed error.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
RelocationErrorwith its tag set toRelocationError.Tag.CANT_MOVE_INTO_VAULT. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getCantMoveIntoVaultValue
Some content cannot be moved into Vault under certain circumstances, see detailed error.This instance must be tagged as
RelocationError.Tag.CANT_MOVE_INTO_VAULT.- Returns:
- The
MoveIntoVaultErrorvalue associated with this instance ifisCantMoveIntoVault()istrue. - Throws:
IllegalStateException- IfisCantMoveIntoVault()isfalse.
-
isCantMoveIntoFamily
public boolean isCantMoveIntoFamily()Returnstrueif this instance has the tagRelocationError.Tag.CANT_MOVE_INTO_FAMILY,falseotherwise.- Returns:
trueif this instance is tagged asRelocationError.Tag.CANT_MOVE_INTO_FAMILY,falseotherwise.
-
cantMoveIntoFamily
Returns an instance ofRelocationErrorthat has its tag set toRelocationError.Tag.CANT_MOVE_INTO_FAMILY.Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
RelocationErrorwith its tag set toRelocationError.Tag.CANT_MOVE_INTO_FAMILY. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getCantMoveIntoFamilyValue
Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error.This instance must be tagged as
RelocationError.Tag.CANT_MOVE_INTO_FAMILY.- Returns:
- The
MoveIntoFamilyErrorvalue associated with this instance ifisCantMoveIntoFamily()istrue. - Throws:
IllegalStateException- IfisCantMoveIntoFamily()isfalse.
-
isOther
public boolean isOther()- Returns:
trueif this instance is tagged asRelocationError.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
-