Class FieldSuggester
java.lang.Object
co.elastic.clients.elasticsearch.core.search.FieldSuggester
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<FieldSuggester.Kind,java.lang.Object>
@JsonpDeserializable public class FieldSuggester extends java.lang.Object implements TaggedUnion<FieldSuggester.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFieldSuggester.Builderstatic classFieldSuggester.KindFieldSuggestervariant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<FieldSuggester>_DESERIALIZER -
Constructor Summary
Constructors Constructor Description FieldSuggester(FieldSuggesterVariant value) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()FieldSuggester.Kind_kind()Get the of the kind of variant held by this object.CompletionSuggestercompletion()Get thecompletionvariant value.booleanisCompletion()Is this variant instance of kindcompletion?booleanisPhrase()Is this variant instance of kindphrase?booleanisPrefix()Is this variant instance of kindprefix?booleanisRegex()Is this variant instance of kindregex?booleanisTerm()Is this variant instance of kindterm?booleanisText()Is this variant instance of kindtext?static FieldSuggesterof(java.util.function.Function<FieldSuggester.Builder,ObjectBuilder<FieldSuggester>> fn)PhraseSuggesterphrase()Get thephrasevariant value.java.lang.Stringprefix()Get theprefixvariant value.java.lang.Stringregex()Get theregexvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupFieldSuggesterDeserializer(ObjectDeserializer<FieldSuggester.Builder> op)TermSuggesterterm()Get thetermvariant value.java.lang.Stringtext()Get thetextvariant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<FieldSuggester.Kind,java.lang.Object>
-
of
public static FieldSuggester of(java.util.function.Function<FieldSuggester.Builder,ObjectBuilder<FieldSuggester>> fn) -
isCompletion
public boolean isCompletion()Is this variant instance of kindcompletion? -
completion
Get thecompletionvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecompletionkind.
-
isPhrase
public boolean isPhrase()Is this variant instance of kindphrase? -
phrase
Get thephrasevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thephrasekind.
-
isPrefix
public boolean isPrefix()Is this variant instance of kindprefix? -
prefix
public java.lang.String prefix()Get theprefixvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theprefixkind.
-
isRegex
public boolean isRegex()Is this variant instance of kindregex? -
regex
public java.lang.String regex()Get theregexvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theregexkind.
-
isTerm
public boolean isTerm()Is this variant instance of kindterm? -
term
Get thetermvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetermkind.
-
isText
public boolean isText()Is this variant instance of kindtext? -
text
public java.lang.String text()Get thetextvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetextkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
setupFieldSuggesterDeserializer
protected static void setupFieldSuggesterDeserializer(ObjectDeserializer<FieldSuggester.Builder> op)
-