Package com.dropbox.core.v2.files
Class SaveUrlJobStatus
java.lang.Object
com.dropbox.core.v2.files.SaveUrlJobStatus
This class is a 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.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SaveUrlJobStatusThe asynchronous job is still in progress. -
Method Summary
Modifier and TypeMethodDescriptionstatic SaveUrlJobStatuscomplete(FileMetadata value) Returns an instance ofSaveUrlJobStatusthat has its tag set toSaveUrlJobStatus.Tag.COMPLETE.booleanstatic SaveUrlJobStatusfailed(SaveUrlError value) Returns an instance ofSaveUrlJobStatusthat has its tag set toSaveUrlJobStatus.Tag.FAILED.Metadata of the file where the URL is saved to.This instance must be tagged asSaveUrlJobStatus.Tag.FAILED.inthashCode()booleanbooleanisFailed()booleantag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
IN_PROGRESS
The asynchronous job is still in progress.
-
-
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 thisSaveUrlJobStatus.- Returns:
- the tag for this instance.
-
isInProgress
public boolean isInProgress()- Returns:
trueif this instance is tagged asSaveUrlJobStatus.Tag.IN_PROGRESS,falseotherwise.
-
isComplete
public boolean isComplete()- Returns:
trueif this instance is tagged asSaveUrlJobStatus.Tag.COMPLETE,falseotherwise.
-
complete
Returns an instance ofSaveUrlJobStatusthat has its tag set toSaveUrlJobStatus.Tag.COMPLETE.Metadata of the file where the URL is saved to.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
SaveUrlJobStatuswith its tag set toSaveUrlJobStatus.Tag.COMPLETE. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getCompleteValue
Metadata of the file where the URL is saved to.This instance must be tagged as
SaveUrlJobStatus.Tag.COMPLETE.- Returns:
- The
FileMetadatavalue associated with this instance ifisComplete()istrue. - Throws:
IllegalStateException- IfisComplete()isfalse.
-
isFailed
public boolean isFailed()- Returns:
trueif this instance is tagged asSaveUrlJobStatus.Tag.FAILED,falseotherwise.
-
failed
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
SaveUrlJobStatuswith its tag set toSaveUrlJobStatus.Tag.FAILED. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getFailedValue
This instance must be tagged asSaveUrlJobStatus.Tag.FAILED.- Returns:
- The
SaveUrlErrorvalue associated with this instance ifisFailed()istrue. - Throws:
IllegalStateException- IfisFailed()isfalse.
-
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
-