Class GeoDistanceAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
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:
ObjectBuilder<GeoDistanceAggregation>
- Enclosing class:
- GeoDistanceAggregation
public static class GeoDistanceAggregation.Builder extends BucketAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder> implements ObjectBuilder<GeoDistanceAggregation>
Builder for
GeoDistanceAggregation
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description GeoDistanceAggregation
build()
Builds aGeoDistanceAggregation
.GeoDistanceAggregation.Builder
distanceType(GeoDistanceType value)
API name:distance_type
GeoDistanceAggregation.Builder
field(java.lang.String value)
API name:field
GeoDistanceAggregation.Builder
origin(GeoLocation value)
API name:origin
GeoDistanceAggregation.Builder
origin(java.util.function.Function<GeoLocation.Builder,ObjectBuilder<GeoLocation>> fn)
API name:origin
GeoDistanceAggregation.Builder
ranges(AggregationRange value, AggregationRange... values)
API name:ranges
GeoDistanceAggregation.Builder
ranges(java.util.function.Function<AggregationRange.Builder,ObjectBuilder<AggregationRange>> fn)
API name:ranges
GeoDistanceAggregation.Builder
ranges(java.util.List<AggregationRange> list)
API name:ranges
protected GeoDistanceAggregation.Builder
self()
GeoDistanceAggregation.Builder
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.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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(java.util.function.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(java.util.function.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:
java.lang.NullPointerException
- if some of the required fields are null.
-