Package com.dropbox.core.v2.files
Class PaperUpdateError
java.lang.Object
com.dropbox.core.v2.files.PaperUpdateError
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 PaperUpdateErrorThe provided content was malformed and cannot be imported to Paper.static final PaperUpdateErrorThis operation is not allowed on archived Paper docs.static final PaperUpdateErrorThis operation is not allowed on deleted Paper docs.static final PaperUpdateErrorThe Paper doc would be too large, split the content into multiple docs.static final PaperUpdateErrorThe imported document contains an image that is too large.static final PaperUpdateErrorYour account does not have permissions to edit Paper docs.static final PaperUpdateErrorCatch-all used for unknown tag values returned by the Dropbox servers.static final PaperUpdateErrorThe provided revision does not match the document head. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis instance must be tagged asPaperUpdateError.Tag.PATH.inthashCode()booleanbooleanbooleanbooleanReturnstrueif this instance has the tagPaperUpdateError.Tag.DOC_LENGTH_EXCEEDED,falseotherwise.booleanReturnstrueif this instance has the tagPaperUpdateError.Tag.IMAGE_SIZE_EXCEEDED,falseotherwise.booleanReturnstrueif this instance has the tagPaperUpdateError.Tag.INSUFFICIENT_PERMISSIONS,falseotherwise.booleanisOther()booleanisPath()booleanstatic PaperUpdateErrorpath(LookupError value) Returns an instance ofPaperUpdateErrorthat has its tag set toPaperUpdateError.Tag.PATH.tag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
INSUFFICIENT_PERMISSIONS
Your account does not have permissions to edit Paper docs. -
CONTENT_MALFORMED
The provided content was malformed and cannot be imported to Paper. -
DOC_LENGTH_EXCEEDED
The Paper doc would be too large, split the content into multiple docs. -
IMAGE_SIZE_EXCEEDED
The imported document contains an image that is too large. The current limit is 1MB. This only applies to HTML with data URI. -
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.
-
REVISION_MISMATCH
The provided revision does not match the document head. -
DOC_ARCHIVED
This operation is not allowed on archived Paper docs. -
DOC_DELETED
This operation is not allowed on deleted Paper docs.
-
-
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 thisPaperUpdateError.- Returns:
- the tag for this instance.
-
isInsufficientPermissions
public boolean isInsufficientPermissions()Returnstrueif this instance has the tagPaperUpdateError.Tag.INSUFFICIENT_PERMISSIONS,falseotherwise.- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.INSUFFICIENT_PERMISSIONS,falseotherwise.
-
isContentMalformed
public boolean isContentMalformed()- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.CONTENT_MALFORMED,falseotherwise.
-
isDocLengthExceeded
public boolean isDocLengthExceeded()Returnstrueif this instance has the tagPaperUpdateError.Tag.DOC_LENGTH_EXCEEDED,falseotherwise.- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.DOC_LENGTH_EXCEEDED,falseotherwise.
-
isImageSizeExceeded
public boolean isImageSizeExceeded()Returnstrueif this instance has the tagPaperUpdateError.Tag.IMAGE_SIZE_EXCEEDED,falseotherwise.- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.IMAGE_SIZE_EXCEEDED,falseotherwise.
-
isOther
public boolean isOther()- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.OTHER,falseotherwise.
-
isPath
public boolean isPath()- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.PATH,falseotherwise.
-
path
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
PaperUpdateErrorwith its tag set toPaperUpdateError.Tag.PATH. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getPathValue
This instance must be tagged asPaperUpdateError.Tag.PATH.- Returns:
- The
LookupErrorvalue associated with this instance ifisPath()istrue. - Throws:
IllegalStateException- IfisPath()isfalse.
-
isRevisionMismatch
public boolean isRevisionMismatch()- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.REVISION_MISMATCH,falseotherwise.
-
isDocArchived
public boolean isDocArchived()- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.DOC_ARCHIVED,falseotherwise.
-
isDocDeleted
public boolean isDocDeleted()- Returns:
trueif this instance is tagged asPaperUpdateError.Tag.DOC_DELETED,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
-