Package com.dropbox.core.v2.sharing
Class JobStatus
java.lang.Object
com.dropbox.core.v2.sharing.JobStatus
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
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic JobStatusReturns an instance ofJobStatusthat has its tag set toJobStatus.Tag.FAILED.The asynchronous job returned an error.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. -
COMPLETE
The asynchronous job has finished.
-
-
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 thisJobStatus.- Returns:
- the tag for this instance.
-
isInProgress
public boolean isInProgress()- Returns:
trueif this instance is tagged asJobStatus.Tag.IN_PROGRESS,falseotherwise.
-
isComplete
public boolean isComplete()- Returns:
trueif this instance is tagged asJobStatus.Tag.COMPLETE,falseotherwise.
-
isFailed
public boolean isFailed()- Returns:
trueif this instance is tagged asJobStatus.Tag.FAILED,falseotherwise.
-
failed
Returns an instance ofJobStatusthat has its tag set toJobStatus.Tag.FAILED.The asynchronous job returned an error.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
JobStatuswith its tag set toJobStatus.Tag.FAILED. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getFailedValue
The asynchronous job returned an error.This instance must be tagged as
JobStatus.Tag.FAILED.- Returns:
- The
JobErrorvalue 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
-