Class FieldSuggester
java.lang.Object
org.opensearch.client.opensearch.core.search.FieldSuggester
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,TaggedUnion<FieldSuggester.Kind,FieldSuggesterVariant>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class FieldSuggester
extends Object
implements TaggedUnion<FieldSuggester.Kind,FieldSuggesterVariant>, PlainJsonSerializable
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal FieldSuggesterVariant_get()final FieldSuggester.Kind_kind()Get the of the kind of variant held by this object.static FieldSuggester.Builderbuilder()Get thecompletionvariant value.booleaninthashCode()booleanIs this variant instance of kindcompletion?booleanisPhrase()Is this variant instance of kindphrase?booleanisTerm()Is this variant instance of kindterm?static FieldSuggesterphrase()Get thephrasevariant value.final Stringprefix()API name:prefixfinal Stringregex()API name:regexvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidterm()Get thetermvariant value.final Stringtext()API name:textMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonString
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
FieldSuggester
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<FieldSuggester.Kind,FieldSuggesterVariant> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<FieldSuggester.Kind,FieldSuggesterVariant>
-
of
-
prefix
API name:prefix -
regex
API name:regex -
text
API name:text -
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
-
setupFieldSuggesterDeserializer
protected static void setupFieldSuggesterDeserializer(ObjectDeserializer<FieldSuggester.Builder> op) -
hashCode
public int hashCode() -
equals
-