public final class PropertyTemplateError extends Object
isAbc()
methods will return true. You can use tag() to determine the
tag associated with this instance.
Open unions may be extended in the future with additional tags. If a new
tag is introduced that this SDK does not recognized, the OTHER value
will be used.
| Modifier and Type | Class and Description |
|---|---|
static class |
PropertyTemplateError.Tag
Discriminating tag type for
PropertyTemplateError. |
| Modifier and Type | Field and Description |
|---|---|
static PropertyTemplateError |
OTHER
An unspecified error.
|
static PropertyTemplateError |
RESTRICTED_CONTENT
You do not have the permissions to modify this property template.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getTemplateNotFoundValue()
Property template does not exist for given identifier.
|
int |
hashCode() |
boolean |
isOther()
|
boolean |
isRestrictedContent()
Returns
true if this instance has the tag PropertyTemplateError.Tag.RESTRICTED_CONTENT, false otherwise. |
boolean |
isTemplateNotFound()
Returns
true if this instance has the tag PropertyTemplateError.Tag.TEMPLATE_NOT_FOUND, false otherwise. |
PropertyTemplateError.Tag |
tag()
Returns the tag for this instance.
|
static PropertyTemplateError |
templateNotFound(String value)
Returns an instance of
PropertyTemplateError that has its tag set
to PropertyTemplateError.Tag.TEMPLATE_NOT_FOUND. |
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final PropertyTemplateError RESTRICTED_CONTENT
public static final PropertyTemplateError OTHER
public PropertyTemplateError.Tag tag()
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 return true. Callers are recommended to use the tag
value in a switch statement to properly handle the different
values for this PropertyTemplateError.
If a tag returned by the server is unrecognized by this SDK, the
PropertyTemplateError.Tag.OTHER value will be used.
public boolean isTemplateNotFound()
true if this instance has the tag PropertyTemplateError.Tag.TEMPLATE_NOT_FOUND, false otherwise.true if this instance is tagged as PropertyTemplateError.Tag.TEMPLATE_NOT_FOUND, false otherwise.public static PropertyTemplateError templateNotFound(String value)
PropertyTemplateError that has its tag set
to PropertyTemplateError.Tag.TEMPLATE_NOT_FOUND.
Property template does not exist for given identifier.
value - value to assign to this instance.PropertyTemplateError with its tag set to
PropertyTemplateError.Tag.TEMPLATE_NOT_FOUND.IllegalArgumentException - if value is shorter than 1,
does not match pattern "(/|ptid:).*", or is null.public String getTemplateNotFoundValue()
This instance must be tagged as PropertyTemplateError.Tag.TEMPLATE_NOT_FOUND.
templateNotFound(java.lang.String) value
associated with this instance if isTemplateNotFound() is
true.IllegalStateException - If isTemplateNotFound() is false.public boolean isRestrictedContent()
true if this instance has the tag PropertyTemplateError.Tag.RESTRICTED_CONTENT, false otherwise.true if this instance is tagged as PropertyTemplateError.Tag.RESTRICTED_CONTENT, false otherwise.public boolean isOther()
true if this instance is tagged as PropertyTemplateError.Tag.OTHER,
false otherwise.public String toStringMultiline()
The returned String may contain newlines.