49
49
@ JsonpDeserializable
50
50
public class CompositeAggregationSource implements JsonpSerializable {
51
51
@ Nullable
52
- private final TermsAggregation terms ;
52
+ private final CompositeTermsAggregationSource terms ;
53
53
54
54
@ Nullable
55
- private final HistogramAggregation histogram ;
55
+ private final CompositeHistogramAggregationSource histogram ;
56
56
57
57
@ Nullable
58
- private final DateHistogramAggregation dateHistogram ;
58
+ private final CompositeDateHistogramAggregationSource dateHistogram ;
59
59
60
60
@ Nullable
61
- private final GeoTileGridAggregation geotileGrid ;
62
-
63
- // ---------------------------------------------------------------------------------------------
61
+ private final CompositeGeoTileGridAggregationSource geotileGrid ;
64
62
65
63
private CompositeAggregationSource (Builder builder ) {
66
64
@@ -79,31 +77,31 @@ public static CompositeAggregationSource of(Function<Builder, ObjectBuilder<Comp
79
77
* API name: {@code terms}
80
78
*/
81
79
@ Nullable
82
- public final TermsAggregation terms () {
80
+ public final CompositeTermsAggregationSource terms () {
83
81
return this .terms ;
84
82
}
85
83
86
84
/**
87
85
* API name: {@code histogram}
88
86
*/
89
87
@ Nullable
90
- public final HistogramAggregation histogram () {
88
+ public final CompositeHistogramAggregationSource histogram () {
91
89
return this .histogram ;
92
90
}
93
91
94
92
/**
95
93
* API name: {@code date_histogram}
96
94
*/
97
95
@ Nullable
98
- public final DateHistogramAggregation dateHistogram () {
96
+ public final CompositeDateHistogramAggregationSource dateHistogram () {
99
97
return this .dateHistogram ;
100
98
}
101
99
102
100
/**
103
101
* API name: {@code geotile_grid}
104
102
*/
105
103
@ Nullable
106
- public final GeoTileGridAggregation geotileGrid () {
104
+ public final CompositeGeoTileGridAggregationSource geotileGrid () {
107
105
return this .geotileGrid ;
108
106
}
109
107
@@ -141,83 +139,87 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
141
139
142
140
}
143
141
144
- // ---------------------------------------------------------------------------------------------
145
-
146
142
/**
147
143
* Builder for {@link CompositeAggregationSource}.
148
144
*/
149
145
150
146
public static class Builder extends ObjectBuilderBase implements ObjectBuilder <CompositeAggregationSource > {
151
147
@ Nullable
152
- private TermsAggregation terms ;
148
+ private CompositeTermsAggregationSource terms ;
153
149
154
150
@ Nullable
155
- private HistogramAggregation histogram ;
151
+ private CompositeHistogramAggregationSource histogram ;
156
152
157
153
@ Nullable
158
- private DateHistogramAggregation dateHistogram ;
154
+ private CompositeDateHistogramAggregationSource dateHistogram ;
159
155
160
156
@ Nullable
161
- private GeoTileGridAggregation geotileGrid ;
157
+ private CompositeGeoTileGridAggregationSource geotileGrid ;
162
158
163
159
/**
164
160
* API name: {@code terms}
165
161
*/
166
- public final Builder terms (@ Nullable TermsAggregation value ) {
162
+ public final Builder terms (@ Nullable CompositeTermsAggregationSource value ) {
167
163
this .terms = value ;
168
164
return this ;
169
165
}
170
166
171
167
/**
172
168
* API name: {@code terms}
173
169
*/
174
- public final Builder terms (Function <TermsAggregation .Builder , ObjectBuilder <TermsAggregation >> fn ) {
175
- return this .terms (fn .apply (new TermsAggregation .Builder ()).build ());
170
+ public final Builder terms (Function <CompositeTermsAggregationSource .Builder , ObjectBuilder <CompositeTermsAggregationSource >> fn ) {
171
+ return this .terms (fn .apply (new CompositeTermsAggregationSource .Builder ()).build ());
176
172
}
177
173
178
174
/**
179
175
* API name: {@code histogram}
180
176
*/
181
- public final Builder histogram (@ Nullable HistogramAggregation value ) {
177
+ public final Builder histogram (@ Nullable CompositeHistogramAggregationSource value ) {
182
178
this .histogram = value ;
183
179
return this ;
184
180
}
185
181
186
182
/**
187
183
* API name: {@code histogram}
188
184
*/
189
- public final Builder histogram (Function <HistogramAggregation .Builder , ObjectBuilder <HistogramAggregation >> fn ) {
190
- return this .histogram (fn .apply (new HistogramAggregation .Builder ()).build ());
185
+ public final Builder histogram (
186
+ Function <CompositeHistogramAggregationSource .Builder , ObjectBuilder <CompositeHistogramAggregationSource >> fn
187
+ ) {
188
+ return this .histogram (fn .apply (new CompositeHistogramAggregationSource .Builder ()).build ());
191
189
}
192
190
193
191
/**
194
192
* API name: {@code date_histogram}
195
193
*/
196
- public final Builder dateHistogram (@ Nullable DateHistogramAggregation value ) {
194
+ public final Builder dateHistogram (@ Nullable CompositeDateHistogramAggregationSource value ) {
197
195
this .dateHistogram = value ;
198
196
return this ;
199
197
}
200
198
201
199
/**
202
200
* API name: {@code date_histogram}
203
201
*/
204
- public final Builder dateHistogram (Function <DateHistogramAggregation .Builder , ObjectBuilder <DateHistogramAggregation >> fn ) {
205
- return this .dateHistogram (fn .apply (new DateHistogramAggregation .Builder ()).build ());
202
+ public final Builder dateHistogram (
203
+ Function <CompositeDateHistogramAggregationSource .Builder , ObjectBuilder <CompositeDateHistogramAggregationSource >> fn
204
+ ) {
205
+ return this .dateHistogram (fn .apply (new CompositeDateHistogramAggregationSource .Builder ()).build ());
206
206
}
207
207
208
208
/**
209
209
* API name: {@code geotile_grid}
210
210
*/
211
- public final Builder geotileGrid (@ Nullable GeoTileGridAggregation value ) {
211
+ public final Builder geotileGrid (@ Nullable CompositeGeoTileGridAggregationSource value ) {
212
212
this .geotileGrid = value ;
213
213
return this ;
214
214
}
215
215
216
216
/**
217
217
* API name: {@code geotile_grid}
218
218
*/
219
- public final Builder geotileGrid (Function <GeoTileGridAggregation .Builder , ObjectBuilder <GeoTileGridAggregation >> fn ) {
220
- return this .geotileGrid (fn .apply (new GeoTileGridAggregation .Builder ()).build ());
219
+ public final Builder geotileGrid (
220
+ Function <CompositeGeoTileGridAggregationSource .Builder , ObjectBuilder <CompositeGeoTileGridAggregationSource >> fn
221
+ ) {
222
+ return this .geotileGrid (fn .apply (new CompositeGeoTileGridAggregationSource .Builder ()).build ());
221
223
}
222
224
223
225
/**
@@ -245,11 +247,10 @@ public CompositeAggregationSource build() {
245
247
246
248
protected static void setupCompositeAggregationSourceDeserializer (ObjectDeserializer <CompositeAggregationSource .Builder > op ) {
247
249
248
- op .add (Builder ::terms , TermsAggregation ._DESERIALIZER , "terms" );
249
- op .add (Builder ::histogram , HistogramAggregation ._DESERIALIZER , "histogram" );
250
- op .add (Builder ::dateHistogram , DateHistogramAggregation ._DESERIALIZER , "date_histogram" );
251
- op .add (Builder ::geotileGrid , GeoTileGridAggregation ._DESERIALIZER , "geotile_grid" );
252
-
250
+ op .add (Builder ::terms , CompositeTermsAggregationSource ._DESERIALIZER , "terms" );
251
+ op .add (Builder ::histogram , CompositeHistogramAggregationSource ._DESERIALIZER , "histogram" );
252
+ op .add (Builder ::dateHistogram , CompositeDateHistogramAggregationSource ._DESERIALIZER , "date_histogram" );
253
+ op .add (Builder ::geotileGrid , CompositeGeoTileGridAggregationSource ._DESERIALIZER , "geotile_grid" );
253
254
}
254
255
255
256
}
0 commit comments