Class Suggestion.Builder<T>
java.lang.Object
co.elastic.clients.elasticsearch.core.search.Suggestion.Builder<T>
- All Implemented Interfaces:
ObjectBuilder<Suggestion<T>>
- Enclosing class:
- Suggestion<T>
public static class Suggestion.Builder<T> extends java.lang.Object implements ObjectBuilder<Suggestion<T>>
Builder for
Suggestion.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description Suggestion.Builder<T>addOptions(jakarta.json.JsonValue value)Add a value tooptions(List), creating the list if needed.Suggestion<T>build()Builds aSuggestion.Suggestion.Builder<T>length(int value)Required - API name:lengthSuggestion.Builder<T>offset(int value)Required - API name:offsetSuggestion.Builder<T>options(jakarta.json.JsonValue... value)Required - API name:optionsSuggestion.Builder<T>options(java.util.List<jakarta.json.JsonValue> value)Required - API name:optionsSuggestion.Builder<T>text(java.lang.String value)Required - API name:textSuggestion.Builder<T>tSerializer(JsonpSerializer<T> value)Serializer for T.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
length
Required - API name:length -
offset
Required - API name:offset -
options
Required - API name:options -
options
Required - API name:options -
addOptions
Add a value tooptions(List), creating the list if needed. -
text
Required - API name:text -
tSerializer
Serializer for T. If not set, an attempt will be made to find a serializer from the JSON context. -
build
Builds aSuggestion.- Specified by:
buildin interfaceObjectBuilder<T>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-