Modifier and Type | Class and Description |
---|---|
static class |
ShareFolderJobStatus.Tag
Discriminating tag type for
ShareFolderJobStatus . |
Modifier and Type | Field and Description |
---|---|
static ShareFolderJobStatus |
IN_PROGRESS
The asynchronous job is still in progress.
|
Modifier and Type | Method and Description |
---|---|
static ShareFolderJobStatus |
complete(SharedFolderMetadata value)
Returns an instance of
ShareFolderJobStatus that has its tag set
to ShareFolderJobStatus.Tag.COMPLETE . |
boolean |
equals(Object obj) |
static ShareFolderJobStatus |
failed(ShareFolderError value)
Returns an instance of
ShareFolderJobStatus that has its tag set
to ShareFolderJobStatus.Tag.FAILED . |
SharedFolderMetadata |
getCompleteValue()
The share job has finished.
|
ShareFolderError |
getFailedValue()
This instance must be tagged as
ShareFolderJobStatus.Tag.FAILED . |
int |
hashCode() |
boolean |
isComplete()
|
boolean |
isFailed()
|
boolean |
isInProgress()
|
ShareFolderJobStatus.Tag |
tag()
Returns the tag for this instance.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final ShareFolderJobStatus IN_PROGRESS
public ShareFolderJobStatus.Tag tag()
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 return true
. Callers are recommended to use the tag
value in a switch
statement to properly handle the different
values for this ShareFolderJobStatus
.
public boolean isInProgress()
true
if this instance is tagged as ShareFolderJobStatus.Tag.IN_PROGRESS
, false
otherwise.public boolean isComplete()
true
if this instance is tagged as ShareFolderJobStatus.Tag.COMPLETE
,
false
otherwise.public static ShareFolderJobStatus complete(SharedFolderMetadata value)
ShareFolderJobStatus
that has its tag set
to ShareFolderJobStatus.Tag.COMPLETE
.
The share job has finished. The value is the metadata for the folder.
value
- value to assign to this instance.ShareFolderJobStatus
with its tag set to
ShareFolderJobStatus.Tag.COMPLETE
.IllegalArgumentException
- if value
is null
.public SharedFolderMetadata getCompleteValue()
This instance must be tagged as ShareFolderJobStatus.Tag.COMPLETE
.
SharedFolderMetadata
value associated with this
instance if isComplete()
is true
.IllegalStateException
- If isComplete()
is false
.public boolean isFailed()
true
if this instance is tagged as ShareFolderJobStatus.Tag.FAILED
,
false
otherwise.public static ShareFolderJobStatus failed(ShareFolderError value)
ShareFolderJobStatus
that has its tag set
to ShareFolderJobStatus.Tag.FAILED
.
None
value
- value to assign to this instance.ShareFolderJobStatus
with its tag set to
ShareFolderJobStatus.Tag.FAILED
.IllegalArgumentException
- if value
is null
.public ShareFolderError getFailedValue()
ShareFolderJobStatus.Tag.FAILED
.ShareFolderError
value associated with this instance
if isFailed()
is true
.IllegalStateException
- If isFailed()
is false
.public String toStringMultiline()
The returned String may contain newlines.