Class TermsInclude
- java.lang.Object
-
- org.opensearch.client.opensearch._types.aggregations.TermsInclude
-
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<TermsInclude.Kind,java.lang.Object>
@JsonpDeserializable public class TermsInclude extends java.lang.Object implements TaggedUnion<TermsInclude.Kind,java.lang.Object>, JsonpSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTermsInclude.Builderstatic classTermsInclude.Kind
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<TermsInclude>_DESERIALIZER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object_get()TermsInclude.Kind_kind()Get the of the kind of variant held by this object.booleanisPartition()Is this variant instance of kindpartition?booleanisRegexp()Is this variant instance of kindregexp?booleanisTerms()Is this variant instance of kindterms?static TermsIncludeof(java.util.function.Function<TermsInclude.Builder,ObjectBuilder<TermsInclude>> fn)TermsPartitionpartition()Get thepartitionvariant value.java.lang.Stringregexp()Get theregexpvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)java.util.List<java.lang.String>terms()Get thetermsvariant value.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<TermsInclude> _DESERIALIZER
-
-
Method Detail
-
_kind
public final TermsInclude.Kind _kind()
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<TermsInclude.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()
- Specified by:
_getin interfaceTaggedUnion<TermsInclude.Kind,java.lang.Object>
-
of
public static TermsInclude of(java.util.function.Function<TermsInclude.Builder,ObjectBuilder<TermsInclude>> fn)
-
isTerms
public boolean isTerms()
Is this variant instance of kindterms?
-
terms
public java.util.List<java.lang.String> terms()
Get thetermsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetermskind.
-
isPartition
public boolean isPartition()
Is this variant instance of kindpartition?
-
partition
public TermsPartition partition()
Get thepartitionvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thepartitionkind.
-
isRegexp
public boolean isRegexp()
Is this variant instance of kindregexp?
-
regexp
public java.lang.String regexp()
Get theregexpvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theregexpkind.
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)- Specified by:
serializein interfaceJsonpSerializable
-
-