Class SuggestContainer
java.lang.Object
org.opensearch.client.util.TaggedUnion<SuggestContainer.Tag,java.lang.Object>
org.opensearch.client.opensearch._global.search.SuggestContainer
- All Implemented Interfaces:
ToJsonp
public class SuggestContainer extends TaggedUnion<SuggestContainer.Tag,java.lang.Object> implements ToJsonp
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSuggestContainer.Builderstatic classSuggestContainer.Tag -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SuggestContainer>DESERIALIZER -
Method Summary
Modifier and Type Method Description CompletionSuggestercompletion()Get thecompletionvariant value.booleanisCompletion()Is thisSuggestContainerof acompletionkind?booleanisPhrase()Is thisSuggestContainerof aphrasekind?booleanisPrefix()Is thisSuggestContainerof aprefixkind?booleanisRegex()Is thisSuggestContainerof aregexkind?booleanisTerm()Is thisSuggestContainerof atermkind?booleanisText()Is thisSuggestContainerof atextkind?PhraseSuggesterphrase()Get thephrasevariant value.java.lang.Stringprefix()Get theprefixvariant value.java.lang.Stringregex()Get theregexvariant value.TermSuggesterterm()Get thetermvariant value.java.lang.Stringtext()Get thetextvariant value.voidtoJsonp(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
Field Details
-
Method Details
-
isCompletion
public boolean isCompletion()Is thisSuggestContainerof acompletionkind? -
completion
Get thecompletionvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecompletionkind.
-
isPhrase
public boolean isPhrase()Is thisSuggestContainerof aphrasekind? -
phrase
Get thephrasevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thephrasekind.
-
isPrefix
public boolean isPrefix()Is thisSuggestContainerof aprefixkind? -
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 thisSuggestContainerof aregexkind? -
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 thisSuggestContainerof atermkind? -
term
Get thetermvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetermkind.
-
isText
public boolean isText()Is thisSuggestContainerof atextkind? -
text
public java.lang.String text()Get thetextvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetextkind.
-
toJsonp
-