Class Suggestions.SuggestionsBuilder

java.lang.Object
com.atlan.model.search.Suggestions.SuggestionsBuilder
Enclosing class:
Suggestions

public static class Suggestions.SuggestionsBuilder extends Object
  • Method Details

    • get

      public SuggestionResponse get() throws AtlanException
      Find the requested suggestions and return the results (but do not make any changes to the asset itself).
      Throws:
      AtlanException - on any issue interacting with the APIs
    • apply

      public AssetMutationResponse apply() throws AtlanException
      Find the requested suggestions and apply the top suggestions as changes to the asset. Note: this will NOT validate whether there is any existing value for what you are setting, so will clobber any existing value with the suggestion. If you want to be certain you are only updating empty values, you should ensure you are only building a finder for suggestions for values that do not already exist on the asset in question.
      Throws:
      AtlanException - on any issue interacting with the APIs
    • apply

      public AssetMutationResponse apply(boolean allowMultiple) throws AtlanException
      Find the requested suggestions and apply the top suggestions as changes to the asset. Note: this will NOT validate whether there is any existing value for what you are setting, so will clobber any existing value with the suggestion. If you want to be certain you are only updating empty values, you should ensure you are only building a finder for suggestions for values that do not already exist on the asset in question.
      Parameters:
      allowMultiple - if true, allow multiple suggestions to be applied to the asset (up to maxSuggestions requested), i.e. for owners, terms and tags
      Throws:
      AtlanException - on any issue interacting with the APIs
    • apply

      public AssetMutationResponse apply(ParallelBatch batch) throws AtlanException
      Find the requested suggestions and apply the top suggestions as changes to the asset within the provided batch. Note: this will NOT validate whether there is any existing value for what you are setting, so will clobber any existing value with the suggestion. Also, to ensure tags are applied you MUST set your provided batch up to replace tags BEFORE using it here. If you want to be certain you are only updating empty values, you should ensure you are only building a finder for suggestions for values that do not already exist on the asset in question.
      Throws:
      AtlanException - on any issue interacting with the APIs
    • apply

      public AssetMutationResponse apply(ParallelBatch batch, boolean allowMultiple) throws AtlanException
      Find the requested suggestions and apply the top suggestions as changes to the asset within the provided batch. Note: this will NOT validate whether there is any existing value for what you are setting, so will clobber any existing value with the suggestion. If you want to be certain you are only updating empty values, you should ensure you are only building a finder for suggestions for values that do not already exist on the asset in question.
      Parameters:
      allowMultiple - if true, allow multiple suggestions to be applied to the asset (up to maxSuggestions requested), i.e. for owners, terms and tags
      Throws:
      AtlanException - on any issue interacting with the APIs
    • client

      Client through which to find suggestions.
      Returns:
      this.
    • asset

      public Suggestions.SuggestionsBuilder asset(Asset asset)
      Asset for which to find suggestions.
      Returns:
      this.
    • includeArchived

      public Suggestions.SuggestionsBuilder includeArchived(Boolean includeArchived)
      Whether to include archived assets as part of suggestions (true) or not (false, default).
      Returns:
      this.
    • include

    • includes

      public Suggestions.SuggestionsBuilder includes(Collection<? extends Suggestions.TYPE> includes)
    • clearIncludes

      public Suggestions.SuggestionsBuilder clearIncludes()
    • maxSuggestions

      public Suggestions.SuggestionsBuilder maxSuggestions(Integer maxSuggestions)
      Maximum number of suggestions to return (default: 5).
      Returns:
      this.
    • withOtherType

      public Suggestions.SuggestionsBuilder withOtherType(String withOtherType)
    • withOtherTypes

      public Suggestions.SuggestionsBuilder withOtherTypes(Collection<? extends String> withOtherTypes)
    • clearWithOtherTypes

      public Suggestions.SuggestionsBuilder clearWithOtherTypes()
    • where

      public Suggestions.SuggestionsBuilder where(co.elastic.clients.elasticsearch._types.query_dsl.Query where)
    • wheres

      public Suggestions.SuggestionsBuilder wheres(Collection<? extends co.elastic.clients.elasticsearch._types.query_dsl.Query> wheres)
    • clearWheres

      public Suggestions.SuggestionsBuilder clearWheres()
    • whereNot

      public Suggestions.SuggestionsBuilder whereNot(co.elastic.clients.elasticsearch._types.query_dsl.Query whereNot)
    • whereNots

      public Suggestions.SuggestionsBuilder whereNots(Collection<? extends co.elastic.clients.elasticsearch._types.query_dsl.Query> whereNots)
    • clearWhereNots

      public Suggestions.SuggestionsBuilder clearWhereNots()
    • build

      public Suggestions build()
    • toString

      public String toString()
      Overrides:
      toString in class Object