Freigeben über


AutocompleteItem Class

  • java.lang.Object
    • com.azure.search.documents.models.AutocompleteItem

Implements

public final class AutocompleteItem
implements JsonSerializable<AutocompleteItem>

The result of Autocomplete requests.

Constructor Summary

Constructor Description
AutocompleteItem(String text, String queryPlusText)

Creates an instance of AutocompleteItem class.

Method Summary

Modifier and Type Method and Description
static AutocompleteItem fromJson(JsonReader jsonReader)

Reads an instance of AutocompleteItem from the JsonReader.

String getQueryPlusText()

Get the queryPlusText property: The query along with the completed term.

String getText()

Get the text property: The completed term.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

AutocompleteItem

public AutocompleteItem(String text, String queryPlusText)

Creates an instance of AutocompleteItem class.

Parameters:

text - the text value to set.
queryPlusText - the queryPlusText value to set.

Method Details

fromJson

public static AutocompleteItem fromJson(JsonReader jsonReader)

Reads an instance of AutocompleteItem from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AutocompleteItem if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getQueryPlusText

public String getQueryPlusText()

Get the queryPlusText property: The query along with the completed term.

Returns:

the queryPlusText value.

getText

public String getText()

Get the text property: The completed term.

Returns:

the text value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to