Class AddPropertiesError
java.lang.Object
com.dropbox.core.v2.fileproperties.AddPropertiesError
This class is a tagged union. Tagged unions instances are always associated
to a specific tag. This means only one of the
isAbc() methods will
return true. You can use tag() to determine the tag
associated with this instance.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor internal use only.static enumDiscriminating tag type forAddPropertiesError. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AddPropertiesErrorOne or more of the supplied property fields does not conform to the template specifications.static final AddPropertiesErrorThere are 2 or more property groups referring to the same templates in the input.static final AddPropertiesErrorCatch-all used for unknown tag values returned by the Dropbox servers.static final AddPropertiesErrorOne or more of the supplied property field values is too large.static final AddPropertiesErrorA property group associated with this template and file already exists.static final AddPropertiesErrorYou do not have permission to modify this template.static final AddPropertiesErrorThis folder cannot be tagged. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis instance must be tagged asAddPropertiesError.Tag.PATH.Template does not exist for the given identifier.inthashCode()booleanReturnstrueif this instance has the tagAddPropertiesError.Tag.DOES_NOT_FIT_TEMPLATE,falseotherwise.booleanReturnstrueif this instance has the tagAddPropertiesError.Tag.DUPLICATE_PROPERTY_GROUPS,falseotherwise.booleanisOther()booleanisPath()booleanReturnstrueif this instance has the tagAddPropertiesError.Tag.PROPERTY_FIELD_TOO_LARGE,falseotherwise.booleanReturnstrueif this instance has the tagAddPropertiesError.Tag.PROPERTY_GROUP_ALREADY_EXISTS,falseotherwise.booleanReturnstrueif this instance has the tagAddPropertiesError.Tag.RESTRICTED_CONTENT,falseotherwise.booleanReturnstrueif this instance has the tagAddPropertiesError.Tag.TEMPLATE_NOT_FOUND,falseotherwise.booleanReturnstrueif this instance has the tagAddPropertiesError.Tag.UNSUPPORTED_FOLDER,falseotherwise.static AddPropertiesErrorpath(LookupError value) Returns an instance ofAddPropertiesErrorthat has its tag set toAddPropertiesError.Tag.PATH.tag()Returns the tag for this instance.static AddPropertiesErrortemplateNotFound(String value) Returns an instance ofAddPropertiesErrorthat has its tag set toAddPropertiesError.Tag.TEMPLATE_NOT_FOUND.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
RESTRICTED_CONTENT
You do not have permission to modify this template. -
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
This folder cannot be tagged. Tagging folders is not supported for team-owned templates. -
PROPERTY_FIELD_TOO_LARGE
One or more of the supplied property field values is too large. -
DOES_NOT_FIT_TEMPLATE
One or more of the supplied property fields does not conform to the template specifications. -
DUPLICATE_PROPERTY_GROUPS
There are 2 or more property groups referring to the same templates in the input. -
PROPERTY_GROUP_ALREADY_EXISTS
A property group associated with this template and file already exists.
-
-
Method Details
-
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 thisAddPropertiesError.- Returns:
- the tag for this instance.
-
isTemplateNotFound
public boolean isTemplateNotFound()Returnstrueif this instance has the tagAddPropertiesError.Tag.TEMPLATE_NOT_FOUND,falseotherwise.- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.TEMPLATE_NOT_FOUND,falseotherwise.
-
templateNotFound
Returns an instance ofAddPropertiesErrorthat 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
AddPropertiesErrorwith its tag set toAddPropertiesError.Tag.TEMPLATE_NOT_FOUND. - Throws:
IllegalArgumentException- ifvalueis shorter than 1, does not match pattern "(/|ptid:).*", or isnull.
-
getTemplateNotFoundValue
Template does not exist for the given identifier.This instance must be tagged as
AddPropertiesError.Tag.TEMPLATE_NOT_FOUND.- Returns:
- The
Stringvalue associated with this instance ifisTemplateNotFound()istrue. - Throws:
IllegalStateException- IfisTemplateNotFound()isfalse.
-
isRestrictedContent
public boolean isRestrictedContent()Returnstrueif this instance has the tagAddPropertiesError.Tag.RESTRICTED_CONTENT,falseotherwise.- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.RESTRICTED_CONTENT,falseotherwise.
-
isOther
public boolean isOther()- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.OTHER,falseotherwise.
-
isPath
public boolean isPath()- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.PATH,falseotherwise.
-
path
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AddPropertiesErrorwith its tag set toAddPropertiesError.Tag.PATH. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getPathValue
This instance must be tagged asAddPropertiesError.Tag.PATH.- Returns:
- The
LookupErrorvalue associated with this instance ifisPath()istrue. - Throws:
IllegalStateException- IfisPath()isfalse.
-
isUnsupportedFolder
public boolean isUnsupportedFolder()Returnstrueif this instance has the tagAddPropertiesError.Tag.UNSUPPORTED_FOLDER,falseotherwise.- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.UNSUPPORTED_FOLDER,falseotherwise.
-
isPropertyFieldTooLarge
public boolean isPropertyFieldTooLarge()Returnstrueif this instance has the tagAddPropertiesError.Tag.PROPERTY_FIELD_TOO_LARGE,falseotherwise.- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.PROPERTY_FIELD_TOO_LARGE,falseotherwise.
-
isDoesNotFitTemplate
public boolean isDoesNotFitTemplate()Returnstrueif this instance has the tagAddPropertiesError.Tag.DOES_NOT_FIT_TEMPLATE,falseotherwise.- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.DOES_NOT_FIT_TEMPLATE,falseotherwise.
-
isDuplicatePropertyGroups
public boolean isDuplicatePropertyGroups()Returnstrueif this instance has the tagAddPropertiesError.Tag.DUPLICATE_PROPERTY_GROUPS,falseotherwise.- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.DUPLICATE_PROPERTY_GROUPS,falseotherwise.
-
isPropertyGroupAlreadyExists
public boolean isPropertyGroupAlreadyExists()Returnstrueif this instance has the tagAddPropertiesError.Tag.PROPERTY_GROUP_ALREADY_EXISTS,falseotherwise.- Returns:
trueif this instance is tagged asAddPropertiesError.Tag.PROPERTY_GROUP_ALREADY_EXISTS,falseotherwise.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-