Package com.dropbox.core.v2.files
Class CreateFolderBatchResultEntry
java.lang.Object
com.dropbox.core.v2.files.CreateFolderBatchResultEntry
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 ClassesModifier and TypeClassDescriptionstatic enumDiscriminating tag type forCreateFolderBatchResultEntry. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic CreateFolderBatchResultEntryfailure(CreateFolderEntryError value) Returns an instance ofCreateFolderBatchResultEntrythat has its tag set toCreateFolderBatchResultEntry.Tag.FAILURE.This instance must be tagged asCreateFolderBatchResultEntry.Tag.FAILURE.This instance must be tagged asCreateFolderBatchResultEntry.Tag.SUCCESS.inthashCode()booleanReturnstrueif this instance has the tagCreateFolderBatchResultEntry.Tag.FAILURE,falseotherwise.booleanReturnstrueif this instance has the tagCreateFolderBatchResultEntry.Tag.SUCCESS,falseotherwise.static CreateFolderBatchResultEntrysuccess(CreateFolderEntryResult value) Returns an instance ofCreateFolderBatchResultEntrythat has its tag set toCreateFolderBatchResultEntry.Tag.SUCCESS.tag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
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 thisCreateFolderBatchResultEntry.- Returns:
- the tag for this instance.
-
isSuccess
public boolean isSuccess()Returnstrueif this instance has the tagCreateFolderBatchResultEntry.Tag.SUCCESS,falseotherwise.- Returns:
trueif this instance is tagged asCreateFolderBatchResultEntry.Tag.SUCCESS,falseotherwise.
-
success
Returns an instance ofCreateFolderBatchResultEntrythat has its tag set toCreateFolderBatchResultEntry.Tag.SUCCESS.None
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
CreateFolderBatchResultEntrywith its tag set toCreateFolderBatchResultEntry.Tag.SUCCESS. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getSuccessValue
This instance must be tagged asCreateFolderBatchResultEntry.Tag.SUCCESS.- Returns:
- The
CreateFolderEntryResultvalue associated with this instance ifisSuccess()istrue. - Throws:
IllegalStateException- IfisSuccess()isfalse.
-
isFailure
public boolean isFailure()Returnstrueif this instance has the tagCreateFolderBatchResultEntry.Tag.FAILURE,falseotherwise.- Returns:
trueif this instance is tagged asCreateFolderBatchResultEntry.Tag.FAILURE,falseotherwise.
-
failure
Returns an instance ofCreateFolderBatchResultEntrythat has its tag set toCreateFolderBatchResultEntry.Tag.FAILURE.None
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
CreateFolderBatchResultEntrywith its tag set toCreateFolderBatchResultEntry.Tag.FAILURE. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getFailureValue
This instance must be tagged asCreateFolderBatchResultEntry.Tag.FAILURE.- Returns:
- The
CreateFolderEntryErrorvalue associated with this instance ifisFailure()istrue. - Throws:
IllegalStateException- IfisFailure()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
-