Class UploadSessionFinishError
- java.lang.Object
-
- com.dropbox.core.v2.files.UploadSessionFinishError
-
public final class UploadSessionFinishError extends java.lang.Object
This class is an open 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.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UploadSessionFinishError.Tag
Discriminating tag type forUploadSessionFinishError
.
-
Field Summary
Fields Modifier and Type Field Description static UploadSessionFinishError
CONCURRENT_SESSION_DATA_NOT_ALLOWED
Uploading data not allowed when finishing concurrent upload session.static UploadSessionFinishError
CONCURRENT_SESSION_MISSING_DATA
Not all pieces of data were uploaded before trying to finish the session.static UploadSessionFinishError
CONCURRENT_SESSION_NOT_CLOSED
Concurrent upload sessions need to be closed before finishing.static UploadSessionFinishError
CONTENT_HASH_MISMATCH
The content received by the Dropbox server in this call does not match the provided content hash.static UploadSessionFinishError
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.static UploadSessionFinishError
PAYLOAD_TOO_LARGE
The request payload must be at most 150 MB.static UploadSessionFinishError
TOO_MANY_SHARED_FOLDER_TARGETS
The batch request commits files into too many different shared folders.static UploadSessionFinishError
TOO_MANY_WRITE_OPERATIONS
There are too many write operations happening in the user's Dropbox.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
UploadSessionLookupError
getLookupFailedValue()
The session arguments are incorrect; the value explains the reason.WriteError
getPathValue()
Unable to save the uploaded contents to a file.InvalidPropertyGroupError
getPropertiesErrorValue()
The supplied property group is invalid.int
hashCode()
boolean
isConcurrentSessionDataNotAllowed()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_DATA_NOT_ALLOWED
,false
otherwise.boolean
isConcurrentSessionMissingData()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_MISSING_DATA
,false
otherwise.boolean
isConcurrentSessionNotClosed()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_NOT_CLOSED
,false
otherwise.boolean
isContentHashMismatch()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.CONTENT_HASH_MISMATCH
,false
otherwise.boolean
isLookupFailed()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.LOOKUP_FAILED
,false
otherwise.boolean
isOther()
boolean
isPath()
boolean
isPayloadTooLarge()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.PAYLOAD_TOO_LARGE
,false
otherwise.boolean
isPropertiesError()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.PROPERTIES_ERROR
,false
otherwise.boolean
isTooManySharedFolderTargets()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.TOO_MANY_SHARED_FOLDER_TARGETS
,false
otherwise.boolean
isTooManyWriteOperations()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.TOO_MANY_WRITE_OPERATIONS
,false
otherwise.static UploadSessionFinishError
lookupFailed(UploadSessionLookupError value)
Returns an instance ofUploadSessionFinishError
that has its tag set toUploadSessionFinishError.Tag.LOOKUP_FAILED
.static UploadSessionFinishError
path(WriteError value)
Returns an instance ofUploadSessionFinishError
that has its tag set toUploadSessionFinishError.Tag.PATH
.static UploadSessionFinishError
propertiesError(InvalidPropertyGroupError value)
Returns an instance ofUploadSessionFinishError
that has its tag set toUploadSessionFinishError.Tag.PROPERTIES_ERROR
.UploadSessionFinishError.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.
-
-
-
Field Detail
-
TOO_MANY_SHARED_FOLDER_TARGETS
public static final UploadSessionFinishError TOO_MANY_SHARED_FOLDER_TARGETS
The batch request commits files into too many different shared folders. Please limit your batch request to files contained in a single shared folder.
-
TOO_MANY_WRITE_OPERATIONS
public static final UploadSessionFinishError TOO_MANY_WRITE_OPERATIONS
There are too many write operations happening in the user's Dropbox. You should retry uploading this file.
-
CONCURRENT_SESSION_DATA_NOT_ALLOWED
public static final UploadSessionFinishError CONCURRENT_SESSION_DATA_NOT_ALLOWED
Uploading data not allowed when finishing concurrent upload session.
-
CONCURRENT_SESSION_NOT_CLOSED
public static final UploadSessionFinishError CONCURRENT_SESSION_NOT_CLOSED
Concurrent upload sessions need to be closed before finishing.
-
CONCURRENT_SESSION_MISSING_DATA
public static final UploadSessionFinishError CONCURRENT_SESSION_MISSING_DATA
Not all pieces of data were uploaded before trying to finish the session.
-
PAYLOAD_TOO_LARGE
public static final UploadSessionFinishError PAYLOAD_TOO_LARGE
The request payload must be at most 150 MB.
-
CONTENT_HASH_MISMATCH
public static final UploadSessionFinishError CONTENT_HASH_MISMATCH
The content received by the Dropbox server in this call does not match the provided content hash.
-
OTHER
public static final UploadSessionFinishError 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.
-
-
Method Detail
-
tag
public UploadSessionFinishError.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 thisUploadSessionFinishError
.If a tag returned by the server is unrecognized by this SDK, the
UploadSessionFinishError.Tag.OTHER
value will be used.- Returns:
- the tag for this instance.
-
isLookupFailed
public boolean isLookupFailed()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.LOOKUP_FAILED
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.LOOKUP_FAILED
,false
otherwise.
-
lookupFailed
public static UploadSessionFinishError lookupFailed(UploadSessionLookupError value)
Returns an instance ofUploadSessionFinishError
that has its tag set toUploadSessionFinishError.Tag.LOOKUP_FAILED
.The session arguments are incorrect; the value explains the reason.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
UploadSessionFinishError
with its tag set toUploadSessionFinishError.Tag.LOOKUP_FAILED
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getLookupFailedValue
public UploadSessionLookupError getLookupFailedValue()
The session arguments are incorrect; the value explains the reason.This instance must be tagged as
UploadSessionFinishError.Tag.LOOKUP_FAILED
.- Returns:
- The
UploadSessionLookupError
value associated with this instance ifisLookupFailed()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisLookupFailed()
isfalse
.
-
isPath
public boolean isPath()
- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.PATH
,false
otherwise.
-
path
public static UploadSessionFinishError path(WriteError value)
Returns an instance ofUploadSessionFinishError
that has its tag set toUploadSessionFinishError.Tag.PATH
.Unable to save the uploaded contents to a file. Data has already been appended to the upload session. Please retry with empty data body and updated offset.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
UploadSessionFinishError
with its tag set toUploadSessionFinishError.Tag.PATH
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getPathValue
public WriteError getPathValue()
Unable to save the uploaded contents to a file. Data has already been appended to the upload session. Please retry with empty data body and updated offset.This instance must be tagged as
UploadSessionFinishError.Tag.PATH
.- Returns:
- The
WriteError
value associated with this instance ifisPath()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisPath()
isfalse
.
-
isPropertiesError
public boolean isPropertiesError()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.PROPERTIES_ERROR
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.PROPERTIES_ERROR
,false
otherwise.
-
propertiesError
public static UploadSessionFinishError propertiesError(InvalidPropertyGroupError value)
Returns an instance ofUploadSessionFinishError
that has its tag set toUploadSessionFinishError.Tag.PROPERTIES_ERROR
.The supplied property group is invalid. The file has uploaded without property groups.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
UploadSessionFinishError
with its tag set toUploadSessionFinishError.Tag.PROPERTIES_ERROR
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getPropertiesErrorValue
public InvalidPropertyGroupError getPropertiesErrorValue()
The supplied property group is invalid. The file has uploaded without property groups.This instance must be tagged as
UploadSessionFinishError.Tag.PROPERTIES_ERROR
.- Returns:
- The
InvalidPropertyGroupError
value associated with this instance ifisPropertiesError()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisPropertiesError()
isfalse
.
-
isTooManySharedFolderTargets
public boolean isTooManySharedFolderTargets()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.TOO_MANY_SHARED_FOLDER_TARGETS
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.TOO_MANY_SHARED_FOLDER_TARGETS
,false
otherwise.
-
isTooManyWriteOperations
public boolean isTooManyWriteOperations()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.TOO_MANY_WRITE_OPERATIONS
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.TOO_MANY_WRITE_OPERATIONS
,false
otherwise.
-
isConcurrentSessionDataNotAllowed
public boolean isConcurrentSessionDataNotAllowed()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_DATA_NOT_ALLOWED
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.CONCURRENT_SESSION_DATA_NOT_ALLOWED
,false
otherwise.
-
isConcurrentSessionNotClosed
public boolean isConcurrentSessionNotClosed()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_NOT_CLOSED
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.CONCURRENT_SESSION_NOT_CLOSED
,false
otherwise.
-
isConcurrentSessionMissingData
public boolean isConcurrentSessionMissingData()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_MISSING_DATA
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.CONCURRENT_SESSION_MISSING_DATA
,false
otherwise.
-
isPayloadTooLarge
public boolean isPayloadTooLarge()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.PAYLOAD_TOO_LARGE
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.PAYLOAD_TOO_LARGE
,false
otherwise.
-
isContentHashMismatch
public boolean isContentHashMismatch()
Returnstrue
if this instance has the tagUploadSessionFinishError.Tag.CONTENT_HASH_MISMATCH
,false
otherwise.- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.CONTENT_HASH_MISMATCH
,false
otherwise.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asUploadSessionFinishError.Tag.OTHER
,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
-
-