Class Task

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

@Generated("com.atlan.generators.ModelGeneratorV2") public class Task extends Asset implements ITask, IAsset, IReferenceable
Instance of a Task for user in Atlan.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • trimToReference

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

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

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

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

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

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

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

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

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

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

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

      public static Task get(AtlanClient client, String id, boolean includeRelationships) throws AtlanException
      Retrieves a Task 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 Task 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 Task, optionally complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Task does not exist or the provided GUID is not a Task
    • restore

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

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

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

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

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

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

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

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

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

      public static Task updateCertificate(String qualifiedName, CertificateStatus certificate, String message) throws AtlanException
      Update the certificate on a Task.
      Parameters:
      qualifiedName - of the Task
      certificate - to use
      message - (optional) message, or null if no message
      Returns:
      the updated Task, or null if the update failed
      Throws:
      AtlanException - on any API problems
    • updateCertificate

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

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

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

      public static Task updateAnnouncement(String qualifiedName, AtlanAnnouncementType type, String title, String message) throws AtlanException
      Update the announcement on a Task.
      Parameters:
      qualifiedName - of the Task
      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
    • updateAnnouncement

      public static Task updateAnnouncement(AtlanClient client, String qualifiedName, AtlanAnnouncementType type, String title, String message) throws AtlanException
      Update the announcement on a Task.
      Parameters:
      client - connectivity to the Atlan tenant on which to update the Task's announcement
      qualifiedName - of the Task
      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 Task removeAnnouncement(String qualifiedName, String name) throws AtlanException
      Remove the announcement from a Task.
      Parameters:
      qualifiedName - of the Task
      name - of the Task
      Returns:
      the updated Task, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • removeAnnouncement

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

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

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

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

      public static Task appendTerms(AtlanClient client, String qualifiedName, List<IGlossaryTerm> terms) throws AtlanException
      Link additional terms to the Task, without replacing existing terms linked to the Task. Note: this operation must make two API calls — one to retrieve the Task'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 Task
      qualifiedName - for the Task
      terms - the list of terms to append to the Task
      Returns:
      the Task that was updated (note that it will NOT contain details of the appended terms)
      Throws:
      AtlanException - on any API problems
    • removeTerms

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

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

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

      public static Task appendAtlanTags(AtlanClient client, String qualifiedName, List<String> atlanTagNames) throws AtlanException
      Add Atlan tags to a Task, without replacing existing Atlan tags linked to the Task. Note: this operation must make two API calls — one to retrieve the Task'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 Task
      qualifiedName - of the Task
      atlanTagNames - human-readable names of the Atlan tags to add
      Returns:
      the updated Task
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      public static Task appendAtlanTags(String qualifiedName, List<String> atlanTagNames, boolean propagate, boolean removePropagationsOnDelete, boolean restrictLineagePropagation) throws AtlanException
      Add Atlan tags to a Task, without replacing existing Atlan tags linked to the Task. Note: this operation must make two API calls — one to retrieve the Task's existing Atlan tags, and a second to append the new Atlan tags.
      Parameters:
      qualifiedName - of the Task
      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 Task
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      public static Task appendAtlanTags(AtlanClient client, String qualifiedName, List<String> atlanTagNames, boolean propagate, boolean removePropagationsOnDelete, boolean restrictLineagePropagation) throws AtlanException
      Add Atlan tags to a Task, without replacing existing Atlan tags linked to the Task. Note: this operation must make two API calls — one to retrieve the Task'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 Task
      qualifiedName - of the Task
      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 Task
      Throws:
      AtlanException - on any API problems
    • removeAtlanTag

      public static void removeAtlanTag(String qualifiedName, String atlanTagName) throws AtlanException
      Remove an Atlan tag from a Task.
      Parameters:
      qualifiedName - of the Task
      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 Task
    • removeAtlanTag

      public static void removeAtlanTag(AtlanClient client, String qualifiedName, String atlanTagName) throws AtlanException
      Remove an Atlan tag from a Task.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove an Atlan tag from a Task
      qualifiedName - of the Task
      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 Task
    • _internal

      public static Task.TaskBuilder<?,?> _internal()
    • toBuilder

      public Task.TaskBuilder<?,?> toBuilder()
      Overrides:
      toBuilder in class Reference
    • getTaskActions

      public List<Action> getTaskActions()
      List of actions associated with this task.
      Specified by:
      getTaskActions in interface ITask
    • getTaskCreatedBy

      public String getTaskCreatedBy()
      username of the user who created this task
      Specified by:
      getTaskCreatedBy in interface ITask
    • getTaskExecutionAction

      public String getTaskExecutionAction()
      action executed by the recipient
      Specified by:
      getTaskExecutionAction in interface ITask
    • getTaskExecutionComment

      public String getTaskExecutionComment()
      comment for the action executed by user
      Specified by:
      getTaskExecutionComment in interface ITask
    • getTaskExpiresAt

      public Long getTaskExpiresAt()
      Time (epoch) at which the task expires .
      Specified by:
      getTaskExpiresAt in interface ITask
    • getTaskIntegrationConfig

      public String getTaskIntegrationConfig()
      contains external integration config for the task
      Specified by:
      getTaskIntegrationConfig in interface ITask
    • getTaskIsRead

      public Boolean getTaskIsRead()
      flag to make task read/unread
      Specified by:
      getTaskIsRead in interface ITask
    • getTaskProposals

      public String getTaskProposals()
      contains the payload that is proposed to the task
      Specified by:
      getTaskProposals in interface ITask
    • getTaskRecipient

      public String getTaskRecipient()
      recipient of the task
      Specified by:
      getTaskRecipient in interface ITask
    • getTaskRelatedAssetGuid

      public String getTaskRelatedAssetGuid()
      assetId to preview
      Specified by:
      getTaskRelatedAssetGuid in interface ITask
    • getTaskRequestor

      public String getTaskRequestor()
      requestor of the task
      Specified by:
      getTaskRequestor in interface ITask
    • getTaskRequestorComment

      public String getTaskRequestorComment()
      comment of requestor for the task
      Specified by:
      getTaskRequestorComment in interface ITask
    • getTaskType

      public String getTaskType()
      type of task
      Specified by:
      getTaskType in interface ITask
    • getTaskUpdatedBy

      public String getTaskUpdatedBy()
      username of the user who updated this task
      Specified by:
      getTaskUpdatedBy in interface ITask
    • 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 Tasks.
      Specified by:
      getTypeName in interface AuditDetail
      Specified by:
      getTypeName in interface IAsset
      Specified by:
      getTypeName in interface IReferenceable
      Specified by:
      getTypeName in interface ITask
      Overrides:
      getTypeName in class Reference