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 class
Suggest.Builder
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Suggest>
_DESERIALIZER
static java.lang.String
COMPLETION
static java.lang.String
PHRASE
static java.lang.String
PREFIX
static java.lang.String
REGEX
static java.lang.String
TERM
static java.lang.String
TEXT
-
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.CompletionSuggester
completion()
Get thecompletion
variant value.PhraseSuggester
phrase()
Get thephrase
variant value.java.lang.String
prefix()
Get theprefix
variant value.java.lang.String
regex()
Get theregex
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupSuggestDeserializer(DelegatingDeserializer<Suggest.Builder> op)
TermSuggester
term()
Get theterm
variant value.java.lang.String
text()
Get thetext
variant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:TaggedUnion
Get the of the type of the variant held by this union object.- Specified by:
_type
in interfaceTaggedUnion<java.lang.Object>
- Returns:
- the variant type
-
_get
public java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<java.lang.Object>
-
completion
Get thecompletion
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecompletion
kind.
-
phrase
Get thephrase
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thephrase
kind.
-
prefix
public java.lang.String prefix()Get theprefix
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theprefix
kind.
-
regex
public java.lang.String regex()Get theregex
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theregex
kind.
-
term
Get theterm
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theterm
kind.
-
text
public java.lang.String text()Get thetext
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thetext
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
setupSuggestDeserializer
-