Class SuggestOptions

java.lang.Object
com.azure.analytics.purview.datamap.models.SuggestOptions
All Implemented Interfaces:
com.azure.json.JsonSerializable<SuggestOptions>

public final class SuggestOptions extends Object implements com.azure.json.JsonSerializable<SuggestOptions>
The payload of suggest request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of SuggestOptions class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of SuggestOptions from the JsonReader.
    com.azure.core.util.BinaryData
    Get the filter property: The filter for the search.
    Get the keywords property: The keywords applied to all fields that support suggest operation.
    Get the limit property: The number of suggestions we hope to return.
    setFilter(com.azure.core.util.BinaryData filter)
    Set the filter property: The filter for the search.
    setKeywords(String keywords)
    Set the keywords property: The keywords applied to all fields that support suggest operation.
    Set the limit property: The number of suggestions we hope to return.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • SuggestOptions

      public SuggestOptions()
      Creates an instance of SuggestOptions class.
  • Method Details

    • getKeywords

      public String getKeywords()
      Get the keywords property: The keywords applied to all fields that support suggest operation. It must be at least 1 character, and no more than 100 characters. In the index schema we defined a default suggester which lists all the supported fields and specifies a search mode.
      Returns:
      the keywords value.
    • setKeywords

      public SuggestOptions setKeywords(String keywords)
      Set the keywords property: The keywords applied to all fields that support suggest operation. It must be at least 1 character, and no more than 100 characters. In the index schema we defined a default suggester which lists all the supported fields and specifies a search mode.
      Parameters:
      keywords - the keywords value to set.
      Returns:
      the SuggestOptions object itself.
    • getLimit

      public Integer getLimit()
      Get the limit property: The number of suggestions we hope to return. The default value is 5. The value must be a number between 1 and 100.
      Returns:
      the limit value.
    • setLimit

      public SuggestOptions setLimit(Integer limit)
      Set the limit property: The number of suggestions we hope to return. The default value is 5. The value must be a number between 1 and 100.
      Parameters:
      limit - the limit value to set.
      Returns:
      the SuggestOptions object itself.
    • getFilter

      public com.azure.core.util.BinaryData getFilter()
      Get the filter property: The filter for the search.
      Returns:
      the filter value.
    • setFilter

      public SuggestOptions setFilter(com.azure.core.util.BinaryData filter)
      Set the filter property: The filter for the search.
      Parameters:
      filter - the filter value to set.
      Returns:
      the SuggestOptions object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SuggestOptions>
      Throws:
      IOException
    • fromJson

      public static SuggestOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SuggestOptions from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SuggestOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the SuggestOptions.