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
ConstructorsConstructorDescriptionAutocompleteResult(List<AutocompleteItem> results) Creates an instance of AutocompleteResult class. -
Method Summary
Modifier and TypeMethodDescriptionstatic AutocompleteResultfromJson(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.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
AutocompleteResult
Creates an instance of AutocompleteResult class.- Parameters:
results- the results value to set.
-
-
Method Details
-
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
Get the results property: The list of returned Autocompleted items.- Returns:
- the results value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AutocompleteResult>- Throws:
IOException
-
fromJson
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.
-