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
  • 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

      public final java.util.List<SuggestOption<T>> options()
      Required - API name: options
    • text

      public final java.lang.String text()
      Required - API name: text
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • 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)