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 class
Suggestion.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 Suggestionint
length()
Required - API name:length
static <T> Suggestion<T>
of(java.util.function.Function<Suggestion.Builder<T>,ObjectBuilder<Suggestion<T>>> fn)
int
offset()
Required - API name:offset
java.util.List<SuggestOption<T>>
options()
Required - API name:options
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this object to JSON.protected void
serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static <T> void
setupSuggestionDeserializer(ObjectDeserializer<Suggestion.Builder<T>> op, JsonpDeserializer<T> tDeserializer)
java.lang.String
text()
Required - API name:text
Methods 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:
serialize
in 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)
-