Class GeoDistanceAggregation.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.BucketAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
org.opensearch.client.opensearch._types.aggregations.GeoDistanceAggregation.Builder
- All Implemented Interfaces:
CopyableBuilder<GeoDistanceAggregation.Builder,,GeoDistanceAggregation> MutableBuilder<GeoDistanceAggregation.Builder,,GeoDistanceAggregation> ObjectBuilder<GeoDistanceAggregation>
- Enclosing class:
GeoDistanceAggregation
public static class GeoDistanceAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
implements CopyableBuilder<GeoDistanceAggregation.Builder,GeoDistanceAggregation>
Builder for
GeoDistanceAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGeoDistanceAggregation.copy()Create a new builderCopyableBuilderthat is a copy of this one.distanceType(GeoDistanceType value) API name:distance_typeAPI name:fieldAPI name:originorigin(GeoLocation value) API name:originAn array of ranges used to bucket documents.ranges(List<AggregationRange> list) An array of ranges used to bucket documents.ranges(AggregationRange value, AggregationRange... values) An array of ranges used to bucket documents.protected GeoDistanceAggregation.Builderself()unit(DistanceUnit value) API name:unitMethods inherited from class org.opensearch.client.opensearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, nameMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<GeoDistanceAggregation.Builder,GeoDistanceAggregation> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
-
distanceType
API name:distance_type -
field
API name:field -
origin
API name:origin -
origin
@Nonnull public final GeoDistanceAggregation.Builder origin(Function<GeoLocation.Builder, ObjectBuilder<GeoLocation>> fn) API name:origin -
ranges
An array of ranges used to bucket documents.API name:
rangesAdds all elements of
listtoranges. -
ranges
@Nonnull public final GeoDistanceAggregation.Builder ranges(AggregationRange value, AggregationRange... values) An array of ranges used to bucket documents.API name:
rangesAdds one or more values to
ranges. -
ranges
@Nonnull public final GeoDistanceAggregation.Builder ranges(Function<AggregationRange.Builder, ObjectBuilder<AggregationRange>> fn) An array of ranges used to bucket documents.API name:
rangesAdds a value to
rangesusing a builder lambda. -
unit
API name:unit -
build
Builds aGeoDistanceAggregation.- Specified by:
buildin interfaceObjectBuilder<GeoDistanceAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-