Class AddPropertiesError
- java.lang.Object
-
- com.dropbox.core.v2.fileproperties.AddPropertiesError
-
public final class AddPropertiesError 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
AddPropertiesError.Serializer
For internal use only.static class
AddPropertiesError.Tag
Discriminating tag type forAddPropertiesError
.
-
Field Summary
Fields Modifier and Type Field Description static AddPropertiesError
DOES_NOT_FIT_TEMPLATE
One or more of the supplied property fields does not conform to the template specifications.static AddPropertiesError
DUPLICATE_PROPERTY_GROUPS
There are 2 or more property groups referring to the same templates in the input.static AddPropertiesError
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.static AddPropertiesError
PROPERTY_FIELD_TOO_LARGE
One or more of the supplied property field values is too large.static AddPropertiesError
PROPERTY_GROUP_ALREADY_EXISTS
A property group associated with this template and file already exists.static AddPropertiesError
RESTRICTED_CONTENT
You do not have permission to modify this template.static AddPropertiesError
UNSUPPORTED_FOLDER
This folder cannot be tagged.
-
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 asAddPropertiesError.Tag.PATH
.java.lang.String
getTemplateNotFoundValue()
Template does not exist for the given identifier.int
hashCode()
boolean
isDoesNotFitTemplate()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.DOES_NOT_FIT_TEMPLATE
,false
otherwise.boolean
isDuplicatePropertyGroups()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.DUPLICATE_PROPERTY_GROUPS
,false
otherwise.boolean
isOther()
boolean
isPath()
boolean
isPropertyFieldTooLarge()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.PROPERTY_FIELD_TOO_LARGE
,false
otherwise.boolean
isPropertyGroupAlreadyExists()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.PROPERTY_GROUP_ALREADY_EXISTS
,false
otherwise.boolean
isRestrictedContent()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.RESTRICTED_CONTENT
,false
otherwise.boolean
isTemplateNotFound()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.TEMPLATE_NOT_FOUND
,false
otherwise.boolean
isUnsupportedFolder()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.UNSUPPORTED_FOLDER
,false
otherwise.static AddPropertiesError
path(LookupError value)
Returns an instance ofAddPropertiesError
that has its tag set toAddPropertiesError.Tag.PATH
.AddPropertiesError.Tag
tag()
Returns the tag for this instance.static AddPropertiesError
templateNotFound(java.lang.String value)
Returns an instance ofAddPropertiesError
that has its tag set toAddPropertiesError.Tag.TEMPLATE_NOT_FOUND
.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
RESTRICTED_CONTENT
public static final AddPropertiesError RESTRICTED_CONTENT
You do not have permission to modify this template.
-
OTHER
public static final AddPropertiesError 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.
-
UNSUPPORTED_FOLDER
public static final AddPropertiesError UNSUPPORTED_FOLDER
This folder cannot be tagged. Tagging folders is not supported for team-owned templates.
-
PROPERTY_FIELD_TOO_LARGE
public static final AddPropertiesError PROPERTY_FIELD_TOO_LARGE
One or more of the supplied property field values is too large.
-
DOES_NOT_FIT_TEMPLATE
public static final AddPropertiesError DOES_NOT_FIT_TEMPLATE
One or more of the supplied property fields does not conform to the template specifications.
-
DUPLICATE_PROPERTY_GROUPS
public static final AddPropertiesError DUPLICATE_PROPERTY_GROUPS
There are 2 or more property groups referring to the same templates in the input.
-
PROPERTY_GROUP_ALREADY_EXISTS
public static final AddPropertiesError PROPERTY_GROUP_ALREADY_EXISTS
A property group associated with this template and file already exists.
-
-
Method Detail
-
tag
public AddPropertiesError.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 thisAddPropertiesError
.- Returns:
- the tag for this instance.
-
isTemplateNotFound
public boolean isTemplateNotFound()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.TEMPLATE_NOT_FOUND
,false
otherwise.- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.TEMPLATE_NOT_FOUND
,false
otherwise.
-
templateNotFound
public static AddPropertiesError templateNotFound(java.lang.String value)
Returns an instance ofAddPropertiesError
that has its tag set toAddPropertiesError.Tag.TEMPLATE_NOT_FOUND
.Template does not exist for the given identifier.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AddPropertiesError
with its tag set toAddPropertiesError.Tag.TEMPLATE_NOT_FOUND
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
is shorter than 1, does not match pattern "(/|ptid:).*
", or isnull
.
-
getTemplateNotFoundValue
public java.lang.String getTemplateNotFoundValue()
Template does not exist for the given identifier.This instance must be tagged as
AddPropertiesError.Tag.TEMPLATE_NOT_FOUND
.- Returns:
- The
String
value associated with this instance ifisTemplateNotFound()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisTemplateNotFound()
isfalse
.
-
isRestrictedContent
public boolean isRestrictedContent()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.RESTRICTED_CONTENT
,false
otherwise.- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.RESTRICTED_CONTENT
,false
otherwise.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.OTHER
,false
otherwise.
-
isPath
public boolean isPath()
- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.PATH
,false
otherwise.
-
path
public static AddPropertiesError path(LookupError value)
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AddPropertiesError
with its tag set toAddPropertiesError.Tag.PATH
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getPathValue
public LookupError getPathValue()
This instance must be tagged asAddPropertiesError.Tag.PATH
.- Returns:
- The
LookupError
value associated with this instance ifisPath()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisPath()
isfalse
.
-
isUnsupportedFolder
public boolean isUnsupportedFolder()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.UNSUPPORTED_FOLDER
,false
otherwise.- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.UNSUPPORTED_FOLDER
,false
otherwise.
-
isPropertyFieldTooLarge
public boolean isPropertyFieldTooLarge()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.PROPERTY_FIELD_TOO_LARGE
,false
otherwise.- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.PROPERTY_FIELD_TOO_LARGE
,false
otherwise.
-
isDoesNotFitTemplate
public boolean isDoesNotFitTemplate()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.DOES_NOT_FIT_TEMPLATE
,false
otherwise.- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.DOES_NOT_FIT_TEMPLATE
,false
otherwise.
-
isDuplicatePropertyGroups
public boolean isDuplicatePropertyGroups()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.DUPLICATE_PROPERTY_GROUPS
,false
otherwise.- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.DUPLICATE_PROPERTY_GROUPS
,false
otherwise.
-
isPropertyGroupAlreadyExists
public boolean isPropertyGroupAlreadyExists()
Returnstrue
if this instance has the tagAddPropertiesError.Tag.PROPERTY_GROUP_ALREADY_EXISTS
,false
otherwise.- Returns:
true
if this instance is tagged asAddPropertiesError.Tag.PROPERTY_GROUP_ALREADY_EXISTS
,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
-
-