Class Suggestion<T>
java.lang.Object
co.elastic.clients.elasticsearch.core.search.Suggestion<T>
- All Implemented Interfaces:
JsonpSerializable
public class Suggestion<T> extends java.lang.Object implements JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSuggestion.Builder<T>Builder forSuggestion. -
Method Summary
Modifier and Type Method Description static <T> JsonpDeserializer<Suggestion<T>>createSuggestionDeserializer(JsonpDeserializer<T> tDeserializer)Create a JSON deserializer for Suggestionintlength()Required - API name:lengthstatic <T> Suggestion<T>of(java.util.function.Function<Suggestion.Builder<T>,ObjectBuilder<Suggestion<T>>> fn)intoffset()Required - API name:offsetjava.util.List<SuggestOption<T>>options()Required - API name:optionsvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static <T> voidsetupSuggestionDeserializer(ObjectDeserializer<Suggestion.Builder<T>> op, JsonpDeserializer<T> tDeserializer)java.lang.Stringtext()Required - API name:textMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
of
public static <T> Suggestion<T> of(java.util.function.Function<Suggestion.Builder<T>,ObjectBuilder<Suggestion<T>>> fn) -
length
public final int length()Required - API name:length -
offset
public final int offset()Required - API name:offset -
options
Required - API name:options -
text
public final java.lang.String text()Required - API name:text -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
createSuggestionDeserializer
public static <T> JsonpDeserializer<Suggestion<T>> createSuggestionDeserializer(JsonpDeserializer<T> tDeserializer)Create a JSON deserializer for Suggestion -
setupSuggestionDeserializer
protected static <T> void setupSuggestionDeserializer(ObjectDeserializer<Suggestion.Builder<T>> op, JsonpDeserializer<T> tDeserializer)
-