Package com.dropbox.core.v2.files
Class ExportError
java.lang.Object
com.dropbox.core.v2.files.ExportError
This class is an open tagged union. Tagged unions instances are always
associated to a specific tag. This means only one of the
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor internal use only.static enumDiscriminating tag type forExportError. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExportErrorThe specified export format is not a valid option for this file type.static final ExportErrorThis file type cannot be exported.static final ExportErrorCatch-all used for unknown tag values returned by the Dropbox servers.static final ExportErrorThe exportable content is not yet available. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis instance must be tagged asExportError.Tag.PATH.inthashCode()booleanbooleanbooleanisOther()booleanisPath()booleanstatic ExportErrorpath(LookupError value) Returns an instance ofExportErrorthat has its tag set toExportError.Tag.PATH.tag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
NON_EXPORTABLE
This file type cannot be exported. UseDbxUserFilesRequests.download(String,String)instead. -
INVALID_EXPORT_FORMAT
The specified export format is not a valid option for this file type. -
RETRY_ERROR
The exportable content is not yet available. Please retry later. -
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 Details
-
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 thisExportError.If a tag returned by the server is unrecognized by this SDK, the
ExportError.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isPath
public boolean isPath()- Returns:
trueif this instance is tagged asExportError.Tag.PATH,falseotherwise.
-
path
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
ExportErrorwith its tag set toExportError.Tag.PATH. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getPathValue
This instance must be tagged asExportError.Tag.PATH.- Returns:
- The
LookupErrorvalue associated with this instance ifisPath()istrue. - Throws:
IllegalStateException- IfisPath()isfalse.
-
isNonExportable
public boolean isNonExportable()- Returns:
trueif this instance is tagged asExportError.Tag.NON_EXPORTABLE,falseotherwise.
-
isInvalidExportFormat
public boolean isInvalidExportFormat()- Returns:
trueif this instance is tagged asExportError.Tag.INVALID_EXPORT_FORMAT,falseotherwise.
-
isRetryError
public boolean isRetryError()- Returns:
trueif this instance is tagged asExportError.Tag.RETRY_ERROR,falseotherwise.
-
isOther
public boolean isOther()- Returns:
trueif this instance is tagged asExportError.Tag.OTHER,falseotherwise.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-