Class RelocationBatchError
- java.lang.Object
-
- com.dropbox.core.v2.files.RelocationBatchError
-
public final class RelocationBatchError 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
RelocationBatchError.Tag
Discriminating tag type forRelocationBatchError
.
-
Field Summary
Fields Modifier and Type Field Description static RelocationBatchError
CANT_COPY_SHARED_FOLDER
Shared folders can't be copied.static RelocationBatchError
CANT_MOVE_FOLDER_INTO_ITSELF
You cannot move a folder into itself.static RelocationBatchError
CANT_MOVE_SHARED_FOLDER
Can't move the shared folder to the given destination.static RelocationBatchError
CANT_NEST_SHARED_FOLDER
Your move operation would result in nested shared folders.static RelocationBatchError
CANT_TRANSFER_OWNERSHIP
Your move operation would result in an ownership transfer.static RelocationBatchError
DUPLICATED_OR_NESTED_PATHS
There are duplicated/nested paths amongRelocationPath.getFromPath()
andRelocationPath.getToPath()
.static RelocationBatchError
INSUFFICIENT_QUOTA
The current user does not have enough space to move or copy the files.static RelocationBatchError
INTERNAL_ERROR
Something went wrong with the job on Dropbox's end.static RelocationBatchError
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.static RelocationBatchError
TOO_MANY_FILES
The operation would involve more than 10,000 files and folders.static RelocationBatchError
TOO_MANY_WRITE_OPERATIONS
There are too many write operations in user's Dropbox.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RelocationBatchError
cantMoveIntoFamily(MoveIntoFamilyError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.Tag.CANT_MOVE_INTO_FAMILY
.static RelocationBatchError
cantMoveIntoVault(MoveIntoVaultError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.Tag.CANT_MOVE_INTO_VAULT
.boolean
equals(java.lang.Object obj)
static RelocationBatchError
fromLookup(LookupError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.Tag.FROM_LOOKUP
.static RelocationBatchError
fromWrite(WriteError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.Tag.FROM_WRITE
.MoveIntoFamilyError
getCantMoveIntoFamilyValue()
Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error.MoveIntoVaultError
getCantMoveIntoVaultValue()
Some content cannot be moved into Vault under certain circumstances, see detailed error.LookupError
getFromLookupValue()
This instance must be tagged asRelocationBatchError.Tag.FROM_LOOKUP
.WriteError
getFromWriteValue()
This instance must be tagged asRelocationBatchError.Tag.FROM_WRITE
.WriteError
getToValue()
This instance must be tagged asRelocationBatchError.Tag.TO
.int
hashCode()
boolean
isCantCopySharedFolder()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_COPY_SHARED_FOLDER
,false
otherwise.boolean
isCantMoveFolderIntoItself()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF
,false
otherwise.boolean
isCantMoveIntoFamily()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_MOVE_INTO_FAMILY
,false
otherwise.boolean
isCantMoveIntoVault()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_MOVE_INTO_VAULT
,false
otherwise.boolean
isCantMoveSharedFolder()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_MOVE_SHARED_FOLDER
,false
otherwise.boolean
isCantNestSharedFolder()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_NEST_SHARED_FOLDER
,false
otherwise.boolean
isCantTransferOwnership()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_TRANSFER_OWNERSHIP
,false
otherwise.boolean
isDuplicatedOrNestedPaths()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.DUPLICATED_OR_NESTED_PATHS
,false
otherwise.boolean
isFromLookup()
boolean
isFromWrite()
boolean
isInsufficientQuota()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.INSUFFICIENT_QUOTA
,false
otherwise.boolean
isInternalError()
boolean
isOther()
boolean
isTo()
boolean
isTooManyFiles()
boolean
isTooManyWriteOperations()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.TOO_MANY_WRITE_OPERATIONS
,false
otherwise.RelocationBatchError.Tag
tag()
Returns the tag for this instance.static RelocationBatchError
to(WriteError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.Tag.TO
.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
CANT_COPY_SHARED_FOLDER
public static final RelocationBatchError CANT_COPY_SHARED_FOLDER
Shared folders can't be copied.
-
CANT_NEST_SHARED_FOLDER
public static final RelocationBatchError CANT_NEST_SHARED_FOLDER
Your move operation would result in nested shared folders. This is not allowed.
-
CANT_MOVE_FOLDER_INTO_ITSELF
public static final RelocationBatchError CANT_MOVE_FOLDER_INTO_ITSELF
You cannot move a folder into itself.
-
TOO_MANY_FILES
public static final RelocationBatchError TOO_MANY_FILES
The operation would involve more than 10,000 files and folders.
-
DUPLICATED_OR_NESTED_PATHS
public static final RelocationBatchError DUPLICATED_OR_NESTED_PATHS
There are duplicated/nested paths amongRelocationPath.getFromPath()
andRelocationPath.getToPath()
.
-
CANT_TRANSFER_OWNERSHIP
public static final RelocationBatchError 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
public static final RelocationBatchError INSUFFICIENT_QUOTA
The current user does not have enough space to move or copy the files.
-
INTERNAL_ERROR
public static final RelocationBatchError 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
public static final RelocationBatchError CANT_MOVE_SHARED_FOLDER
Can't move the shared folder to the given destination.
-
OTHER
public static final RelocationBatchError 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.
-
TOO_MANY_WRITE_OPERATIONS
public static final RelocationBatchError TOO_MANY_WRITE_OPERATIONS
There are too many write operations in user's Dropbox. Please retry this request.
-
-
Method Detail
-
tag
public RelocationBatchError.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 thisRelocationBatchError
.- Returns:
- the tag for this instance.
-
isFromLookup
public boolean isFromLookup()
- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.FROM_LOOKUP
,false
otherwise.
-
fromLookup
public static RelocationBatchError fromLookup(LookupError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.Tag.FROM_LOOKUP
.None
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
RelocationBatchError
with its tag set toRelocationBatchError.Tag.FROM_LOOKUP
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getFromLookupValue
public LookupError getFromLookupValue()
This instance must be tagged asRelocationBatchError.Tag.FROM_LOOKUP
.- Returns:
- The
LookupError
value associated with this instance ifisFromLookup()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisFromLookup()
isfalse
.
-
isFromWrite
public boolean isFromWrite()
- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.FROM_WRITE
,false
otherwise.
-
fromWrite
public static RelocationBatchError fromWrite(WriteError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.Tag.FROM_WRITE
.None
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
RelocationBatchError
with its tag set toRelocationBatchError.Tag.FROM_WRITE
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getFromWriteValue
public WriteError getFromWriteValue()
This instance must be tagged asRelocationBatchError.Tag.FROM_WRITE
.- Returns:
- The
WriteError
value associated with this instance ifisFromWrite()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisFromWrite()
isfalse
.
-
isTo
public boolean isTo()
- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.TO
,false
otherwise.
-
to
public static RelocationBatchError to(WriteError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.Tag.TO
.None
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
RelocationBatchError
with its tag set toRelocationBatchError.Tag.TO
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getToValue
public WriteError getToValue()
This instance must be tagged asRelocationBatchError.Tag.TO
.- Returns:
- The
WriteError
value associated with this instance ifisTo()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisTo()
isfalse
.
-
isCantCopySharedFolder
public boolean isCantCopySharedFolder()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_COPY_SHARED_FOLDER
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.CANT_COPY_SHARED_FOLDER
,false
otherwise.
-
isCantNestSharedFolder
public boolean isCantNestSharedFolder()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_NEST_SHARED_FOLDER
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.CANT_NEST_SHARED_FOLDER
,false
otherwise.
-
isCantMoveFolderIntoItself
public boolean isCantMoveFolderIntoItself()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF
,false
otherwise.
-
isTooManyFiles
public boolean isTooManyFiles()
- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.TOO_MANY_FILES
,false
otherwise.
-
isDuplicatedOrNestedPaths
public boolean isDuplicatedOrNestedPaths()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.DUPLICATED_OR_NESTED_PATHS
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.DUPLICATED_OR_NESTED_PATHS
,false
otherwise.
-
isCantTransferOwnership
public boolean isCantTransferOwnership()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_TRANSFER_OWNERSHIP
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.CANT_TRANSFER_OWNERSHIP
,false
otherwise.
-
isInsufficientQuota
public boolean isInsufficientQuota()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.INSUFFICIENT_QUOTA
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.INSUFFICIENT_QUOTA
,false
otherwise.
-
isInternalError
public boolean isInternalError()
- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.INTERNAL_ERROR
,false
otherwise.
-
isCantMoveSharedFolder
public boolean isCantMoveSharedFolder()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_MOVE_SHARED_FOLDER
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.CANT_MOVE_SHARED_FOLDER
,false
otherwise.
-
isCantMoveIntoVault
public boolean isCantMoveIntoVault()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_MOVE_INTO_VAULT
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.CANT_MOVE_INTO_VAULT
,false
otherwise.
-
cantMoveIntoVault
public static RelocationBatchError cantMoveIntoVault(MoveIntoVaultError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.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
RelocationBatchError
with its tag set toRelocationBatchError.Tag.CANT_MOVE_INTO_VAULT
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getCantMoveIntoVaultValue
public MoveIntoVaultError getCantMoveIntoVaultValue()
Some content cannot be moved into Vault under certain circumstances, see detailed error.This instance must be tagged as
RelocationBatchError.Tag.CANT_MOVE_INTO_VAULT
.- Returns:
- The
MoveIntoVaultError
value associated with this instance ifisCantMoveIntoVault()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisCantMoveIntoVault()
isfalse
.
-
isCantMoveIntoFamily
public boolean isCantMoveIntoFamily()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.CANT_MOVE_INTO_FAMILY
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.CANT_MOVE_INTO_FAMILY
,false
otherwise.
-
cantMoveIntoFamily
public static RelocationBatchError cantMoveIntoFamily(MoveIntoFamilyError value)
Returns an instance ofRelocationBatchError
that has its tag set toRelocationBatchError.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
RelocationBatchError
with its tag set toRelocationBatchError.Tag.CANT_MOVE_INTO_FAMILY
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getCantMoveIntoFamilyValue
public MoveIntoFamilyError getCantMoveIntoFamilyValue()
Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error.This instance must be tagged as
RelocationBatchError.Tag.CANT_MOVE_INTO_FAMILY
.- Returns:
- The
MoveIntoFamilyError
value associated with this instance ifisCantMoveIntoFamily()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisCantMoveIntoFamily()
isfalse
.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.OTHER
,false
otherwise.
-
isTooManyWriteOperations
public boolean isTooManyWriteOperations()
Returnstrue
if this instance has the tagRelocationBatchError.Tag.TOO_MANY_WRITE_OPERATIONS
,false
otherwise.- Returns:
true
if this instance is tagged asRelocationBatchError.Tag.TOO_MANY_WRITE_OPERATIONS
,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
-
-