Class Suggest<TDocument>
java.lang.Object
org.opensearch.client.opensearch.core.search.Suggest<TDocument>
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,TaggedUnion<Suggest.Kind,SuggestVariant>
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class Suggest<TDocument>
extends Object
implements TaggedUnion<Suggest.Kind,SuggestVariant>, PlainJsonSerializable
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal SuggestVariant_get()final Suggest.Kind_kind()Get the of the kind of variant held by this object.static <TDocument>
Suggest.Builderbuilder()Get thecompletionvariant value.static <TDocument>
ExternallyTaggedUnion.TypedKeysDeserializer<Suggest<TDocument>> createSuggestDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer) booleaninthashCode()booleanIs this variant instance of kindcompletion?booleanisPhrase()Is this variant instance of kindphrase?booleanisTerm()Is this variant instance of kindterm?static <TDocument>
Suggest<TDocument> of(Function<Suggest.Builder<TDocument>, ObjectBuilder<Suggest<TDocument>>> fn) phrase()Get thephrasevariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) term()Get thetermvariant value.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonString
-
Constructor Details
-
Suggest
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<Suggest.Kind,SuggestVariant> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<Suggest.Kind,SuggestVariant>
-
of
public static <TDocument> Suggest<TDocument> of(Function<Suggest.Builder<TDocument>, ObjectBuilder<Suggest<TDocument>>> fn) -
isCompletion
public boolean isCompletion()Is this variant instance of kindcompletion? -
completion
Get thecompletionvariant value.- Throws:
IllegalStateException- if the current variant is not thecompletionkind.
-
isPhrase
public boolean isPhrase()Is this variant instance of kindphrase? -
phrase
Get thephrasevariant value.- Throws:
IllegalStateException- if the current variant is not thephrasekind.
-
isTerm
public boolean isTerm()Is this variant instance of kindterm? -
term
Get thetermvariant value.- Throws:
IllegalStateException- if the current variant is not thetermkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toBuilder
-
builder
-
createSuggestDeserializer
public static <TDocument> ExternallyTaggedUnion.TypedKeysDeserializer<Suggest<TDocument>> createSuggestDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer) -
hashCode
public int hashCode() -
equals
-