Package com.dropbox.core.v2.team
Class TeamFolderRenameError
- java.lang.Object
-
- com.dropbox.core.v2.team.TeamFolderRenameError
-
public final class TeamFolderRenameError extends java.lang.Object
This class is a tagged union. Tagged unions instances are always associated to a specific tag. This means only one of theisAbc()
methods will returntrue
. You can usetag()
to determine the tag associated with this instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TeamFolderRenameError.Tag
Discriminating tag type forTeamFolderRenameError
.
-
Field Summary
Fields Modifier and Type Field Description static TeamFolderRenameError
FOLDER_NAME_ALREADY_USED
There is already a team folder with the same name.static TeamFolderRenameError
FOLDER_NAME_RESERVED
The provided name cannot be used because it is reserved.static TeamFolderRenameError
INVALID_FOLDER_NAME
The provided folder name cannot be used.static TeamFolderRenameError
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
-
Method Summary
-
-
-
Field Detail
-
OTHER
public static final TeamFolderRenameError 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.
-
INVALID_FOLDER_NAME
public static final TeamFolderRenameError INVALID_FOLDER_NAME
The provided folder name cannot be used.
-
FOLDER_NAME_ALREADY_USED
public static final TeamFolderRenameError FOLDER_NAME_ALREADY_USED
There is already a team folder with the same name.
-
FOLDER_NAME_RESERVED
public static final TeamFolderRenameError FOLDER_NAME_RESERVED
The provided name cannot be used because it is reserved.
-
-
Method Detail
-
tag
public TeamFolderRenameError.Tag 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 aswitch
statement to properly handle the different values for thisTeamFolderRenameError
.- Returns:
- the tag for this instance.
-
isAccessError
public boolean isAccessError()
- Returns:
true
if this instance is tagged asTeamFolderRenameError.Tag.ACCESS_ERROR
,false
otherwise.
-
accessError
public static TeamFolderRenameError accessError(TeamFolderAccessError value)
Returns an instance ofTeamFolderRenameError
that has its tag set toTeamFolderRenameError.Tag.ACCESS_ERROR
.None
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
TeamFolderRenameError
with its tag set toTeamFolderRenameError.Tag.ACCESS_ERROR
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getAccessErrorValue
public TeamFolderAccessError getAccessErrorValue()
This instance must be tagged asTeamFolderRenameError.Tag.ACCESS_ERROR
.- Returns:
- The
TeamFolderAccessError
value associated with this instance ifisAccessError()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisAccessError()
isfalse
.
-
isStatusError
public boolean isStatusError()
- Returns:
true
if this instance is tagged asTeamFolderRenameError.Tag.STATUS_ERROR
,false
otherwise.
-
statusError
public static TeamFolderRenameError statusError(TeamFolderInvalidStatusError value)
Returns an instance ofTeamFolderRenameError
that has its tag set toTeamFolderRenameError.Tag.STATUS_ERROR
.None
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
TeamFolderRenameError
with its tag set toTeamFolderRenameError.Tag.STATUS_ERROR
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getStatusErrorValue
public TeamFolderInvalidStatusError getStatusErrorValue()
This instance must be tagged asTeamFolderRenameError.Tag.STATUS_ERROR
.- Returns:
- The
TeamFolderInvalidStatusError
value associated with this instance ifisStatusError()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisStatusError()
isfalse
.
-
isTeamSharedDropboxError
public boolean isTeamSharedDropboxError()
Returnstrue
if this instance has the tagTeamFolderRenameError.Tag.TEAM_SHARED_DROPBOX_ERROR
,false
otherwise.- Returns:
true
if this instance is tagged asTeamFolderRenameError.Tag.TEAM_SHARED_DROPBOX_ERROR
,false
otherwise.
-
teamSharedDropboxError
public static TeamFolderRenameError teamSharedDropboxError(TeamFolderTeamSharedDropboxError value)
Returns an instance ofTeamFolderRenameError
that has its tag set toTeamFolderRenameError.Tag.TEAM_SHARED_DROPBOX_ERROR
.None
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
TeamFolderRenameError
with its tag set toTeamFolderRenameError.Tag.TEAM_SHARED_DROPBOX_ERROR
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getTeamSharedDropboxErrorValue
public TeamFolderTeamSharedDropboxError getTeamSharedDropboxErrorValue()
This instance must be tagged asTeamFolderRenameError.Tag.TEAM_SHARED_DROPBOX_ERROR
.- Returns:
- The
TeamFolderTeamSharedDropboxError
value associated with this instance ifisTeamSharedDropboxError()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisTeamSharedDropboxError()
isfalse
.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asTeamFolderRenameError.Tag.OTHER
,false
otherwise.
-
isInvalidFolderName
public boolean isInvalidFolderName()
Returnstrue
if this instance has the tagTeamFolderRenameError.Tag.INVALID_FOLDER_NAME
,false
otherwise.- Returns:
true
if this instance is tagged asTeamFolderRenameError.Tag.INVALID_FOLDER_NAME
,false
otherwise.
-
isFolderNameAlreadyUsed
public boolean isFolderNameAlreadyUsed()
Returnstrue
if this instance has the tagTeamFolderRenameError.Tag.FOLDER_NAME_ALREADY_USED
,false
otherwise.- Returns:
true
if this instance is tagged asTeamFolderRenameError.Tag.FOLDER_NAME_ALREADY_USED
,false
otherwise.
-
isFolderNameReserved
public boolean isFolderNameReserved()
Returnstrue
if this instance has the tagTeamFolderRenameError.Tag.FOLDER_NAME_RESERVED
,false
otherwise.- Returns:
true
if this instance is tagged asTeamFolderRenameError.Tag.FOLDER_NAME_RESERVED
,false
otherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringMultiline
public java.lang.String 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
-
-