Class UploadSessionFinishError
- java.lang.Object
-
- com.dropbox.core.v2.files.UploadSessionFinishError
-
public final class UploadSessionFinishError extends java.lang.ObjectThis 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
OTHERvalue will be used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUploadSessionFinishError.TagDiscriminating tag type forUploadSessionFinishError.
-
Field Summary
Fields Modifier and Type Field Description static UploadSessionFinishErrorCONCURRENT_SESSION_DATA_NOT_ALLOWEDUploading data not allowed when finishing concurrent upload session.static UploadSessionFinishErrorCONCURRENT_SESSION_MISSING_DATANot all pieces of data were uploaded before trying to finish the session.static UploadSessionFinishErrorCONCURRENT_SESSION_NOT_CLOSEDConcurrent upload sessions need to be closed before finishing.static UploadSessionFinishErrorCONTENT_HASH_MISMATCHThe content received by the Dropbox server in this call does not match the provided content hash.static UploadSessionFinishErrorOTHERCatch-all used for unknown tag values returned by the Dropbox servers.static UploadSessionFinishErrorPAYLOAD_TOO_LARGEThe request payload must be at most 150 MB.static UploadSessionFinishErrorTOO_MANY_SHARED_FOLDER_TARGETSThe batch request commits files into too many different shared folders.static UploadSessionFinishErrorTOO_MANY_WRITE_OPERATIONSThere 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 booleanequals(java.lang.Object obj)UploadSessionLookupErrorgetLookupFailedValue()The session arguments are incorrect; the value explains the reason.WriteErrorgetPathValue()Unable to save the uploaded contents to a file.InvalidPropertyGroupErrorgetPropertiesErrorValue()The supplied property group is invalid.inthashCode()booleanisConcurrentSessionDataNotAllowed()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_DATA_NOT_ALLOWED,falseotherwise.booleanisConcurrentSessionMissingData()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_MISSING_DATA,falseotherwise.booleanisConcurrentSessionNotClosed()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_NOT_CLOSED,falseotherwise.booleanisContentHashMismatch()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.CONTENT_HASH_MISMATCH,falseotherwise.booleanisLookupFailed()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.LOOKUP_FAILED,falseotherwise.booleanisOther()booleanisPath()booleanisPayloadTooLarge()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.PAYLOAD_TOO_LARGE,falseotherwise.booleanisPropertiesError()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.PROPERTIES_ERROR,falseotherwise.booleanisTooManySharedFolderTargets()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.TOO_MANY_SHARED_FOLDER_TARGETS,falseotherwise.booleanisTooManyWriteOperations()Returnstrueif this instance has the tagUploadSessionFinishError.Tag.TOO_MANY_WRITE_OPERATIONS,falseotherwise.static UploadSessionFinishErrorlookupFailed(UploadSessionLookupError value)Returns an instance ofUploadSessionFinishErrorthat has its tag set toUploadSessionFinishError.Tag.LOOKUP_FAILED.static UploadSessionFinishErrorpath(WriteError value)Returns an instance ofUploadSessionFinishErrorthat has its tag set toUploadSessionFinishError.Tag.PATH.static UploadSessionFinishErrorpropertiesError(InvalidPropertyGroupError value)Returns an instance ofUploadSessionFinishErrorthat has its tag set toUploadSessionFinishError.Tag.PROPERTIES_ERROR.UploadSessionFinishError.Tagtag()Returns the tag for this instance.java.lang.StringtoString()java.lang.StringtoStringMultiline()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 aswitchstatement to properly handle the different values for thisUploadSessionFinishError.If a tag returned by the server is unrecognized by this SDK, the
UploadSessionFinishError.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isLookupFailed
public boolean isLookupFailed()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.LOOKUP_FAILED,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.LOOKUP_FAILED,falseotherwise.
-
lookupFailed
public static UploadSessionFinishError lookupFailed(UploadSessionLookupError value)
Returns an instance ofUploadSessionFinishErrorthat 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
UploadSessionFinishErrorwith its tag set toUploadSessionFinishError.Tag.LOOKUP_FAILED. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
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
UploadSessionLookupErrorvalue associated with this instance ifisLookupFailed()istrue. - Throws:
java.lang.IllegalStateException- IfisLookupFailed()isfalse.
-
isPath
public boolean isPath()
- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.PATH,falseotherwise.
-
path
public static UploadSessionFinishError path(WriteError value)
Returns an instance ofUploadSessionFinishErrorthat 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
UploadSessionFinishErrorwith its tag set toUploadSessionFinishError.Tag.PATH. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
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
WriteErrorvalue associated with this instance ifisPath()istrue. - Throws:
java.lang.IllegalStateException- IfisPath()isfalse.
-
isPropertiesError
public boolean isPropertiesError()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.PROPERTIES_ERROR,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.PROPERTIES_ERROR,falseotherwise.
-
propertiesError
public static UploadSessionFinishError propertiesError(InvalidPropertyGroupError value)
Returns an instance ofUploadSessionFinishErrorthat 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
UploadSessionFinishErrorwith its tag set toUploadSessionFinishError.Tag.PROPERTIES_ERROR. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
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
InvalidPropertyGroupErrorvalue associated with this instance ifisPropertiesError()istrue. - Throws:
java.lang.IllegalStateException- IfisPropertiesError()isfalse.
-
isTooManySharedFolderTargets
public boolean isTooManySharedFolderTargets()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.TOO_MANY_SHARED_FOLDER_TARGETS,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.TOO_MANY_SHARED_FOLDER_TARGETS,falseotherwise.
-
isTooManyWriteOperations
public boolean isTooManyWriteOperations()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.TOO_MANY_WRITE_OPERATIONS,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.TOO_MANY_WRITE_OPERATIONS,falseotherwise.
-
isConcurrentSessionDataNotAllowed
public boolean isConcurrentSessionDataNotAllowed()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_DATA_NOT_ALLOWED,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.CONCURRENT_SESSION_DATA_NOT_ALLOWED,falseotherwise.
-
isConcurrentSessionNotClosed
public boolean isConcurrentSessionNotClosed()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_NOT_CLOSED,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.CONCURRENT_SESSION_NOT_CLOSED,falseotherwise.
-
isConcurrentSessionMissingData
public boolean isConcurrentSessionMissingData()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.CONCURRENT_SESSION_MISSING_DATA,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.CONCURRENT_SESSION_MISSING_DATA,falseotherwise.
-
isPayloadTooLarge
public boolean isPayloadTooLarge()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.PAYLOAD_TOO_LARGE,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.PAYLOAD_TOO_LARGE,falseotherwise.
-
isContentHashMismatch
public boolean isContentHashMismatch()
Returnstrueif this instance has the tagUploadSessionFinishError.Tag.CONTENT_HASH_MISMATCH,falseotherwise.- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.CONTENT_HASH_MISMATCH,falseotherwise.
-
isOther
public boolean isOther()
- Returns:
trueif this instance is tagged asUploadSessionFinishError.Tag.OTHER,falseotherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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
-
-