Class Pivot.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<Pivot.Builder>
co.elastic.clients.elasticsearch.transform.Pivot.Builder
- All Implemented Interfaces:
WithJson<Pivot.Builder>
,ObjectBuilder<Pivot>
- Enclosing class:
- Pivot
public static class Pivot.Builder
extends WithJsonObjectBuilderBase<Pivot.Builder>
implements ObjectBuilder<Pivot>
Builder for
Pivot
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Pivot.Builder
aggregations
(String key, Aggregation value) Defines how to aggregate the grouped data.final Pivot.Builder
Defines how to aggregate the grouped data.final Pivot.Builder
aggregations
(Map<String, Aggregation> map) Defines how to aggregate the grouped data.build()
Builds aPivot
.final Pivot.Builder
groupBy
(String key, PivotGroupBy value) Defines how to group the data.final Pivot.Builder
Defines how to group the data.final Pivot.Builder
groupBy
(Map<String, PivotGroupBy> map) Defines how to group the data.protected Pivot.Builder
self()
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
-
aggregations
Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average.API name:
aggregations
Adds all entries of
map
toaggregations
. -
aggregations
Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average.API name:
aggregations
Adds an entry to
aggregations
. -
aggregations
public final Pivot.Builder aggregations(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average.API name:
aggregations
Adds an entry to
aggregations
using a builder lambda. -
groupBy
Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are currently supported: date histogram, geotile grid, histogram, terms.API name:
group_by
Adds all entries of
map
togroupBy
. -
groupBy
Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are currently supported: date histogram, geotile grid, histogram, terms.API name:
group_by
Adds an entry to
groupBy
. -
groupBy
public final Pivot.Builder groupBy(String key, Function<PivotGroupBy.Builder, ObjectBuilder<PivotGroupBy>> fn) Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are currently supported: date histogram, geotile grid, histogram, terms.API name:
group_by
Adds an entry to
groupBy
using a builder lambda. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<Pivot.Builder>
-
build
Builds aPivot
.- Specified by:
build
in interfaceObjectBuilder<Pivot>
- Throws:
NullPointerException
- if some of the required fields are null.
-