Class Suggest
java.lang.Object
co.elastic.clients.elasticsearch.core.search.Suggest
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<java.lang.Object>
@JsonpDeserializable public class Suggest extends java.lang.Object implements TaggedUnion<java.lang.Object>, JsonpSerializable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSuggest.Builder -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Suggest>_DESERIALIZERstatic java.lang.StringCOMPLETIONstatic java.lang.StringPHRASEstatic java.lang.StringPREFIXstatic java.lang.StringREGEXstatic java.lang.StringTERMstatic java.lang.StringTEXT -
Constructor Summary
Constructors Constructor Description Suggest(SuggestVariant value)Suggest(ObjectBuilder<T> builder)Suggest(java.util.function.Function<Suggest.Builder,Suggest.Builder> fn) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()java.lang.String_type()Get the of the type of the variant held by this union object.CompletionSuggestercompletion()Get thecompletionvariant value.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 voidsetupSuggestDeserializer(DelegatingDeserializer<Suggest.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, waitMethods inherited from interface co.elastic.clients.util.TaggedUnion
_is
-
Field Details
-
COMPLETION
public static final java.lang.String COMPLETION- See Also:
- Constant Field Values
-
PHRASE
public static final java.lang.String PHRASE- See Also:
- Constant Field Values
-
PREFIX
public static final java.lang.String PREFIX- See Also:
- Constant Field Values
-
REGEX
public static final java.lang.String REGEX- See Also:
- Constant Field Values
-
TERM
public static final java.lang.String TERM- See Also:
- Constant Field Values
-
TEXT
public static final java.lang.String TEXT- See Also:
- Constant Field Values
-
_DESERIALIZER
-
-
Constructor Details
-
Suggest
-
Suggest
-
Suggest
-
-
Method Details
-
_type
public java.lang.String _type()Description copied from interface:TaggedUnionGet the of the type of the variant held by this union object.- Specified by:
_typein interfaceTaggedUnion<java.lang.Object>- Returns:
- the variant type
-
_get
public java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<java.lang.Object>
-
completion
Get thecompletionvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecompletionkind.
-
phrase
Get thephrasevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thephrasekind.
-
prefix
public java.lang.String prefix()Get theprefixvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theprefixkind.
-
regex
public java.lang.String regex()Get theregexvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theregexkind.
-
term
Get thetermvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetermkind.
-
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
-
setupSuggestDeserializer
-