Class TokenizerDefinition
- java.lang.Object
-
- org.opensearch.client.opensearch._types.analysis.TokenizerDefinition
-
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,TaggedUnion<TokenizerDefinition.Kind,TokenizerDefinitionVariant>
@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public class TokenizerDefinition extends java.lang.Object implements TaggedUnion<TokenizerDefinition.Kind,TokenizerDefinitionVariant>, PlainJsonSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTokenizerDefinition.Builderstatic classTokenizerDefinition.KindTokenizerDefinitionvariant kinds.
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<TokenizerDefinition>_DESERIALIZER
-
Constructor Summary
Constructors Constructor Description TokenizerDefinition(TokenizerDefinitionVariant value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenizerDefinitionVariant_get()TokenizerDefinition.Kind_kind()Get the of the kind of variant held by this object.static TokenizerDefinition.Builderbuilder()CharGroupTokenizercharGroup()Get thechar_groupvariant value.EdgeNGramTokenizeredgeNgram()Get theedge_ngramvariant value.booleanequals(java.lang.Object o)inthashCode()IcuTokenizericuTokenizer()Get theicu_tokenizervariant value.booleanisCharGroup()Is this variant instance of kindchar_group?booleanisEdgeNgram()Is this variant instance of kindedge_ngram?booleanisIcuTokenizer()Is this variant instance of kindicu_tokenizer?booleanisKeyword()Is this variant instance of kindkeyword?booleanisKuromojiTokenizer()Is this variant instance of kindkuromoji_tokenizer?booleanisLetter()Is this variant instance of kindletter?booleanisLowercase()Is this variant instance of kindlowercase?booleanisNgram()Is this variant instance of kindngram?booleanisNoriTokenizer()Is this variant instance of kindnori_tokenizer?booleanisPathHierarchy()Is this variant instance of kindpath_hierarchy?booleanisPattern()Is this variant instance of kindpattern?booleanisSimplePattern()Is this variant instance of kindsimple_pattern?booleanisSimplePatternSplit()Is this variant instance of kindsimple_pattern_split?booleanisSmartcnTokenizer()Is this variant instance of kindsmartcn_tokenizer?booleanisStandard()Is this variant instance of kindstandard?booleanisUaxUrlEmail()Is this variant instance of kinduax_url_email?booleanisWhitespace()Is this variant instance of kindwhitespace?KeywordTokenizerkeyword()Get thekeywordvariant value.KuromojiTokenizerkuromojiTokenizer()Get thekuromoji_tokenizervariant value.LetterTokenizerletter()Get thelettervariant value.LowercaseTokenizerlowercase()Get thelowercasevariant value.NGramTokenizerngram()Get thengramvariant value.NoriTokenizernoriTokenizer()Get thenori_tokenizervariant value.static TokenizerDefinitionof(java.util.function.Function<TokenizerDefinition.Builder,ObjectBuilder<TokenizerDefinition>> fn)PathHierarchyTokenizerpathHierarchy()Get thepath_hierarchyvariant value.PatternTokenizerpattern()Get thepatternvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupTokenizerDefinitionDeserializer(ObjectDeserializer<TokenizerDefinition.Builder> op)SimplePatternTokenizersimplePattern()Get thesimple_patternvariant value.SimplePatternSplitTokenizersimplePatternSplit()Get thesimple_pattern_splitvariant value.SmartcnTokenizersmartcnTokenizer()Get thesmartcn_tokenizervariant value.StandardTokenizerstandard()Get thestandardvariant value.TokenizerDefinition.BuildertoBuilder()UaxEmailUrlTokenizeruaxUrlEmail()Get theuax_url_emailvariant value.WhitespaceTokenizerwhitespace()Get thewhitespacevariant value.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonString
-
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<TokenizerDefinition> _DESERIALIZER
-
-
Constructor Detail
-
TokenizerDefinition
public TokenizerDefinition(TokenizerDefinitionVariant value)
-
-
Method Detail
-
_kind
public final TokenizerDefinition.Kind _kind()
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<TokenizerDefinition.Kind,TokenizerDefinitionVariant>- Returns:
- the variant kind
-
_get
public final TokenizerDefinitionVariant _get()
- Specified by:
_getin interfaceTaggedUnion<TokenizerDefinition.Kind,TokenizerDefinitionVariant>
-
of
public static TokenizerDefinition of(java.util.function.Function<TokenizerDefinition.Builder,ObjectBuilder<TokenizerDefinition>> fn)
-
isCharGroup
public boolean isCharGroup()
Is this variant instance of kindchar_group?
-
charGroup
public CharGroupTokenizer charGroup()
Get thechar_groupvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thechar_groupkind.
-
isEdgeNgram
public boolean isEdgeNgram()
Is this variant instance of kindedge_ngram?
-
edgeNgram
public EdgeNGramTokenizer edgeNgram()
Get theedge_ngramvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not theedge_ngramkind.
-
isIcuTokenizer
public boolean isIcuTokenizer()
Is this variant instance of kindicu_tokenizer?
-
icuTokenizer
public IcuTokenizer icuTokenizer()
Get theicu_tokenizervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not theicu_tokenizerkind.
-
isKeyword
public boolean isKeyword()
Is this variant instance of kindkeyword?
-
keyword
public KeywordTokenizer keyword()
Get thekeywordvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thekeywordkind.
-
isKuromojiTokenizer
public boolean isKuromojiTokenizer()
Is this variant instance of kindkuromoji_tokenizer?
-
kuromojiTokenizer
public KuromojiTokenizer kuromojiTokenizer()
Get thekuromoji_tokenizervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thekuromoji_tokenizerkind.
-
isLetter
public boolean isLetter()
Is this variant instance of kindletter?
-
letter
public LetterTokenizer letter()
Get thelettervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not theletterkind.
-
isLowercase
public boolean isLowercase()
Is this variant instance of kindlowercase?
-
lowercase
public LowercaseTokenizer lowercase()
Get thelowercasevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thelowercasekind.
-
isNgram
public boolean isNgram()
Is this variant instance of kindngram?
-
ngram
public NGramTokenizer ngram()
Get thengramvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thengramkind.
-
isNoriTokenizer
public boolean isNoriTokenizer()
Is this variant instance of kindnori_tokenizer?
-
noriTokenizer
public NoriTokenizer noriTokenizer()
Get thenori_tokenizervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thenori_tokenizerkind.
-
isPathHierarchy
public boolean isPathHierarchy()
Is this variant instance of kindpath_hierarchy?
-
pathHierarchy
public PathHierarchyTokenizer pathHierarchy()
Get thepath_hierarchyvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thepath_hierarchykind.
-
isPattern
public boolean isPattern()
Is this variant instance of kindpattern?
-
pattern
public PatternTokenizer pattern()
Get thepatternvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thepatternkind.
-
isSimplePattern
public boolean isSimplePattern()
Is this variant instance of kindsimple_pattern?
-
simplePattern
public SimplePatternTokenizer simplePattern()
Get thesimple_patternvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thesimple_patternkind.
-
isSimplePatternSplit
public boolean isSimplePatternSplit()
Is this variant instance of kindsimple_pattern_split?
-
simplePatternSplit
public SimplePatternSplitTokenizer simplePatternSplit()
Get thesimple_pattern_splitvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thesimple_pattern_splitkind.
-
isSmartcnTokenizer
public boolean isSmartcnTokenizer()
Is this variant instance of kindsmartcn_tokenizer?
-
smartcnTokenizer
public SmartcnTokenizer smartcnTokenizer()
Get thesmartcn_tokenizervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thesmartcn_tokenizerkind.
-
isStandard
public boolean isStandard()
Is this variant instance of kindstandard?
-
standard
public StandardTokenizer standard()
Get thestandardvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thestandardkind.
-
isUaxUrlEmail
public boolean isUaxUrlEmail()
Is this variant instance of kinduax_url_email?
-
uaxUrlEmail
public UaxEmailUrlTokenizer uaxUrlEmail()
Get theuax_url_emailvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not theuax_url_emailkind.
-
isWhitespace
public boolean isWhitespace()
Is this variant instance of kindwhitespace?
-
whitespace
public WhitespaceTokenizer whitespace()
Get thewhitespacevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not thewhitespacekind.
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)- Specified by:
serializein interfaceJsonpSerializable
-
toBuilder
@Nonnull public TokenizerDefinition.Builder toBuilder()
-
builder
@Nonnull public static TokenizerDefinition.Builder builder()
-
setupTokenizerDefinitionDeserializer
protected static void setupTokenizerDefinitionDeserializer(ObjectDeserializer<TokenizerDefinition.Builder> op)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-