public final class LookupError
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 |
LookupError.Serializer
For internal use only.
|
static class |
LookupError.Tag
Discriminating tag type for
LookupError . |
Modifier and Type | Field and Description |
---|---|
static LookupError |
LOCKED
The given path is locked.
|
static LookupError |
NOT_FILE
We were expecting a file, but the given path refers to something that
isn't a file.
|
static LookupError |
NOT_FOLDER
We were expecting a folder, but the given path refers to something that
isn't a folder.
|
static LookupError |
NOT_FOUND
There is nothing at the given path.
|
static LookupError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
static LookupError |
RESTRICTED_CONTENT
The file cannot be transferred because the content is restricted.
|
static LookupError |
UNSUPPORTED_CONTENT_TYPE
This operation is not supported for this content type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getMalformedPathValue()
The given path does not satisfy the required path format.
|
int |
hashCode() |
boolean |
isLocked()
|
boolean |
isMalformedPath()
|
boolean |
isNotFile()
|
boolean |
isNotFolder()
|
boolean |
isNotFound()
|
boolean |
isOther()
|
boolean |
isRestrictedContent()
|
boolean |
isUnsupportedContentType()
Returns
true if this instance has the tag LookupError.Tag.UNSUPPORTED_CONTENT_TYPE , false otherwise. |
static LookupError |
malformedPath()
Returns an instance of
LookupError that has its tag set to LookupError.Tag.MALFORMED_PATH . |
static LookupError |
malformedPath(java.lang.String value)
Returns an instance of
LookupError that has its tag set to LookupError.Tag.MALFORMED_PATH . |
LookupError.Tag |
tag()
Returns the tag for this instance.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final LookupError NOT_FOUND
public static final LookupError NOT_FILE
public static final LookupError NOT_FOLDER
public static final LookupError RESTRICTED_CONTENT
public static final LookupError UNSUPPORTED_CONTENT_TYPE
public static final LookupError LOCKED
public static final LookupError 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 LookupError.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 LookupError
.
If a tag returned by the server is unrecognized by this SDK, the
LookupError.Tag.OTHER
value will be used.
public boolean isMalformedPath()
true
if this instance is tagged as LookupError.Tag.MALFORMED_PATH
, false
otherwise.public static LookupError malformedPath(java.lang.String value)
LookupError
that has its tag set to LookupError.Tag.MALFORMED_PATH
.
The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.
value
- value to assign to this instance.LookupError
with its tag set to LookupError.Tag.MALFORMED_PATH
.public static LookupError malformedPath()
LookupError
that has its tag set to LookupError.Tag.MALFORMED_PATH
.
The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.
LookupError
with its tag set to LookupError.Tag.MALFORMED_PATH
.public java.lang.String getMalformedPathValue()
This instance must be tagged as LookupError.Tag.MALFORMED_PATH
.
String
value associated with this instance if isMalformedPath()
is true
.java.lang.IllegalStateException
- If isMalformedPath()
is false
.public boolean isNotFound()
true
if this instance is tagged as LookupError.Tag.NOT_FOUND
,
false
otherwise.public boolean isNotFile()
true
if this instance is tagged as LookupError.Tag.NOT_FILE
,
false
otherwise.public boolean isNotFolder()
true
if this instance is tagged as LookupError.Tag.NOT_FOLDER
, false
otherwise.public boolean isRestrictedContent()
true
if this instance is tagged as LookupError.Tag.RESTRICTED_CONTENT
, false
otherwise.public boolean isUnsupportedContentType()
true
if this instance has the tag LookupError.Tag.UNSUPPORTED_CONTENT_TYPE
, false
otherwise.true
if this instance is tagged as LookupError.Tag.UNSUPPORTED_CONTENT_TYPE
, false
otherwise.public boolean isLocked()
true
if this instance is tagged as LookupError.Tag.LOCKED
,
false
otherwise.public boolean isOther()
true
if this instance is tagged as LookupError.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.