Class EnumDef

All Implemented Interfaces:
Serializable

public class EnumDef extends TypeDef
Structural definition of an enumeration. Note that unlike other type definitions, enumerations do NOT use hashed internal string IDs. Their name is precisely the same as the name viewable in the UI.
See Also:
  • Constructor Details

  • Method Details

    • getValidValues

      public List<String> getValidValues()
      Translate the element definitions in this enumeration into a simple list of strings.
      Returns:
      list of valid values for the enumeration
    • creator

      public static EnumDef.EnumDefBuilder<?,?> creator(String displayName, List<String> values)
      Builds the minimal object necessary to create an enumeration definition.
      Parameters:
      displayName - the human-readable name for the enumeration
      values - the list of valid values (as strings) for the enumeration
      Returns:
      the minimal request necessary to create the enumeration typedef, as a builder
    • updater

      public static EnumDef.EnumDefBuilder<?,?> updater(String displayName, List<String> values, boolean replaceExisting) throws AtlanException
      Builds the minimal object necessary to update an enumeration definition.
      Parameters:
      displayName - the human-readable name for the enumeration
      values - the list of additional valid values (as strings) to add to the existing enumeration
      replaceExisting - if true, will replace all existing values in the enumeration with the new ones; or if false the new ones will be appended to the existing set
      Returns:
      the minimal request necessary to update the enumeration typedef, as a builder
      Throws:
      AtlanException - on any API issues related to retrieving the existing enumeration
    • updater

      public static EnumDef.EnumDefBuilder<?,?> updater(AtlanClient client, String displayName, List<String> values, boolean replaceExisting) throws AtlanException
      Builds the minimal object necessary to update an enumeration definition.
      Parameters:
      client - connectivity to the Atlan tenant on which to update the enumeration
      displayName - the human-readable name for the enumeration
      values - the list of additional valid values (as strings) to add to the existing enumeration
      replaceExisting - if true, will replace all existing values in the enumeration with the new ones; or if false the new ones will be appended to the existing set
      Returns:
      the minimal request necessary to update the enumeration typedef, as a builder
      Throws:
      AtlanException - on any API issues related to retrieving the existing enumeration
    • create

      public EnumDef create() throws AtlanException
      Create this enumeration definition in Atlan.
      Returns:
      the result of the creation, or null if the creation failed
      Throws:
      AtlanException - on any API communication issues
    • create

      public EnumDef create(AtlanClient client) throws AtlanException
      Create this enumeration definition in Atlan.
      Parameters:
      client - connectivity to the Atlan tenant on which to create the enumeration
      Returns:
      the result of the creation, or null if the creation failed
      Throws:
      AtlanException - on any API communication issues
    • update

      public EnumDef update() throws AtlanException
      Update this enumeration definition in Atlan.
      Returns:
      the result of the update, or null if the update failed
      Throws:
      AtlanException - on any API communication issues
    • update

      public EnumDef update(AtlanClient client) throws AtlanException
      Update this enumeration definition in Atlan.
      Parameters:
      client - connectivity to the Atlan tenant on which to update the enumeration
      Returns:
      the result of the update, or null if the update failed
      Throws:
      AtlanException - on any API communication issues
    • purge

      public static void purge(String displayName) throws AtlanException
      Hard-deletes (purges) an enumeration by its human-readable name. This operation is irreversible. If there are any existing enumeration instances, this operation will fail.
      Parameters:
      displayName - human-readable name of the enumeration
      Throws:
      AtlanException - on any error during the API invocation
    • purge

      public static void purge(AtlanClient client, String displayName) throws AtlanException
      Hard-deletes (purges) an enumeration by its human-readable name. This operation is irreversible. If there are any existing enumeration instances, this operation will fail.
      Parameters:
      client - connectivity to the Atlan tenant from which to purge the enumeration
      displayName - human-readable name of the enumeration
      Throws:
      AtlanException - on any error during the API invocation
    • builder

      public static EnumDef.EnumDefBuilder<?,?> builder()
    • toBuilder

      public EnumDef.EnumDefBuilder<?,?> toBuilder()
    • getElementDefs

      public List<EnumDef.ElementDef> getElementDefs()
      Individual valid values for the enumeration.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class TypeDef
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class TypeDef
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class TypeDef
    • toString

      public String toString()
      Description copied from class: AtlanObject
      Overrides:
      toString in class TypeDef
    • getCategory

      public AtlanTypeCategory getCategory()
      Fixed category for enum typedefs.
      Overrides:
      getCategory in class TypeDef