Class Notification

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

@Generated("com.atlan.generators.ModelGeneratorV2") public class Notification extends Asset implements INotification, IAsset, IReferenceable
Base class for a durable, queryable notification record. Never instantiated: only a subtype is ever created, the way nothing creates a bare Catalog.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • trimToReference

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

      public static FluentSearch.FluentSearchBuilder<?,?> select(AtlanClient client)
      Start a fluent search that will return all Notification 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) Notification assets will be included.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the assets
      Returns:
      a fluent search that includes all Notification assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(AtlanClient client, boolean includeArchived)
      Start a fluent search that will return all Notification 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) Notifications will be included
      Returns:
      a fluent search that includes all Notification assets
    • refByGuid

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

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

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

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

      public static Notification get(AtlanClient client, String id) throws AtlanException
      Retrieves a Notification 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 Notification to retrieve, either its GUID or its full qualifiedName
      Returns:
      the requested full Notification, complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Notification does not exist or the provided GUID is not a Notification
    • get

      public static Notification get(AtlanClient client, String id, boolean includeAllRelationships) throws AtlanException
      Retrieves a Notification 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 Notification to retrieve, either its GUID or its full qualifiedName
      includeAllRelationships - if true, all the asset's relationships will also be retrieved; if false, no relationships will be retrieved
      Returns:
      the requested full Notification, optionally complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Notification does not exist or the provided GUID is not a Notification
    • get

      public static Notification get(AtlanClient client, String id, Collection<AtlanField> attributes) throws AtlanException
      Retrieves a Notification by one of its identifiers, with only the requested attributes (and relationships).
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the asset
      id - of the Notification to retrieve, either its GUID or its full qualifiedName
      attributes - to retrieve for the Notification, including any relationships
      Returns:
      the requested Notification, with only its minimal information and the requested attributes (and relationships)
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Notification does not exist or the provided GUID is not a Notification
    • get

      public static Notification get(AtlanClient client, String id, Collection<AtlanField> attributes, Collection<AtlanField> attributesOnRelated) throws AtlanException
      Retrieves a Notification by one of its identifiers, with only the requested attributes (and relationships).
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the asset
      id - of the Notification to retrieve, either its GUID or its full qualifiedName
      attributes - to retrieve for the Notification, including any relationships
      attributesOnRelated - to retrieve on each relationship retrieved for the Notification
      Returns:
      the requested Notification, with only its minimal information and the requested attributes (and relationships)
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Notification does not exist or the provided GUID is not a Notification
    • restore

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

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

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

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

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

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

      public static Notification updateCertificate(AtlanClient client, String qualifiedName, CertificateStatus certificate, String message) throws AtlanException
      Update the certificate on a Notification.
      Parameters:
      client - connectivity to the Atlan tenant on which to update the Notification's certificate
      qualifiedName - of the Notification
      certificate - to use
      message - (optional) message, or null if no message
      Returns:
      the updated Notification, or null if the update failed
      Throws:
      AtlanException - on any API problems
    • removeCertificate

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

      public static Notification updateAnnouncement(AtlanClient client, String qualifiedName, AtlanAnnouncementType type, String title, String message) throws AtlanException
      Update the announcement on a Notification.
      Parameters:
      client - connectivity to the Atlan tenant on which to update the Notification's announcement
      qualifiedName - of the Notification
      type - type of announcement to set
      title - (optional) title of the announcement to set (or null for no title)
      message - (optional) message of the announcement to set (or null for no message)
      Returns:
      the result of the update, or null if the update failed
      Throws:
      AtlanException - on any API problems
    • removeAnnouncement

      public static Notification removeAnnouncement(AtlanClient client, String qualifiedName, String name) throws AtlanException
      Remove the announcement from a Notification.
      Parameters:
      client - connectivity to the Atlan client from which to remove the Notification's announcement
      qualifiedName - of the Notification
      name - of the Notification
      Returns:
      the updated Notification, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • replaceTerms

      public static Notification replaceTerms(AtlanClient client, String qualifiedName, String name, List<IGlossaryTerm> terms) throws AtlanException
      Replace the terms linked to the Notification.
      Parameters:
      client - connectivity to the Atlan tenant on which to replace the Notification's assigned terms
      qualifiedName - for the Notification
      name - human-readable name of the Notification
      terms - the list of terms to replace on the Notification, or null to remove all terms from the Notification
      Returns:
      the Notification that was updated (note that it will NOT contain details of the replaced terms)
      Throws:
      AtlanException - on any API problems
    • appendTerms

      @Deprecated public static Notification appendTerms(AtlanClient client, String qualifiedName, List<IGlossaryTerm> terms) throws AtlanException
      Link additional terms to the Notification, without replacing existing terms linked to the Notification. Note: this operation must make two API calls — one to retrieve the Notification's existing terms, and a second to append the new terms.
      Parameters:
      client - connectivity to the Atlan tenant on which to append terms to the Notification
      qualifiedName - for the Notification
      terms - the list of terms to append to the Notification
      Returns:
      the Notification that was updated (note that it will NOT contain details of the appended terms)
      Throws:
      AtlanException - on any API problems
    • removeTerms

      @Deprecated public static Notification removeTerms(AtlanClient client, String qualifiedName, List<IGlossaryTerm> terms) throws AtlanException
      Remove terms from a Notification, without replacing all existing terms linked to the Notification. Note: this operation must make two API calls — one to retrieve the Notification's existing terms, and a second to remove the provided terms.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove terms from the Notification
      qualifiedName - for the Notification
      terms - the list of terms to remove from the Notification, which must be referenced by GUID
      Returns:
      the Notification that was updated (note that it will NOT contain details of the resulting terms)
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      @Deprecated public static Notification appendAtlanTags(AtlanClient client, String qualifiedName, List<String> atlanTagNames) throws AtlanException
      Add Atlan tags to a Notification, without replacing existing Atlan tags linked to the Notification. Note: this operation must make two API calls — one to retrieve the Notification's existing Atlan tags, and a second to append the new Atlan tags.
      Parameters:
      client - connectivity to the Atlan tenant on which to append Atlan tags to the Notification
      qualifiedName - of the Notification
      atlanTagNames - human-readable names of the Atlan tags to add
      Returns:
      the updated Notification
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      @Deprecated public static Notification appendAtlanTags(AtlanClient client, String qualifiedName, List<String> atlanTagNames, boolean propagate, boolean removePropagationsOnDelete, boolean restrictLineagePropagation) throws AtlanException
      Add Atlan tags to a Notification, without replacing existing Atlan tags linked to the Notification. Note: this operation must make two API calls — one to retrieve the Notification's existing Atlan tags, and a second to append the new Atlan tags.
      Parameters:
      client - connectivity to the Atlan tenant on which to append Atlan tags to the Notification
      qualifiedName - of the Notification
      atlanTagNames - human-readable names of the Atlan tags to add
      propagate - whether to propagate the Atlan tag (true) or not (false)
      removePropagationsOnDelete - whether to remove the propagated Atlan tags when the Atlan tag is removed from this asset (true) or not (false)
      restrictLineagePropagation - whether to avoid propagating through lineage (true) or do propagate through lineage (false)
      Returns:
      the updated Notification
      Throws:
      AtlanException - on any API problems
    • removeAtlanTag

      @Deprecated public static void removeAtlanTag(AtlanClient client, String qualifiedName, String atlanTagName) throws AtlanException
      Remove an Atlan tag from a Notification.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove an Atlan tag from a Notification
      qualifiedName - of the Notification
      atlanTagName - human-readable name of the Atlan tag to remove
      Throws:
      AtlanException - on any API problems, or if the Atlan tag does not exist on the Notification
    • _internal

      public static Notification.NotificationBuilder<?,?> _internal()
    • toBuilder

      public Notification.NotificationBuilder<?,?> toBuilder()
      Overrides:
      toBuilder in class Reference
    • getNotificationExternalReferences

      public List<NotificationExternalReference> getNotificationExternalReferences()
      Where this notification also lives outside Atlan, one entry per surface. This is what lets an action taken in the inbox go back and update the message it came from.
      Specified by:
      getNotificationExternalReferences in interface INotification
    • getNotificationLastActedAt

      public Long getNotificationLastActedAt()
      When a person last moved the state. Read against the creation timestamp this gives time to resolution.
      Specified by:
      getNotificationLastActedAt in interface INotification
    • getNotificationLastActedBy

      public String getNotificationLastActedBy()
      Username of the person who last moved the state. Declared separately because the write is service-mediated, so the entity's own modifier records the service and not the person.
      Specified by:
      getNotificationLastActedBy in interface INotification
    • getNotificationLastActedReason

      public String getNotificationLastActedReason()
      Reason or note the person gave for the last action. Mandatory for some actions and optional for others, so it is free text rather than a code.
      Specified by:
      getNotificationLastActedReason in interface INotification
    • getNotificationRecipientGroups

      public SortedSet<String> getNotificationRecipientGroups()
      Identifiers of the Atlan groups the notification is meant for. A group outlives its members, so a rule addressing a group stays generic as people join and leave.
      Specified by:
      getNotificationRecipientGroups in interface INotification
    • getNotificationRecipientRoles

      public SortedSet<String> getNotificationRecipientRoles()
      Identifiers of the Atlan roles that need to see the notification. Resolved to individuals by the interface at read time rather than stored.
      Specified by:
      getNotificationRecipientRoles in interface INotification
    • getNotificationRecipientUsers

      public SortedSet<String> getNotificationRecipientUsers()
      Usernames the notification was addressed to. Drives the assigned-to-me view together with the group and role recipients.
      Specified by:
      getNotificationRecipientUsers in interface INotification
    • getNotificationState

      public NotificationState getNotificationState()
      Where the notification is in its lifecycle. Also how a check decides whether a live notification already exists before raising another.
      Specified by:
      getNotificationState in interface INotification
    • 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 Notifications.
      Specified by:
      getTypeName in interface AuditDetail
      Specified by:
      getTypeName in interface IAsset
      Specified by:
      getTypeName in interface INotification
      Specified by:
      getTypeName in interface IReferenceable
      Overrides:
      getTypeName in class Reference