public final class WriteError
extends java.lang.Object
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
WriteError.Tag
Discriminating tag type for
WriteError. |
| Modifier and Type | Field and Description |
|---|---|
static WriteError |
DISALLOWED_NAME
Dropbox will not save the file or folder because of its name.
|
static WriteError |
INSUFFICIENT_SPACE
The user doesn't have enough available space (bytes) to write more data.
|
static WriteError |
NO_WRITE_PERMISSION
The user doesn't have permissions to write to the target location.
|
static WriteError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
static WriteError |
TEAM_FOLDER
This endpoint cannot move or delete team folders.
|
static WriteError |
TOO_MANY_WRITE_OPERATIONS
There are too many write operations in user's Dropbox.
|
| Modifier and Type | Method and Description |
|---|---|
static WriteError |
conflict(WriteConflictError value)
Returns an instance of
WriteError that has its tag set to WriteError.Tag.CONFLICT. |
boolean |
equals(java.lang.Object obj) |
WriteConflictError |
getConflictValue()
Couldn't write to the target path because there was something in the way.
|
java.lang.String |
getMalformedPathValue()
The given path does not satisfy the required path format.
|
int |
hashCode() |
boolean |
isConflict()
|
boolean |
isDisallowedName()
|
boolean |
isInsufficientSpace()
|
boolean |
isMalformedPath()
|
boolean |
isNoWritePermission()
|
boolean |
isOther()
|
boolean |
isTeamFolder()
|
boolean |
isTooManyWriteOperations()
Returns
true if this instance has the tag WriteError.Tag.TOO_MANY_WRITE_OPERATIONS, false otherwise. |
static WriteError |
malformedPath()
Returns an instance of
WriteError that has its tag set to WriteError.Tag.MALFORMED_PATH. |
static WriteError |
malformedPath(java.lang.String value)
Returns an instance of
WriteError that has its tag set to WriteError.Tag.MALFORMED_PATH. |
WriteError.Tag |
tag()
Returns the tag for this instance.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final WriteError NO_WRITE_PERMISSION
public static final WriteError INSUFFICIENT_SPACE
public static final WriteError DISALLOWED_NAME
public static final WriteError TEAM_FOLDER
public static final WriteError TOO_MANY_WRITE_OPERATIONS
public static final WriteError OTHER
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.
public WriteError.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 WriteError.
If a tag returned by the server is unrecognized by this SDK, the
WriteError.Tag.OTHER value will be used.
public boolean isMalformedPath()
true if this instance is tagged as WriteError.Tag.MALFORMED_PATH, false otherwise.public static WriteError malformedPath(java.lang.String value)
WriteError that has its tag set to WriteError.Tag.MALFORMED_PATH.
The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.
value - value to assign to this instance.WriteError with its tag set to WriteError.Tag.MALFORMED_PATH.public static WriteError malformedPath()
WriteError that has its tag set to WriteError.Tag.MALFORMED_PATH.
The given path does not satisfy the required path format. Please refer to the Path formats documentation for more information.
WriteError with its tag set to WriteError.Tag.MALFORMED_PATH.public java.lang.String getMalformedPathValue()
This instance must be tagged as WriteError.Tag.MALFORMED_PATH.
String value associated with this instance if isMalformedPath() is true.java.lang.IllegalStateException - If isMalformedPath() is false.public boolean isConflict()
true if this instance is tagged as WriteError.Tag.CONFLICT,
false otherwise.public static WriteError conflict(WriteConflictError value)
WriteError that has its tag set to WriteError.Tag.CONFLICT.
Couldn't write to the target path because there was something in the way.
value - value to assign to this instance.WriteError with its tag set to WriteError.Tag.CONFLICT.java.lang.IllegalArgumentException - if value is null.public WriteConflictError getConflictValue()
This instance must be tagged as WriteError.Tag.CONFLICT.
WriteConflictError value associated with this
instance if isConflict() is true.java.lang.IllegalStateException - If isConflict() is false.public boolean isNoWritePermission()
true if this instance is tagged as WriteError.Tag.NO_WRITE_PERMISSION, false otherwise.public boolean isInsufficientSpace()
true if this instance is tagged as WriteError.Tag.INSUFFICIENT_SPACE, false otherwise.public boolean isDisallowedName()
true if this instance is tagged as WriteError.Tag.DISALLOWED_NAME, false otherwise.public boolean isTeamFolder()
true if this instance is tagged as WriteError.Tag.TEAM_FOLDER, false otherwise.public boolean isTooManyWriteOperations()
true if this instance has the tag WriteError.Tag.TOO_MANY_WRITE_OPERATIONS, false otherwise.true if this instance is tagged as WriteError.Tag.TOO_MANY_WRITE_OPERATIONS, false otherwise.public boolean isOther()
true if this instance is tagged as WriteError.Tag.OTHER,
false otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringMultiline()
The returned String may contain newlines.