Class CreateSharedLinkWithSettingsError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.CreateSharedLinkWithSettingsError
-
public final class CreateSharedLinkWithSettingsError extends java.lang.ObjectThis 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 classCreateSharedLinkWithSettingsError.TagDiscriminating tag type forCreateSharedLinkWithSettingsError.
-
Field Summary
Fields Modifier and Type Field Description static CreateSharedLinkWithSettingsErrorACCESS_DENIEDThe user is not allowed to create a shared link to the specified file.static CreateSharedLinkWithSettingsErrorEMAIL_NOT_VERIFIEDThis user's email address is not verified.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)LookupErrorgetPathValue()This instance must be tagged asCreateSharedLinkWithSettingsError.Tag.PATH.SharedLinkSettingsErrorgetSettingsErrorValue()There is an error with the given settings.SharedLinkAlreadyExistsMetadatagetSharedLinkAlreadyExistsValue()The shared link already exists.inthashCode()booleanisAccessDenied()Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.ACCESS_DENIED,falseotherwise.booleanisEmailNotVerified()Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.EMAIL_NOT_VERIFIED,falseotherwise.booleanisPath()Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.PATH,falseotherwise.booleanisSettingsError()Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR,falseotherwise.booleanisSharedLinkAlreadyExists()Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS,falseotherwise.static CreateSharedLinkWithSettingsErrorpath(LookupError value)Returns an instance ofCreateSharedLinkWithSettingsErrorthat has its tag set toCreateSharedLinkWithSettingsError.Tag.PATH.static CreateSharedLinkWithSettingsErrorsettingsError(SharedLinkSettingsError value)Returns an instance ofCreateSharedLinkWithSettingsErrorthat has its tag set toCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR.static CreateSharedLinkWithSettingsErrorsharedLinkAlreadyExists()Returns an instance ofCreateSharedLinkWithSettingsErrorthat has its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS.static CreateSharedLinkWithSettingsErrorsharedLinkAlreadyExists(SharedLinkAlreadyExistsMetadata value)Returns an instance ofCreateSharedLinkWithSettingsErrorthat has its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS.CreateSharedLinkWithSettingsError.Tagtag()Returns the tag for this instance.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
EMAIL_NOT_VERIFIED
public static final CreateSharedLinkWithSettingsError EMAIL_NOT_VERIFIED
This user's email address is not verified. This functionality is only available on accounts with a verified email address. Users can verify their email address here.
-
ACCESS_DENIED
public static final CreateSharedLinkWithSettingsError ACCESS_DENIED
The user is not allowed to create a shared link to the specified file. For example, this can occur if the file is restricted or if the user's links are banned.
-
-
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 aswitchstatement to properly handle the different values for thisCreateSharedLinkWithSettingsError.- Returns:
- the tag for this instance.
-
isPath
public boolean isPath()
Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.PATH,falseotherwise.- Returns:
trueif this instance is tagged asCreateSharedLinkWithSettingsError.Tag.PATH,falseotherwise.
-
path
public static CreateSharedLinkWithSettingsError path(LookupError value)
Returns an instance ofCreateSharedLinkWithSettingsErrorthat has its tag set toCreateSharedLinkWithSettingsError.Tag.PATH.None
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
CreateSharedLinkWithSettingsErrorwith its tag set toCreateSharedLinkWithSettingsError.Tag.PATH. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getPathValue
public LookupError getPathValue()
This instance must be tagged asCreateSharedLinkWithSettingsError.Tag.PATH.- Returns:
- The
LookupErrorvalue associated with this instance ifisPath()istrue. - Throws:
java.lang.IllegalStateException- IfisPath()isfalse.
-
isEmailNotVerified
public boolean isEmailNotVerified()
Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.EMAIL_NOT_VERIFIED,falseotherwise.- Returns:
trueif this instance is tagged asCreateSharedLinkWithSettingsError.Tag.EMAIL_NOT_VERIFIED,falseotherwise.
-
isSharedLinkAlreadyExists
public boolean isSharedLinkAlreadyExists()
Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS,falseotherwise.- Returns:
trueif this instance is tagged asCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS,falseotherwise.
-
sharedLinkAlreadyExists
public static CreateSharedLinkWithSettingsError sharedLinkAlreadyExists(SharedLinkAlreadyExistsMetadata value)
Returns an instance ofCreateSharedLinkWithSettingsErrorthat 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
CreateSharedLinkWithSettingsErrorwith its tag set toCreateSharedLinkWithSettingsError.Tag.SHARED_LINK_ALREADY_EXISTS.
-
sharedLinkAlreadyExists
public static CreateSharedLinkWithSettingsError sharedLinkAlreadyExists()
Returns an instance ofCreateSharedLinkWithSettingsErrorthat 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
CreateSharedLinkWithSettingsErrorwith 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
SharedLinkAlreadyExistsMetadatavalue associated with this instance ifisSharedLinkAlreadyExists()istrue. - Throws:
java.lang.IllegalStateException- IfisSharedLinkAlreadyExists()isfalse.
-
isSettingsError
public boolean isSettingsError()
Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR,falseotherwise.- Returns:
trueif this instance is tagged asCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR,falseotherwise.
-
settingsError
public static CreateSharedLinkWithSettingsError settingsError(SharedLinkSettingsError value)
Returns an instance ofCreateSharedLinkWithSettingsErrorthat 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
CreateSharedLinkWithSettingsErrorwith its tag set toCreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getSettingsErrorValue
public SharedLinkSettingsError getSettingsErrorValue()
There is an error with the given settings.This instance must be tagged as
CreateSharedLinkWithSettingsError.Tag.SETTINGS_ERROR.- Returns:
- The
SharedLinkSettingsErrorvalue associated with this instance ifisSettingsError()istrue. - Throws:
java.lang.IllegalStateException- IfisSettingsError()isfalse.
-
isAccessDenied
public boolean isAccessDenied()
Returnstrueif this instance has the tagCreateSharedLinkWithSettingsError.Tag.ACCESS_DENIED,falseotherwise.- Returns:
trueif this instance is tagged asCreateSharedLinkWithSettingsError.Tag.ACCESS_DENIED,falseotherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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
-
-