Class Buckets<TBucket>
java.lang.Object
org.opensearch.client.opensearch._types.aggregations.Buckets<TBucket>
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,TaggedUnion<Buckets.Kind,Object>
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class Buckets<TBucket>
extends Object
implements TaggedUnion<Buckets.Kind,Object>, PlainJsonSerializable
Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for the different buckets, the
result is a dictionary.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final Buckets.Kind_kind()Get the of the kind of variant held by this object.array()Get thearrayvariant value.static <TBucket> Buckets.Builderbuilder()static <TBucket> JsonpDeserializer<Buckets<TBucket>> createBucketsDeserializer(JsonpDeserializer<TBucket> tBucketDeserializer) booleaninthashCode()booleanisArray()Is this variant instance of kindarray?booleanisKeyed()Is this variant instance of kindkeyed?keyed()Get thekeyedvariant value.static <TBucket> Buckets<TBucket> of(Function<Buckets.Builder<TBucket>, ObjectBuilder<Buckets<TBucket>>> fn) voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) final JsonpSerializer<TBucket> Serializer forTBucket.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonString
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<Buckets.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<Buckets.Kind,Object>
-
of
public static <TBucket> Buckets<TBucket> of(Function<Buckets.Builder<TBucket>, ObjectBuilder<Buckets<TBucket>>> fn) -
tBucketSerializer
Serializer forTBucket. If not set, an attempt will be made to find a serializer from the JSON context. -
isArray
public boolean isArray()Is this variant instance of kindarray? -
array
Get thearrayvariant value.- Throws:
IllegalStateException- if the current variant is not thearraykind.
-
isKeyed
public boolean isKeyed()Is this variant instance of kindkeyed? -
keyed
Get thekeyedvariant value.- Throws:
IllegalStateException- if the current variant is not thekeyedkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toBuilder
-
builder
-
createBucketsDeserializer
public static <TBucket> JsonpDeserializer<Buckets<TBucket>> createBucketsDeserializer(JsonpDeserializer<TBucket> tBucketDeserializer) -
hashCode
public int hashCode() -
equals
-