Class Suggestion.Builder<T>
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.core.search.Suggestion.Builder<T>
-
- All Implemented Interfaces:
ObjectBuilder<Suggestion<T>>
- Enclosing class:
- Suggestion<T>
public static class Suggestion.Builder<T> extends ObjectBuilderBase implements ObjectBuilder<Suggestion<T>>
Builder forSuggestion.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(java.util.function.Function<SuggestOption.Builder<T>,ObjectBuilder<SuggestOption<T>>> fn)Required - API name:optionsSuggestion.Builder<T>options(java.util.List<SuggestOption<T>> list)Required - API name:optionsSuggestion.Builder<T>options(SuggestOption<T> value, SuggestOption<T>... values)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 org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
length
public final Suggestion.Builder<T> length(int value)
Required - API name:length
-
offset
public final Suggestion.Builder<T> offset(int value)
Required - API name:offset
-
options
public final Suggestion.Builder<T> options(java.util.List<SuggestOption<T>> list)
Required - API name:optionsAdds all elements of
listtooptions.
-
options
public final Suggestion.Builder<T> options(SuggestOption<T> value, SuggestOption<T>... values)
Required - API name:optionsAdds one or more values to
options.
-
options
public final Suggestion.Builder<T> options(java.util.function.Function<SuggestOption.Builder<T>,ObjectBuilder<SuggestOption<T>>> fn)
Required - API name:optionsAdds a value to
optionsusing a builder lambda.
-
text
public final Suggestion.Builder<T> text(java.lang.String value)
Required - API name:text
-
tSerializer
public final Suggestion.Builder<T> tSerializer(@Nullable JsonpSerializer<T> value)
Serializer for T. If not set, an attempt will be made to find a serializer from the JSON context.
-
build
public Suggestion<T> build()
Builds aSuggestion.- Specified by:
buildin interfaceObjectBuilder<T>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-