public final class RelocationError
extends java.lang.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 |
RelocationError.Tag
Discriminating tag type for
RelocationError . |
Modifier and Type | Field and Description |
---|---|
static RelocationError |
CANT_COPY_SHARED_FOLDER
Shared folders can't be copied.
|
static RelocationError |
CANT_MOVE_FOLDER_INTO_ITSELF
You cannot move a folder into itself.
|
static RelocationError |
CANT_MOVE_SHARED_FOLDER
Can't move the shared folder to the given destination.
|
static RelocationError |
CANT_NEST_SHARED_FOLDER
Your move operation would result in nested shared folders.
|
static RelocationError |
CANT_TRANSFER_OWNERSHIP
Your move operation would result in an ownership transfer.
|
static RelocationError |
DUPLICATED_OR_NESTED_PATHS
There are duplicated/nested paths among
RelocationArg.getFromPath()
and RelocationArg.getToPath() . |
static RelocationError |
INSUFFICIENT_QUOTA
The current user does not have enough space to move or copy the files.
|
static RelocationError |
INTERNAL_ERROR
Something went wrong with the job on Dropbox's end.
|
static RelocationError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
static RelocationError |
TOO_MANY_FILES
The operation would involve more than 10,000 files and folders.
|
Modifier and Type | Method and Description |
---|---|
static RelocationError |
cantMoveIntoVault(MoveIntoVaultError value)
Returns an instance of
RelocationError that has its tag set to
RelocationError.Tag.CANT_MOVE_INTO_VAULT . |
boolean |
equals(java.lang.Object obj) |
static RelocationError |
fromLookup(LookupError value)
Returns an instance of
RelocationError that has its tag set to
RelocationError.Tag.FROM_LOOKUP . |
static RelocationError |
fromWrite(WriteError value)
Returns an instance of
RelocationError that has its tag set to
RelocationError.Tag.FROM_WRITE . |
MoveIntoVaultError |
getCantMoveIntoVaultValue()
Some content cannot be moved into Vault under certain circumstances, see
detailed error.
|
LookupError |
getFromLookupValue()
This instance must be tagged as
RelocationError.Tag.FROM_LOOKUP . |
WriteError |
getFromWriteValue()
This instance must be tagged as
RelocationError.Tag.FROM_WRITE . |
WriteError |
getToValue()
This instance must be tagged as
RelocationError.Tag.TO . |
int |
hashCode() |
boolean |
isCantCopySharedFolder()
Returns
true if this instance has the tag RelocationError.Tag.CANT_COPY_SHARED_FOLDER , false otherwise. |
boolean |
isCantMoveFolderIntoItself()
Returns
true if this instance has the tag RelocationError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF , false otherwise. |
boolean |
isCantMoveIntoVault()
Returns
true if this instance has the tag RelocationError.Tag.CANT_MOVE_INTO_VAULT , false otherwise. |
boolean |
isCantMoveSharedFolder()
Returns
true if this instance has the tag RelocationError.Tag.CANT_MOVE_SHARED_FOLDER , false otherwise. |
boolean |
isCantNestSharedFolder()
Returns
true if this instance has the tag RelocationError.Tag.CANT_NEST_SHARED_FOLDER , false otherwise. |
boolean |
isCantTransferOwnership()
Returns
true if this instance has the tag RelocationError.Tag.CANT_TRANSFER_OWNERSHIP , false otherwise. |
boolean |
isDuplicatedOrNestedPaths()
Returns
true if this instance has the tag RelocationError.Tag.DUPLICATED_OR_NESTED_PATHS , false otherwise. |
boolean |
isFromLookup()
|
boolean |
isFromWrite()
|
boolean |
isInsufficientQuota()
|
boolean |
isInternalError()
|
boolean |
isOther()
|
boolean |
isTo()
|
boolean |
isTooManyFiles()
|
RelocationError.Tag |
tag()
Returns the tag for this instance.
|
static RelocationError |
to(WriteError value)
Returns an instance of
RelocationError that has its tag set to
RelocationError.Tag.TO . |
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final RelocationError CANT_COPY_SHARED_FOLDER
public static final RelocationError CANT_NEST_SHARED_FOLDER
public static final RelocationError CANT_MOVE_FOLDER_INTO_ITSELF
public static final RelocationError TOO_MANY_FILES
public static final RelocationError DUPLICATED_OR_NESTED_PATHS
RelocationArg.getFromPath()
and RelocationArg.getToPath()
.public static final RelocationError CANT_TRANSFER_OWNERSHIP
RelocationArg.getAllowOwnershipTransfer()
to true.public static final RelocationError INSUFFICIENT_QUOTA
public static final RelocationError INTERNAL_ERROR
public static final RelocationError CANT_MOVE_SHARED_FOLDER
public static final RelocationError 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 RelocationError.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 RelocationError
.
If a tag returned by the server is unrecognized by this SDK, the
RelocationError.Tag.OTHER
value will be used.
public boolean isFromLookup()
true
if this instance is tagged as RelocationError.Tag.FROM_LOOKUP
, false
otherwise.public static RelocationError fromLookup(LookupError value)
RelocationError
that has its tag set to
RelocationError.Tag.FROM_LOOKUP
.
None
value
- value to assign to this instance.RelocationError
with its tag set to RelocationError.Tag.FROM_LOOKUP
.java.lang.IllegalArgumentException
- if value
is null
.public LookupError getFromLookupValue()
RelocationError.Tag.FROM_LOOKUP
.LookupError
value associated with this instance if
isFromLookup()
is true
.java.lang.IllegalStateException
- If isFromLookup()
is false
.public boolean isFromWrite()
true
if this instance is tagged as RelocationError.Tag.FROM_WRITE
, false
otherwise.public static RelocationError fromWrite(WriteError value)
value
- value to assign to this instance.RelocationError
with its tag set to RelocationError.Tag.FROM_WRITE
.java.lang.IllegalArgumentException
- if value
is null
.public WriteError getFromWriteValue()
RelocationError.Tag.FROM_WRITE
.WriteError
value associated with this instance if
isFromWrite()
is true
.java.lang.IllegalStateException
- If isFromWrite()
is false
.public boolean isTo()
true
if this instance is tagged as RelocationError.Tag.TO
, false
otherwise.public static RelocationError to(WriteError value)
value
- value to assign to this instance.RelocationError
with its tag set to RelocationError.Tag.TO
.java.lang.IllegalArgumentException
- if value
is null
.public WriteError getToValue()
RelocationError.Tag.TO
.WriteError
value associated with this instance if
isTo()
is true
.java.lang.IllegalStateException
- If isTo()
is false
.public boolean isCantCopySharedFolder()
true
if this instance has the tag RelocationError.Tag.CANT_COPY_SHARED_FOLDER
, false
otherwise.true
if this instance is tagged as RelocationError.Tag.CANT_COPY_SHARED_FOLDER
, false
otherwise.public boolean isCantNestSharedFolder()
true
if this instance has the tag RelocationError.Tag.CANT_NEST_SHARED_FOLDER
, false
otherwise.true
if this instance is tagged as RelocationError.Tag.CANT_NEST_SHARED_FOLDER
, false
otherwise.public boolean isCantMoveFolderIntoItself()
true
if this instance has the tag RelocationError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF
, false
otherwise.true
if this instance is tagged as RelocationError.Tag.CANT_MOVE_FOLDER_INTO_ITSELF
, false
otherwise.public boolean isTooManyFiles()
true
if this instance is tagged as RelocationError.Tag.TOO_MANY_FILES
, false
otherwise.public boolean isDuplicatedOrNestedPaths()
true
if this instance has the tag RelocationError.Tag.DUPLICATED_OR_NESTED_PATHS
, false
otherwise.true
if this instance is tagged as RelocationError.Tag.DUPLICATED_OR_NESTED_PATHS
, false
otherwise.public boolean isCantTransferOwnership()
true
if this instance has the tag RelocationError.Tag.CANT_TRANSFER_OWNERSHIP
, false
otherwise.true
if this instance is tagged as RelocationError.Tag.CANT_TRANSFER_OWNERSHIP
, false
otherwise.public boolean isInsufficientQuota()
true
if this instance is tagged as RelocationError.Tag.INSUFFICIENT_QUOTA
, false
otherwise.public boolean isInternalError()
true
if this instance is tagged as RelocationError.Tag.INTERNAL_ERROR
, false
otherwise.public boolean isCantMoveSharedFolder()
true
if this instance has the tag RelocationError.Tag.CANT_MOVE_SHARED_FOLDER
, false
otherwise.true
if this instance is tagged as RelocationError.Tag.CANT_MOVE_SHARED_FOLDER
, false
otherwise.public boolean isCantMoveIntoVault()
true
if this instance has the tag RelocationError.Tag.CANT_MOVE_INTO_VAULT
, false
otherwise.true
if this instance is tagged as RelocationError.Tag.CANT_MOVE_INTO_VAULT
, false
otherwise.public static RelocationError cantMoveIntoVault(MoveIntoVaultError value)
RelocationError
that has its tag set to
RelocationError.Tag.CANT_MOVE_INTO_VAULT
.
Some content cannot be moved into Vault under certain circumstances, see detailed error.
value
- value to assign to this instance.RelocationError
with its tag set to RelocationError.Tag.CANT_MOVE_INTO_VAULT
.java.lang.IllegalArgumentException
- if value
is null
.public MoveIntoVaultError getCantMoveIntoVaultValue()
This instance must be tagged as RelocationError.Tag.CANT_MOVE_INTO_VAULT
.
MoveIntoVaultError
value associated with this
instance if isCantMoveIntoVault()
is true
.java.lang.IllegalStateException
- If isCantMoveIntoVault()
is false
.public boolean isOther()
true
if this instance is tagged as RelocationError.Tag.OTHER
,
false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.