Class GeoDistanceAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.GeoDistanceAggregation.Builder
- All Implemented Interfaces:
WithJson<GeoDistanceAggregation.Builder>
,ObjectBuilder<GeoDistanceAggregation>
- Enclosing class:
- GeoDistanceAggregation
public static class GeoDistanceAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
implements ObjectBuilder<GeoDistanceAggregation>
Builder for
GeoDistanceAggregation
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aGeoDistanceAggregation
.distanceType
(GeoDistanceType value) API name:distance_type
API name:field
origin
(GeoLocation value) API name:origin
API name:origin
ranges
(AggregationRange value, AggregationRange... values) API name:ranges
API name:ranges
ranges
(List<AggregationRange> list) API name:ranges
protected GeoDistanceAggregation.Builder
self()
unit
(DistanceUnit value) API name:unit
Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, name
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
distanceType
API name:distance_type
-
field
API name:field
-
origin
API name:origin
-
origin
public final GeoDistanceAggregation.Builder origin(Function<GeoLocation.Builder, ObjectBuilder<GeoLocation>> fn) API name:origin
-
ranges
API name:ranges
Adds all elements of
list
toranges
. -
ranges
public final GeoDistanceAggregation.Builder ranges(AggregationRange value, AggregationRange... values) API name:ranges
Adds one or more values to
ranges
. -
ranges
public final GeoDistanceAggregation.Builder ranges(Function<AggregationRange.Builder, ObjectBuilder<AggregationRange>> fn) API name:ranges
Adds a value to
ranges
using a builder lambda. -
unit
API name:unit
-
self
- Specified by:
self
in classAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
-
build
Builds aGeoDistanceAggregation
.- Specified by:
build
in interfaceObjectBuilder<GeoDistanceAggregation>
- Throws:
NullPointerException
- if some of the required fields are null.
-