public final class UploadSessionLookupError 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 |
UploadSessionLookupError.Tag
Discriminating tag type for
UploadSessionLookupError . |
Modifier and Type | Field and Description |
---|---|
static UploadSessionLookupError |
CLOSED
You are attempting to append data to an upload session that has alread
been closed (i.e.
|
static UploadSessionLookupError |
NOT_CLOSED
The session must be closed before calling upload_session/finish_batch.
|
static UploadSessionLookupError |
NOT_FOUND
The upload session id was not found.
|
static UploadSessionLookupError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
UploadSessionOffsetError |
getIncorrectOffsetValue()
The specified offset was incorrect.
|
int |
hashCode() |
static UploadSessionLookupError |
incorrectOffset(UploadSessionOffsetError value)
Returns an instance of
UploadSessionLookupError that has its tag
set to UploadSessionLookupError.Tag.INCORRECT_OFFSET . |
boolean |
isClosed()
|
boolean |
isIncorrectOffset()
Returns
true if this instance has the tag UploadSessionLookupError.Tag.INCORRECT_OFFSET , false otherwise. |
boolean |
isNotClosed()
|
boolean |
isNotFound()
|
boolean |
isOther()
|
UploadSessionLookupError.Tag |
tag()
Returns the tag for this instance.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final UploadSessionLookupError NOT_FOUND
public static final UploadSessionLookupError CLOSED
public static final UploadSessionLookupError NOT_CLOSED
public static final UploadSessionLookupError 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 UploadSessionLookupError.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 UploadSessionLookupError
.
If a tag returned by the server is unrecognized by this SDK, the
UploadSessionLookupError.Tag.OTHER
value will be used.
public boolean isNotFound()
true
if this instance is tagged as UploadSessionLookupError.Tag.NOT_FOUND
,
false
otherwise.public boolean isIncorrectOffset()
true
if this instance has the tag UploadSessionLookupError.Tag.INCORRECT_OFFSET
, false
otherwise.true
if this instance is tagged as UploadSessionLookupError.Tag.INCORRECT_OFFSET
, false
otherwise.public static UploadSessionLookupError incorrectOffset(UploadSessionOffsetError value)
UploadSessionLookupError
that has its tag
set to UploadSessionLookupError.Tag.INCORRECT_OFFSET
.
The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error.
value
- value to assign to this instance.UploadSessionLookupError
with its tag set to
UploadSessionLookupError.Tag.INCORRECT_OFFSET
.IllegalArgumentException
- if value
is null
.public UploadSessionOffsetError getIncorrectOffsetValue()
This instance must be tagged as UploadSessionLookupError.Tag.INCORRECT_OFFSET
.
UploadSessionOffsetError
value associated with this
instance if isIncorrectOffset()
is true
.IllegalStateException
- If isIncorrectOffset()
is false
.public boolean isClosed()
true
if this instance is tagged as UploadSessionLookupError.Tag.CLOSED
,
false
otherwise.public boolean isNotClosed()
true
if this instance is tagged as UploadSessionLookupError.Tag.NOT_CLOSED
, false
otherwise.public boolean isOther()
true
if this instance is tagged as UploadSessionLookupError.Tag.OTHER
,
false
otherwise.public String toStringMultiline()
The returned String may contain newlines.