Class Badge

All Implemented Interfaces:
IAsset, IBadge, IReferenceable, AuditDetail, Serializable, Comparable<Reference>

@Generated("com.atlan.generators.ModelGeneratorV2") public class Badge extends Asset implements IBadge, IAsset, IReferenceable
Instance of a badge in Atlan. Badges visually highlight key information about an asset, surfaced from custom metadata.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • trimToReference

      public Badge trimToReference() throws InvalidRequestException
      Builds the minimal object necessary to create a relationship to a Badge, from a potentially more-complete Badge object.
      Overrides:
      trimToReference in class Asset
      Returns:
      the minimal object necessary to relate to the Badge
      Throws:
      InvalidRequestException - if any of the minimal set of required properties for a Badge relationship are not found in the initial object
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select()
      Start a fluent search that will return all Badge assets. Additional conditions can be chained onto the returned search before any asset retrieval is attempted, ensuring all conditions are pushed-down for optimal retrieval. Only active (non-archived) Badge assets will be included.
      Returns:
      a fluent search that includes all Badge assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(AtlanClient client)
      Start a fluent search that will return all Badge assets. Additional conditions can be chained onto the returned search before any asset retrieval is attempted, ensuring all conditions are pushed-down for optimal retrieval. Only active (non-archived) Badge assets will be included.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the assets
      Returns:
      a fluent search that includes all Badge assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(boolean includeArchived)
      Start a fluent search that will return all Badge assets. Additional conditions can be chained onto the returned search before any asset retrieval is attempted, ensuring all conditions are pushed-down for optimal retrieval.
      Parameters:
      includeArchived - when true, archived (soft-deleted) Badges will be included
      Returns:
      a fluent search that includes all Badge assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(AtlanClient client, boolean includeArchived)
      Start a fluent search that will return all Badge assets. Additional conditions can be chained onto the returned search before any asset retrieval is attempted, ensuring all conditions are pushed-down for optimal retrieval.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the assets
      includeArchived - when true, archived (soft-deleted) Badges will be included
      Returns:
      a fluent search that includes all Badge assets
    • refByGuid

      public static Badge refByGuid(String guid)
      Reference to a Badge by GUID. Use this to create a relationship to this Badge, where the relationship should be replaced.
      Parameters:
      guid - the GUID of the Badge to reference
      Returns:
      reference to a Badge that can be used for defining a relationship to a Badge
    • refByGuid

      public static Badge refByGuid(String guid, Reference.SaveSemantic semantic)
      Reference to a Badge by GUID. Use this to create a relationship to this Badge, where you want to further control how that relationship should be updated (i.e. replaced, appended, or removed).
      Parameters:
      guid - the GUID of the Badge to reference
      semantic - how to save this relationship (replace all with this, append it, or remove it)
      Returns:
      reference to a Badge that can be used for defining a relationship to a Badge
    • refByQualifiedName

      public static Badge refByQualifiedName(String qualifiedName)
      Reference to a Badge by qualifiedName. Use this to create a relationship to this Badge, where the relationship should be replaced.
      Parameters:
      qualifiedName - the qualifiedName of the Badge to reference
      Returns:
      reference to a Badge that can be used for defining a relationship to a Badge
    • refByQualifiedName

      public static Badge refByQualifiedName(String qualifiedName, Reference.SaveSemantic semantic)
      Reference to a Badge by qualifiedName. Use this to create a relationship to this Badge, where you want to further control how that relationship should be updated (i.e. replaced, appended, or removed).
      Parameters:
      qualifiedName - the qualifiedName of the Badge to reference
      semantic - how to save this relationship (replace all with this, append it, or remove it)
      Returns:
      reference to a Badge that can be used for defining a relationship to a Badge
    • get

      public static Badge get(String id) throws AtlanException
      Retrieves a Badge by one of its identifiers, complete with all of its relationships.
      Parameters:
      id - of the Badge to retrieve, either its GUID or its full qualifiedName
      Returns:
      the requested full Badge, complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Badge does not exist or the provided GUID is not a Badge
    • get

      public static Badge get(AtlanClient client, String id) throws AtlanException
      Retrieves a Badge by one of its identifiers, complete with all of its relationships.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the asset
      id - of the Badge to retrieve, either its GUID or its full qualifiedName
      Returns:
      the requested full Badge, complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Badge does not exist or the provided GUID is not a Badge
    • get

      public static Badge get(AtlanClient client, String id, boolean includeRelationships) throws AtlanException
      Retrieves a Badge by one of its identifiers, optionally complete with all of its relationships.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the asset
      id - of the Badge to retrieve, either its GUID or its full qualifiedName
      includeRelationships - if true, all of the asset's relationships will also be retrieved; if false, no relationships will be retrieved
      Returns:
      the requested full Badge, optionally complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Badge does not exist or the provided GUID is not a Badge
    • restore

      public static boolean restore(String qualifiedName) throws AtlanException
      Restore the archived (soft-deleted) Badge to active.
      Parameters:
      qualifiedName - for the Badge
      Returns:
      true if the Badge is now active, and false otherwise
      Throws:
      AtlanException - on any API problems
    • restore

      public static boolean restore(AtlanClient client, String qualifiedName) throws AtlanException
      Restore the archived (soft-deleted) Badge to active.
      Parameters:
      client - connectivity to the Atlan tenant on which to restore the asset
      qualifiedName - for the Badge
      Returns:
      true if the Badge is now active, and false otherwise
      Throws:
      AtlanException - on any API problems
    • creator

      public static Badge.BadgeBuilder<?,?> creator(String name, String cmName, String cmAttribute) throws AtlanException
      Builds the minimal object necessary to create a Badge.
      Parameters:
      name - of the Badge
      cmName - human-readable name of the custom metadata for which to create the badge
      cmAttribute - human-readable name of the custom metadata attribute for which to create the badge
      Returns:
      the minimal request necessary to create the Badge, as a builder
      Throws:
      AtlanException - if the specified custom metadata for the badge cannot be found
    • creator

      public static Badge.BadgeBuilder<?,?> creator(AtlanClient client, String name, String cmName, String cmAttribute) throws AtlanException
      Builds the minimal object necessary to create a Badge.
      Parameters:
      client - connectivity to the Atlan tenant on which the Badge is intended to be created
      name - of the Badge
      cmName - human-readable name of the custom metadata for which to create the badge
      cmAttribute - human-readable name of the custom metadata attribute for which to create the badge
      Returns:
      the minimal request necessary to create the Badge, as a builder
      Throws:
      AtlanException - if the specified custom metadata for the badge cannot be found
    • generateQualifiedName

      public static String generateQualifiedName(String cmName, String cmAttribute) throws AtlanException
      Generate a unique name for this badge.
      Parameters:
      cmName - human-readable name of the custom metadata for which to create the badge
      cmAttribute - human-readable name of the custom metadata attribute for which to create the badge
      Returns:
      the unique qualifiedName of the badge
      Throws:
      AtlanException - if the specified custom metadata cannot be found
    • generateQualifiedName

      public static String generateQualifiedName(AtlanClient client, String cmName, String cmAttribute) throws AtlanException
      Generate a unique name for this badge.
      Parameters:
      client - connectivity to the Atlan tenant through which to generate the unique name of the badge
      cmName - human-readable name of the custom metadata for which to create the badge
      cmAttribute - human-readable name of the custom metadata attribute for which to create the badge
      Returns:
      the unique qualifiedName of the badge
      Throws:
      AtlanException - if the specified custom metadata cannot be found
    • updater

      public static Badge.BadgeBuilder<?,?> updater(String qualifiedName, String name)
      Builds the minimal object necessary to update a Badge.
      Parameters:
      qualifiedName - of the Badge
      name - of the Badge
      Returns:
      the minimal request necessary to update the Badge, as a builder
    • trimToRequired

      public Badge.BadgeBuilder<?,?> trimToRequired() throws InvalidRequestException
      Builds the minimal object necessary to apply an update to a Badge, from a potentially more-complete Badge object.
      Overrides:
      trimToRequired in class Asset
      Returns:
      the minimal object necessary to update the Badge, as a builder
      Throws:
      InvalidRequestException - if any of the minimal set of required properties for Badge are not found in the initial object
    • removeDescription

      public static Badge removeDescription(String qualifiedName, String name) throws AtlanException
      Remove the system description from a Badge.
      Parameters:
      qualifiedName - of the Badge
      name - of the Badge
      Returns:
      the updated Badge, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • removeDescription

      public static Badge removeDescription(AtlanClient client, String qualifiedName, String name) throws AtlanException
      Remove the system description from a Badge.
      Parameters:
      client - connectivity to the Atlan tenant on which to remove the asset's description
      qualifiedName - of the Badge
      name - of the Badge
      Returns:
      the updated Badge, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • removeUserDescription

      public static Badge removeUserDescription(String qualifiedName, String name) throws AtlanException
      Remove the user's description from a Badge.
      Parameters:
      qualifiedName - of the Badge
      name - of the Badge
      Returns:
      the updated Badge, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • removeUserDescription

      public static Badge removeUserDescription(AtlanClient client, String qualifiedName, String name) throws AtlanException
      Remove the user's description from a Badge.
      Parameters:
      client - connectivity to the Atlan tenant on which to remove the asset's description
      qualifiedName - of the Badge
      name - of the Badge
      Returns:
      the updated Badge, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • _internal

      public static Badge.BadgeBuilder<?,?> _internal()
    • toBuilder

      public Badge.BadgeBuilder<?,?> toBuilder()
      Overrides:
      toBuilder in class Reference
    • getBadgeConditions

      public List<BadgeCondition> getBadgeConditions()
      List of conditions that determine the colors to diplay for various values.
      Specified by:
      getBadgeConditions in interface IBadge
    • getBadgeMetadataAttribute

      public String getBadgeMetadataAttribute()
      Custom metadata attribute for which to show the badge.
      Specified by:
      getBadgeMetadataAttribute in interface IBadge
    • equals

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

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

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

      public String toString()
      Description copied from class: AtlanObject
      Overrides:
      toString in class Asset
    • getTypeName

      public String getTypeName()
      Fixed typeName for Badges.
      Specified by:
      getTypeName in interface AuditDetail
      Specified by:
      getTypeName in interface IAsset
      Specified by:
      getTypeName in interface IBadge
      Specified by:
      getTypeName in interface IReferenceable
      Overrides:
      getTypeName in class Reference