Class GeoDistanceSort.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch._types.GeoDistanceSort.Builder
-
- All Implemented Interfaces:
ObjectBuilder<GeoDistanceSort>
- Enclosing class:
- GeoDistanceSort
public static class GeoDistanceSort.Builder extends ObjectBuilderBase implements ObjectBuilder<GeoDistanceSort>
Builder forGeoDistanceSort
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoDistanceSort
build()
Builds aGeoDistanceSort
.GeoDistanceSort.Builder
distanceType(GeoDistanceType value)
API name:distance_type
GeoDistanceSort.Builder
field(java.lang.String value)
Required -GeoDistanceSort.Builder
ignoreUnmapped(java.lang.Boolean value)
API name:ignore_unmapped
GeoDistanceSort.Builder
location(java.util.function.Function<GeoLocation.Builder,ObjectBuilder<GeoLocation>> fn)
Required - Adds a value tolocation
using a builder lambda.GeoDistanceSort.Builder
location(java.util.List<GeoLocation> list)
Required - Adds all elements oflist
tolocation
.GeoDistanceSort.Builder
location(GeoLocation value, GeoLocation... values)
Required - Adds one or more values tolocation
.GeoDistanceSort.Builder
mode(SortMode value)
API name:mode
GeoDistanceSort.Builder
order(SortOrder value)
API name:order
GeoDistanceSort.Builder
unit(DistanceUnit value)
API name:unit
-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAdd, _listAddAll, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
field
public final GeoDistanceSort.Builder field(java.lang.String value)
Required -
-
location
public final GeoDistanceSort.Builder location(java.util.List<GeoLocation> list)
Required - Adds all elements oflist
tolocation
.
-
location
public final GeoDistanceSort.Builder location(GeoLocation value, GeoLocation... values)
Required - Adds one or more values tolocation
.
-
location
public final GeoDistanceSort.Builder location(java.util.function.Function<GeoLocation.Builder,ObjectBuilder<GeoLocation>> fn)
Required - Adds a value tolocation
using a builder lambda.
-
mode
public final GeoDistanceSort.Builder mode(@Nullable SortMode value)
API name:mode
-
distanceType
public final GeoDistanceSort.Builder distanceType(@Nullable GeoDistanceType value)
API name:distance_type
-
ignoreUnmapped
public final GeoDistanceSort.Builder ignoreUnmapped(@Nullable java.lang.Boolean value)
API name:ignore_unmapped
-
order
public final GeoDistanceSort.Builder order(@Nullable SortOrder value)
API name:order
-
unit
public final GeoDistanceSort.Builder unit(@Nullable DistanceUnit value)
API name:unit
-
build
public GeoDistanceSort build()
Builds aGeoDistanceSort
.- Specified by:
build
in interfaceObjectBuilder<GeoDistanceSort>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-
-