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
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description Pivot.Builder
aggregations(java.lang.String key, Aggregation value)
Defines how to aggregate the grouped data.Pivot.Builder
aggregations(java.lang.String key, java.util.function.Function<Aggregation.Builder,ObjectBuilder<Aggregation>> fn)
Defines how to aggregate the grouped data.Pivot.Builder
aggregations(java.util.Map<java.lang.String,Aggregation> map)
Defines how to aggregate the grouped data.Pivot
build()
Builds aPivot
.Pivot.Builder
groupBy(java.lang.String key, PivotGroupBy value)
Defines how to group the data.Pivot.Builder
groupBy(java.lang.String key, java.util.function.Function<PivotGroupBy.Builder,ObjectBuilder<PivotGroupBy>> fn)
Defines how to group the data.Pivot.Builder
groupBy(java.util.Map<java.lang.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
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
-
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(java.lang.String key, java.util.function.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(java.lang.String key, java.util.function.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:
java.lang.NullPointerException
- if some of the required fields are null.
-