Class WriteError
isAbc()
methods will return true. You can use tag() to determine the
tag associated with this instance.
Open unions may be extended in the future with additional tags. If a new
tag is introduced that this SDK does not recognized, the OTHER value
will be used.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WriteErrorThe user doesn't have permission to perform the action due to restrictions set by a team administratorstatic final WriteErrorDropbox will not save the file or folder because of its name.static final WriteErrorThe user doesn't have enough available space (bytes) to write more data.static final WriteErrorThe user doesn't have permissions to write to the target location.static final WriteErrorThis file operation is not allowed at this path.static final WriteErrorCatch-all used for unknown tag values returned by the Dropbox servers.static final WriteErrorThis endpoint cannot move or delete team folders.static final WriteErrorThere are too many write operations in user's Dropbox. -
Method Summary
Modifier and TypeMethodDescriptionstatic WriteErrorconflict(WriteConflictError value) Returns an instance ofWriteErrorthat has its tag set toWriteError.Tag.CONFLICT.booleanCouldn't write to the target path because there was something in the way.The given path does not satisfy the required path format.inthashCode()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisOther()booleanbooleanReturnstrueif this instance has the tagWriteError.Tag.TOO_MANY_WRITE_OPERATIONS,falseotherwise.static WriteErrorReturns an instance ofWriteErrorthat has its tag set toWriteError.Tag.MALFORMED_PATH.static WriteErrormalformedPath(String value) Returns an instance ofWriteErrorthat has its tag set toWriteError.Tag.MALFORMED_PATH.tag()Returns the tag for this instance.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
NO_WRITE_PERMISSION
The user doesn't have permissions to write to the target location. -
INSUFFICIENT_SPACE
The user doesn't have enough available space (bytes) to write more data. -
DISALLOWED_NAME
Dropbox will not save the file or folder because of its name. -
TEAM_FOLDER
This endpoint cannot move or delete team folders. -
OPERATION_SUPPRESSED
This file operation is not allowed at this path. -
TOO_MANY_WRITE_OPERATIONS
There are too many write operations in user's Dropbox. Please retry this request. -
ACCESS_RESTRICTED
The user doesn't have permission to perform the action due to restrictions set by a team administrator -
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.
-
-
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 thisWriteError.If a tag returned by the server is unrecognized by this SDK, the
WriteError.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isMalformedPath
public boolean isMalformedPath()- Returns:
trueif this instance is tagged asWriteError.Tag.MALFORMED_PATH,falseotherwise.
-
malformedPath
Returns an instance ofWriteErrorthat has its tag set toWriteError.Tag.MALFORMED_PATH.The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
WriteErrorwith its tag set toWriteError.Tag.MALFORMED_PATH.
-
malformedPath
Returns an instance ofWriteErrorthat has its tag set toWriteError.Tag.MALFORMED_PATH.The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.
- Returns:
- Instance of
WriteErrorwith its tag set toWriteError.Tag.MALFORMED_PATH.
-
getMalformedPathValue
The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.This instance must be tagged as
WriteError.Tag.MALFORMED_PATH.- Returns:
- The
Stringvalue associated with this instance ifisMalformedPath()istrue. - Throws:
IllegalStateException- IfisMalformedPath()isfalse.
-
isConflict
public boolean isConflict()- Returns:
trueif this instance is tagged asWriteError.Tag.CONFLICT,falseotherwise.
-
conflict
Returns an instance ofWriteErrorthat has its tag set toWriteError.Tag.CONFLICT.Couldn't write to the target path because there was something in the way.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
WriteErrorwith its tag set toWriteError.Tag.CONFLICT. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getConflictValue
Couldn't write to the target path because there was something in the way.This instance must be tagged as
WriteError.Tag.CONFLICT.- Returns:
- The
WriteConflictErrorvalue associated with this instance ifisConflict()istrue. - Throws:
IllegalStateException- IfisConflict()isfalse.
-
isNoWritePermission
public boolean isNoWritePermission()- Returns:
trueif this instance is tagged asWriteError.Tag.NO_WRITE_PERMISSION,falseotherwise.
-
isInsufficientSpace
public boolean isInsufficientSpace()- Returns:
trueif this instance is tagged asWriteError.Tag.INSUFFICIENT_SPACE,falseotherwise.
-
isDisallowedName
public boolean isDisallowedName()- Returns:
trueif this instance is tagged asWriteError.Tag.DISALLOWED_NAME,falseotherwise.
-
isTeamFolder
public boolean isTeamFolder()- Returns:
trueif this instance is tagged asWriteError.Tag.TEAM_FOLDER,falseotherwise.
-
isOperationSuppressed
public boolean isOperationSuppressed()- Returns:
trueif this instance is tagged asWriteError.Tag.OPERATION_SUPPRESSED,falseotherwise.
-
isTooManyWriteOperations
public boolean isTooManyWriteOperations()Returnstrueif this instance has the tagWriteError.Tag.TOO_MANY_WRITE_OPERATIONS,falseotherwise.- Returns:
trueif this instance is tagged asWriteError.Tag.TOO_MANY_WRITE_OPERATIONS,falseotherwise.
-
isAccessRestricted
public boolean isAccessRestricted()- Returns:
trueif this instance is tagged asWriteError.Tag.ACCESS_RESTRICTED,falseotherwise.
-
isOther
public boolean isOther()- Returns:
trueif this instance is tagged asWriteError.Tag.OTHER,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
-