Package com.atlan.model.typedefs
Class AttributeDef
java.lang.Object
com.atlan.model.core.AtlanObject
com.atlan.model.typedefs.AttributeDef
- All Implemented Interfaces:
Serializable
,Comparable<AttributeDef>
- Direct Known Subclasses:
RelationshipAttributeDef
,RelationshipEndDef
Defines the structure of a single attribute for a type definition in Atlan.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AttributeDef.AttributeDefBuilder<C extends AttributeDef,
B extends AttributeDef.AttributeDefBuilder<C, B>> Nested classes/interfaces inherited from class com.atlan.model.core.AtlanObject
AtlanObject.AtlanObjectBuilder<C extends AtlanObject,
B extends AtlanObject.AtlanObjectBuilder<C, B>> -
Field Summary
Fields inherited from class com.atlan.model.core.AtlanObject
rawJsonObject
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeDef.AttributeDefBuilder<?,
?> builder()
protected boolean
int
static AttributeDef.AttributeDefBuilder<?,
?> creator
(String name, AtlanAttributeType type) Build up an attribute definition from the provided parameters and default settings for all other parameters.static AttributeDef.AttributeDefBuilder<?,
?> creator
(String name, AtlanAttributeType type, String relatedObjectType, AtlanCustomAttributeCardinality cardinality) Build up an attribute definition from the provided parameters and default settings for all other parameters.boolean
TBCDetermine the basic type of this attribute (irrespective of whether it is multivalued or not).static String
getBasicType
(String type) Determine the basic type of the attribute (irrespective of whether it is multivalued or not).Specifies whether the attribute is single or multivalued.TBCDetermine the container of this attribute, if any.static String
getContainerType
(String type) Determine the container of the attribute, if any.Specifies an (optional) default value for the attribute.Explanation of the attribute.Human-readable name of the attribute.List of values for an enumeration.Whether changes to this attribute's value generate an event (true) or not (false).TBCTBCTBCIndicates whether the attribute has a default value of being empty (true) or not (false).Specifies whether the attribute can be searched (true) or not (false).getIsNew()
Whether the attribute is being newly created (true) or not (false).Indicates whether the attribute is mandatory (false) or optional (true).Specifies whether the attribute must have unique values (true) or not (false).getName()
Internal hashed-string name for the attribute.Options for the attribute.TBCTBCType of the attribute.Specifies the maximum number of values the attribute can have.Specifies the minimum number of values the attribute can have.int
hashCode()
boolean
Whether this attribute is archived (true) or active (false).static AttributeDef
of
(AtlanClient client, String displayName, AtlanCustomAttributePrimitiveType type, boolean multiValued) Instantiate an attribute definition from the provided parameters.static AttributeDef
of
(AtlanClient client, String displayName, AtlanCustomAttributePrimitiveType type, boolean multiValued, AttributeDefOptions otherOptions) Instantiate an attribute definition from the provided parameters.static AttributeDef
of
(AtlanClient client, String displayName, AtlanCustomAttributePrimitiveType type, String optionsName, boolean multiValued) Instantiate an attribute definition from the provided parameters.static AttributeDef
of
(AtlanClient client, String displayName, AtlanCustomAttributePrimitiveType type, String optionsName, boolean multiValued, AttributeDefOptions otherOptions) Instantiate an attribute definition from the provided parameters.static AttributeDef
of
(String displayName, AtlanCustomAttributePrimitiveType type, boolean multiValued) Instantiate an attribute definition from the provided parameters.static AttributeDef
of
(String displayName, AtlanCustomAttributePrimitiveType type, boolean multiValued, AttributeDefOptions otherOptions) Instantiate an attribute definition from the provided parameters.static AttributeDef
of
(String displayName, AtlanCustomAttributePrimitiveType type, String optionsName, boolean multiValued) Instantiate an attribute definition from the provided parameters.static AttributeDef
of
(String displayName, AtlanCustomAttributePrimitiveType type, String optionsName, boolean multiValued, AttributeDefOptions otherOptions) Instantiate an attribute definition from the provided parameters.toString()
Methods inherited from class com.atlan.model.core.AtlanObject
getRawJsonObject, setRawJsonObject, toJson
-
Constructor Details
-
AttributeDef
-
-
Method Details
-
of
public static AttributeDef of(String displayName, AtlanCustomAttributePrimitiveType type, boolean multiValued) throws AtlanException Instantiate an attribute definition from the provided parameters.- Parameters:
displayName
- human-readable name of the attributetype
- primitive type of the attribute (non-enum)multiValued
- true if multiple values are allowed for the attribute, otherwise false- Returns:
- the attribute definition
- Throws:
AtlanException
- if there is any API error trying to construct the attribute (usually due to a non-existent enumeration)
-
of
public static AttributeDef of(AtlanClient client, String displayName, AtlanCustomAttributePrimitiveType type, boolean multiValued) throws AtlanException Instantiate an attribute definition from the provided parameters.- Parameters:
client
- connectivity to the Atlan tenant on which this attribute is intended to be createddisplayName
- human-readable name of the attributetype
- primitive type of the attribute (non-enum)multiValued
- true if multiple values are allowed for the attribute, otherwise false- Returns:
- the attribute definition
- Throws:
AtlanException
- if there is any API error trying to construct the attribute (usually due to a non-existent enumeration)
-
of
public static AttributeDef of(String displayName, AtlanCustomAttributePrimitiveType type, boolean multiValued, AttributeDefOptions otherOptions) throws AtlanException Instantiate an attribute definition from the provided parameters.- Parameters:
displayName
- human-readable name of the attributetype
- primitive type of the attribute (non-enum)multiValued
- true if multiple values are allowed for the attribute, otherwise falseotherOptions
- other options to set on the attribute- Returns:
- the attribute definition
- Throws:
AtlanException
- if there is any API error trying to construct the attribute (usually due to a non-existent enumeration)
-
of
public static AttributeDef of(AtlanClient client, String displayName, AtlanCustomAttributePrimitiveType type, boolean multiValued, AttributeDefOptions otherOptions) throws AtlanException Instantiate an attribute definition from the provided parameters.- Parameters:
client
- connectivity to the Atlan tenant on which this attribute is intended to be createddisplayName
- human-readable name of the attributetype
- primitive type of the attribute (non-enum)multiValued
- true if multiple values are allowed for the attribute, otherwise falseotherOptions
- other options to set on the attribute- Returns:
- the attribute definition
- Throws:
AtlanException
- if there is any API error trying to construct the attribute (usually due to a non-existent enumeration)
-
of
public static AttributeDef of(String displayName, AtlanCustomAttributePrimitiveType type, String optionsName, boolean multiValued) throws AtlanException Instantiate an attribute definition from the provided parameters.- Parameters:
displayName
- human-readable name of the attributetype
- primitive type of the attributeoptionsName
- name of the options (enumeration) if the primitive type is an enumeration (can be null otherwise)multiValued
- true if multiple values are allowed for the attribute, otherwise false- Returns:
- the attribute definition
- Throws:
AtlanException
- if there is any API error trying to construct the attribute (usually due to a non-existent enumeration)
-
of
public static AttributeDef of(AtlanClient client, String displayName, AtlanCustomAttributePrimitiveType type, String optionsName, boolean multiValued) throws AtlanException Instantiate an attribute definition from the provided parameters.- Parameters:
client
- connectivity to the Atlan tenant on which this attribute is intended to be createddisplayName
- human-readable name of the attributetype
- primitive type of the attributeoptionsName
- name of the options (enumeration) if the primitive type is an enumeration (can be null otherwise)multiValued
- true if multiple values are allowed for the attribute, otherwise false- Returns:
- the attribute definition
- Throws:
AtlanException
- if there is any API error trying to construct the attribute (usually due to a non-existent enumeration)
-
of
public static AttributeDef of(String displayName, AtlanCustomAttributePrimitiveType type, String optionsName, boolean multiValued, AttributeDefOptions otherOptions) throws AtlanException Instantiate an attribute definition from the provided parameters.- Parameters:
displayName
- human-readable name of the attributetype
- primitive type of the attributeoptionsName
- name of the options (enumeration) if the primitive type is an enumeration (can be null otherwise)multiValued
- true if multiple values are allowed for the attribute, otherwise falseotherOptions
- other options to set on the attribute- Returns:
- the attribute definition
- Throws:
AtlanException
- if there is any API error trying to construct the attribute (usually due to a non-existent enumeration)
-
of
public static AttributeDef of(AtlanClient client, String displayName, AtlanCustomAttributePrimitiveType type, String optionsName, boolean multiValued, AttributeDefOptions otherOptions) throws AtlanException Instantiate an attribute definition from the provided parameters.- Parameters:
client
- connectivity to the Atlan tenant on which this attribute is intended to be createddisplayName
- human-readable name of the attributetype
- primitive type of the attributeoptionsName
- name of the options (enumeration) if the primitive type is an enumeration (can be null otherwise)multiValued
- true if multiple values are allowed for the attribute, otherwise falseotherOptions
- other options to set on the attribute- Returns:
- the attribute definition
- Throws:
AtlanException
- if there is any API error trying to construct the attribute (usually due to a non-existent enumeration)
-
creator
Build up an attribute definition from the provided parameters and default settings for all other parameters. NOTE: INTERNAL USE ONLY.- Parameters:
name
- name of the attributetype
- primitive type of the attribute (non-enum, non-struct)- Returns:
- a builder for an attribute definition
-
creator
public static AttributeDef.AttributeDefBuilder<?,?> creator(String name, AtlanAttributeType type, String relatedObjectType, AtlanCustomAttributeCardinality cardinality) Build up an attribute definition from the provided parameters and default settings for all other parameters. NOTE: INTERNAL USE ONLY.- Parameters:
name
- name of the attributetype
- type of the attributerelatedObjectType
- name of the enumeration or struct, if the attribute type is an enumeration or struct (can be null otherwise)cardinality
- whether the attribute is single or multivalued- Returns:
- a builder for an attribute definition
-
isArchived
public boolean isArchived()Whether this attribute is archived (true) or active (false).- Returns:
- boolean
-
getBasicType
Determine the basic type of this attribute (irrespective of whether it is multivalued or not). For example, the basic type ofarray<string>
is juststring
.- Returns:
- the basic type of this attribute
-
getContainerType
Determine the container of this attribute, if any. For example, the container ofarray<string>
is a list or sorted set.- Returns:
- the container of this attribute, if any, or null if it is a single-valued attribute
-
getBasicType
Determine the basic type of the attribute (irrespective of whether it is multivalued or not). For example, the basic type ofarray<string>
is juststring
.- Parameters:
type
- typeName of the attribute- Returns:
- the basic type of this attribute
-
getContainerType
Determine the container of the attribute, if any. For example, the container ofarray<string>
is a list or sorted set.- Parameters:
type
- typeName of the attribute- Returns:
- the container of this attribute, if any, or null if it is a single-valued attribute
-
compareTo
- Specified by:
compareTo
in interfaceComparable<AttributeDef>
-
builder
-
toBuilder
-
getName
Internal hashed-string name for the attribute. -
getDisplayName
Human-readable name of the attribute. -
getDescription
Explanation of the attribute. -
getTypeName
Type of the attribute.- This can either be a primitive Atlan type or the name of a custom metadata enumeration (options).
- The primitive Atlan types' values are defined in the
AtlanCustomAttributePrimitiveType
enumeration. - Note: there are a number of custom types there as well (
users
,groups
,url
, andSQL
). ThetypeName
for all of these custom types isSTRING
, and the more detailed type only appears in theoptions
. - For fields that can be multivalued, use
array<type>
for the typeName.
-
getDefaultValue
Specifies an (optional) default value for the attribute. -
getIsDefaultValueNull
Indicates whether the attribute has a default value of being empty (true) or not (false). -
getIsOptional
Indicates whether the attribute is mandatory (false) or optional (true). -
getCardinality
Specifies whether the attribute is single or multivalued. -
getValuesMinCount
Specifies the minimum number of values the attribute can have. -
getValuesMaxCount
Specifies the maximum number of values the attribute can have. -
getIsUnique
Specifies whether the attribute must have unique values (true) or not (false). -
getIsIndexable
Specifies whether the attribute can be searched (true) or not (false). -
getIncludeInNotification
Whether changes to this attribute's value generate an event (true) or not (false). -
getSkipScrubbing
TBC -
getSearchWeight
TBC -
getIndexType
TBC -
getOptions
Options for the attribute. -
getIsNew
Whether the attribute is being newly created (true) or not (false). -
getEnumValues
List of values for an enumeration. -
getConstraints
TBC -
getIndexTypeESConfig
TBC -
getIndexTypeESFields
TBC -
getAutoUpdateAttributes
TBC -
equals
- Overrides:
equals
in classAtlanObject
-
canEqual
- Overrides:
canEqual
in classAtlanObject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAtlanObject
-
toString
Description copied from class:AtlanObject
- Overrides:
toString
in classAtlanObject
-