Class Buckets<TBucket>
java.lang.Object
co.elastic.clients.elasticsearch._types.aggregations.Buckets<TBucket>
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<Buckets.Kind,
Object>
public class Buckets<TBucket>
extends Object
implements TaggedUnion<Buckets.Kind,Object>, JsonpSerializable
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.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Object
_get()
final Buckets.Kind
_kind()
Get the of the kind of variant held by this object.array()
Get thearray
variant value.static <TBucket> JsonpDeserializer<Buckets<TBucket>>
createBucketsDeserializer
(JsonpDeserializer<TBucket> tBucketDeserializer) boolean
isArray()
Is this variant instance of kindarray
?boolean
isKeyed()
Is this variant instance of kindkeyed
?keyed()
Get thekeyed
variant value.static <TBucket> Buckets<TBucket>
of
(Function<Buckets.Builder<TBucket>, ObjectBuilder<Buckets<TBucket>>> fn) void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) toString()
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<Buckets.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<Buckets.Kind,
Object>
-
of
public static <TBucket> Buckets<TBucket> of(Function<Buckets.Builder<TBucket>, ObjectBuilder<Buckets<TBucket>>> fn) -
isArray
public boolean isArray()Is this variant instance of kindarray
? -
array
Get thearray
variant value.- Throws:
IllegalStateException
- if the current variant is not of thearray
kind.
-
isKeyed
public boolean isKeyed()Is this variant instance of kindkeyed
? -
keyed
Get thekeyed
variant value.- Throws:
IllegalStateException
- if the current variant is not of thekeyed
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
createBucketsDeserializer
public static <TBucket> JsonpDeserializer<Buckets<TBucket>> createBucketsDeserializer(JsonpDeserializer<TBucket> tBucketDeserializer)
-