Class CreateSharedLinkWithSettingsError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.CreateSharedLinkWithSettingsError
-
public final class CreateSharedLinkWithSettingsError 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
CreateSharedLinkWithSettingsError.Tag
Discriminating tag type forCreateSharedLinkWithSettingsError
.
-
Field Summary
Fields Modifier and Type Field Description static CreateSharedLinkWithSettingsError
ACCESS_DENIED
Access to the requested path is forbidden.static CreateSharedLinkWithSettingsError
EMAIL_NOT_VERIFIED
User's email should be verified.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
LookupError
getPathValue()
This instance must be tagged asCreateSharedLinkWithSettingsError.Tag.PATH
.SharedLinkSettingsError
getSettingsErrorValue()
There is an error with the given settings.SharedLinkAlreadyExistsMetadata
getSharedLinkAlreadyExistsValue()
The shared link already exists.int
hashCode()
boolean
isAccessDenied()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.ACCESS_DENIED
,false
otherwise.boolean
isEmailNotVerified()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.EMAIL_NOT_VERIFIED
,false
otherwise.boolean
isPath()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.PATH
,false
otherwise.boolean
isSettingsError()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR
,false
otherwise.boolean
isSharedLinkAlreadyExists()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
,false
otherwise.static CreateSharedLinkWithSettingsError
path(LookupError value)
Returns an instance ofCreateSharedLinkWithSettingsError
that has its tag set toCreateSharedLinkWithSettingsError.Tag.PATH
.static CreateSharedLinkWithSettingsError
settingsError(SharedLinkSettingsError value)
Returns an instance ofCreateSharedLinkWithSettingsError
that has its tag set toCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR
.static CreateSharedLinkWithSettingsError
sharedLinkAlreadyExists()
Returns an instance ofCreateSharedLinkWithSettingsError
that has its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
.static CreateSharedLinkWithSettingsError
sharedLinkAlreadyExists(SharedLinkAlreadyExistsMetadata value)
Returns an instance ofCreateSharedLinkWithSettingsError
that has its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
.CreateSharedLinkWithSettingsError.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.
-
-
-
Field Detail
-
EMAIL_NOT_VERIFIED
public static final CreateSharedLinkWithSettingsError EMAIL_NOT_VERIFIED
User's email should be verified.
-
ACCESS_DENIED
public static final CreateSharedLinkWithSettingsError ACCESS_DENIED
Access to the requested path is forbidden.
-
-
Method Detail
-
tag
public CreateSharedLinkWithSettingsError.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 thisCreateSharedLinkWithSettingsError
.- Returns:
- the tag for this instance.
-
isPath
public boolean isPath()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.PATH
,false
otherwise.- Returns:
true
if this instance is tagged asCreateSharedLinkWithSettingsError.Tag.PATH
,false
otherwise.
-
path
public static CreateSharedLinkWithSettingsError path(LookupError value)
Returns an instance ofCreateSharedLinkWithSettingsError
that has its tag set toCreateSharedLinkWithSettingsError.Tag.PATH
.None
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
CreateSharedLinkWithSettingsError
with its tag set toCreateSharedLinkWithSettingsError.Tag.PATH
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getPathValue
public LookupError getPathValue()
This instance must be tagged asCreateSharedLinkWithSettingsError.Tag.PATH
.- Returns:
- The
LookupError
value associated with this instance ifisPath()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisPath()
isfalse
.
-
isEmailNotVerified
public boolean isEmailNotVerified()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.EMAIL_NOT_VERIFIED
,false
otherwise.- Returns:
true
if this instance is tagged asCreateSharedLinkWithSettingsError.Tag.EMAIL_NOT_VERIFIED
,false
otherwise.
-
isSharedLinkAlreadyExists
public boolean isSharedLinkAlreadyExists()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
,false
otherwise.- Returns:
true
if this instance is tagged asCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
,false
otherwise.
-
sharedLinkAlreadyExists
public static CreateSharedLinkWithSettingsError sharedLinkAlreadyExists(SharedLinkAlreadyExistsMetadata value)
Returns an instance ofCreateSharedLinkWithSettingsError
that has its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
.The shared link already exists. You can call
DbxUserSharingRequests.listSharedLinks(com.dropbox.core.v2.sharing.ListSharedLinksArg)
to get the existing link, or use the provided metadata if it is returned.- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
CreateSharedLinkWithSettingsError
with its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
.
-
sharedLinkAlreadyExists
public static CreateSharedLinkWithSettingsError sharedLinkAlreadyExists()
Returns an instance ofCreateSharedLinkWithSettingsError
that has its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
.The shared link already exists. You can call
DbxUserSharingRequests.listSharedLinks(com.dropbox.core.v2.sharing.ListSharedLinksArg)
to get the existing link, or use the provided metadata if it is returned.- Returns:
- Instance of
CreateSharedLinkWithSettingsError
with its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
.
-
getSharedLinkAlreadyExistsValue
public SharedLinkAlreadyExistsMetadata getSharedLinkAlreadyExistsValue()
The shared link already exists. You can callDbxUserSharingRequests.listSharedLinks(com.dropbox.core.v2.sharing.ListSharedLinksArg)
to get the existing link, or use the provided metadata if it is returned.This instance must be tagged as
CreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS
.- Returns:
- The
SharedLinkAlreadyExistsMetadata
value associated with this instance ifisSharedLinkAlreadyExists()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisSharedLinkAlreadyExists()
isfalse
.
-
isSettingsError
public boolean isSettingsError()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR
,false
otherwise.- Returns:
true
if this instance is tagged asCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR
,false
otherwise.
-
settingsError
public static CreateSharedLinkWithSettingsError settingsError(SharedLinkSettingsError value)
Returns an instance ofCreateSharedLinkWithSettingsError
that has its tag set toCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR
.There is an error with the given settings.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
CreateSharedLinkWithSettingsError
with its tag set toCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getSettingsErrorValue
public SharedLinkSettingsError getSettingsErrorValue()
There is an error with the given settings.This instance must be tagged as
CreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR
.- Returns:
- The
SharedLinkSettingsError
value associated with this instance ifisSettingsError()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisSettingsError()
isfalse
.
-
isAccessDenied
public boolean isAccessDenied()
Returnstrue
if this instance has the tagCreateSharedLinkWithSettingsError.Tag.ACCESS_DENIED
,false
otherwise.- Returns:
true
if this instance is tagged asCreateSharedLinkWithSettingsError.Tag.ACCESS_DENIED
,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
-
-