Class AutocompleteResult

java.lang.Object
com.azure.search.documents.models.AutocompleteResult
All Implemented Interfaces:
com.azure.json.JsonSerializable<AutocompleteResult>

public final class AutocompleteResult extends Object implements com.azure.json.JsonSerializable<AutocompleteResult>
The result of Autocomplete query.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of AutocompleteResult from the JsonReader.
    Get the coverage property: A value indicating the percentage of the index that was considered by the autocomplete request, or null if minimumCoverage was not specified in the request.
    Get the results property: The list of returned Autocompleted items.
    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

    • AutocompleteResult

      public AutocompleteResult(List<AutocompleteItem> results)
      Creates an instance of AutocompleteResult class.
      Parameters:
      results - the results value to set.
  • Method Details

    • getCoverage

      public Double getCoverage()
      Get the coverage property: A value indicating the percentage of the index that was considered by the autocomplete request, or null if minimumCoverage was not specified in the request.
      Returns:
      the coverage value.
    • getResults

      public List<AutocompleteItem> getResults()
      Get the results property: The list of returned Autocompleted items.
      Returns:
      the results value.
    • toJson

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

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