public final class RelocationError 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 |
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_NEST_SHARED_FOLDER
Your move operation would result in nested shared folders.
|
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 |
---|---|
boolean |
equals(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 . |
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 |
isCantNestSharedFolder()
Returns
true if this instance has the tag RelocationError.Tag.CANT_NEST_SHARED_FOLDER , false otherwise. |
boolean |
isFromLookup()
|
boolean |
isFromWrite()
|
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 . |
String |
toString() |
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 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
.IllegalArgumentException
- if value
is null
.public LookupError getFromLookupValue()
RelocationError.Tag.FROM_LOOKUP
.LookupError
value associated with this instance if
isFromLookup()
is true
.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
.IllegalArgumentException
- if value
is null
.public WriteError getFromWriteValue()
RelocationError.Tag.FROM_WRITE
.WriteError
value associated with this instance if
isFromWrite()
is true
.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
.IllegalArgumentException
- if value
is null
.public WriteError getToValue()
RelocationError.Tag.TO
.WriteError
value associated with this instance if
isTo()
is true
.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 isOther()
true
if this instance is tagged as RelocationError.Tag.OTHER
,
false
otherwise.public String toStringMultiline()
The returned String may contain newlines.