@@ -159,21 +159,16 @@ public final AggregationVariant _get() {
159159 return _value ;
160160 }
161161
162- @ Nonnull
163- private final Map <String , Aggregation > aggregations ;
164-
165162 @ Nonnull
166163 private final Map <String , JsonData > meta ;
167164
168165 public Aggregation (AggregationVariant value ) {
169166 this ._kind = ApiTypeHelper .requireNonNull (value ._aggregationKind (), this , "<variant kind>" );
170167 this ._value = ApiTypeHelper .requireNonNull (value , this , "<variant value>" );
171- this .aggregations = null ;
172168 this .meta = null ;
173169 }
174170
175171 private Aggregation (Builder builder ) {
176- this .aggregations = ApiTypeHelper .unmodifiable (builder .aggregations );
177172 this .meta = ApiTypeHelper .unmodifiable (builder .meta );
178173 this ._kind = ApiTypeHelper .requireNonNull (builder ._kind , builder , "<variant kind>" );
179174 this ._value = ApiTypeHelper .requireNonNull (builder ._value , builder , "<variant value>" );
@@ -183,17 +178,6 @@ public static Aggregation of(Function<Aggregation.Builder, ObjectBuilder<Aggrega
183178 return fn .apply (new Builder ()).build ();
184179 }
185180
186- /**
187- * Sub-aggregations for this aggregation. Only applies to bucket aggregations.
188- * <p>
189- * API name: {@code aggregations}
190- * </p>
191- */
192- @ Nonnull
193- public final Map <String , Aggregation > aggregations () {
194- return this .aggregations ;
195- }
196-
197181 /**
198182 * API name: {@code meta}
199183 */
@@ -1245,16 +1229,6 @@ public WeightedAverageAggregation weightedAvg() {
12451229 @ Override
12461230 public void serialize (JsonGenerator generator , JsonpMapper mapper ) {
12471231 generator .writeStartObject ();
1248- if (ApiTypeHelper .isDefined (this .aggregations )) {
1249- generator .writeKey ("aggregations" );
1250- generator .writeStartObject ();
1251- for (Map .Entry <String , Aggregation > item0 : this .aggregations .entrySet ()) {
1252- generator .writeKey (item0 .getKey ());
1253- item0 .getValue ().serialize (generator , mapper );
1254- }
1255- generator .writeEnd ();
1256- }
1257-
12581232 if (ApiTypeHelper .isDefined (this .meta )) {
12591233 generator .writeKey ("meta" );
12601234 generator .writeStartObject ();
@@ -1285,66 +1259,16 @@ public static class Builder extends ObjectBuilderBase {
12851259 private Kind _kind ;
12861260 private AggregationVariant _value ;
12871261 @ Nullable
1288- private Map <String , Aggregation > aggregations ;
1289- @ Nullable
12901262 private Map <String , JsonData > meta ;
12911263
12921264 public Builder () {}
12931265
12941266 private Builder (Aggregation o ) {
1295- this .aggregations = _mapCopy (o .aggregations );
12961267 this .meta = _mapCopy (o .meta );
12971268 this ._kind = o ._kind ;
12981269 this ._value = o ._value ;
12991270 }
13001271
1301- /**
1302- * Sub-aggregations for this aggregation. Only applies to bucket aggregations.
1303- * <p>
1304- * API name: {@code aggregations}
1305- * </p>
1306- *
1307- * <p>
1308- * Adds all elements of <code>map</code> to <code>aggregations</code>.
1309- * </p>
1310- */
1311- @ Nonnull
1312- public final Builder aggregations (Map <String , Aggregation > map ) {
1313- this .aggregations = _mapPutAll (this .aggregations , map );
1314- return this ;
1315- }
1316-
1317- /**
1318- * Sub-aggregations for this aggregation. Only applies to bucket aggregations.
1319- * <p>
1320- * API name: {@code aggregations}
1321- * </p>
1322- *
1323- * <p>
1324- * Adds an entry to <code>aggregations</code>.
1325- * </p>
1326- */
1327- @ Nonnull
1328- public final Builder aggregations (String key , Aggregation value ) {
1329- this .aggregations = _mapPut (this .aggregations , key , value );
1330- return this ;
1331- }
1332-
1333- /**
1334- * Sub-aggregations for this aggregation. Only applies to bucket aggregations.
1335- * <p>
1336- * API name: {@code aggregations}
1337- * </p>
1338- *
1339- * <p>
1340- * Adds a value to <code>aggregations</code> using a builder lambda.
1341- * </p>
1342- */
1343- @ Nonnull
1344- public final Builder aggregations (String key , Function <Aggregation .Builder , ObjectBuilder <Aggregation >> fn ) {
1345- return aggregations (key , fn .apply (new Aggregation .Builder ()).build ());
1346- }
1347-
13481272 /**
13491273 * API name: {@code meta}
13501274 *
@@ -2055,53 +1979,6 @@ protected Aggregation build() {
20551979 public class ContainerBuilder implements ObjectBuilder <Aggregation > {
20561980 private ContainerBuilder () {}
20571981
2058- /**
2059- * Sub-aggregations for this aggregation. Only applies to bucket aggregations.
2060- * <p>
2061- * API name: {@code aggregations}
2062- * </p>
2063- *
2064- * <p>
2065- * Adds all elements of <code>map</code> to <code>aggregations</code>.
2066- * </p>
2067- */
2068- @ Nonnull
2069- public final ContainerBuilder aggregations (Map <String , Aggregation > map ) {
2070- Builder .this .aggregations = _mapPutAll (Builder .this .aggregations , map );
2071- return this ;
2072- }
2073-
2074- /**
2075- * Sub-aggregations for this aggregation. Only applies to bucket aggregations.
2076- * <p>
2077- * API name: {@code aggregations}
2078- * </p>
2079- *
2080- * <p>
2081- * Adds an entry to <code>aggregations</code>.
2082- * </p>
2083- */
2084- @ Nonnull
2085- public final ContainerBuilder aggregations (String key , Aggregation value ) {
2086- Builder .this .aggregations = _mapPut (Builder .this .aggregations , key , value );
2087- return this ;
2088- }
2089-
2090- /**
2091- * Sub-aggregations for this aggregation. Only applies to bucket aggregations.
2092- * <p>
2093- * API name: {@code aggregations}
2094- * </p>
2095- *
2096- * <p>
2097- * Adds a value to <code>aggregations</code> using a builder lambda.
2098- * </p>
2099- */
2100- @ Nonnull
2101- public final ContainerBuilder aggregations (String key , Function <Aggregation .Builder , ObjectBuilder <Aggregation >> fn ) {
2102- return aggregations (key , fn .apply (new Aggregation .Builder ()).build ());
2103- }
2104-
21051982 /**
21061983 * API name: {@code meta}
21071984 *
@@ -2136,7 +2013,6 @@ public Aggregation build() {
21362013 }
21372014
21382015 protected static void setupAggregationDeserializer (ObjectDeserializer <Builder > op ) {
2139- op .add (Builder ::aggregations , JsonpDeserializer .stringMapDeserializer (Aggregation ._DESERIALIZER ), "aggregations" , "aggs" );
21402016 op .add (Builder ::meta , JsonpDeserializer .stringMapDeserializer (JsonData ._DESERIALIZER ), "meta" );
21412017 op .add (Builder ::adjacencyMatrix , AdjacencyMatrixAggregation ._DESERIALIZER , "adjacency_matrix" );
21422018 op .add (Builder ::autoDateHistogram , AutoDateHistogramAggregation ._DESERIALIZER , "auto_date_histogram" );
@@ -2216,7 +2092,6 @@ public int hashCode() {
22162092 int result = 17 ;
22172093 result = 31 * result + Objects .hashCode (this ._kind );
22182094 result = 31 * result + Objects .hashCode (this ._value );
2219- result = 31 * result + Objects .hashCode (this .aggregations );
22202095 result = 31 * result + Objects .hashCode (this .meta );
22212096 return result ;
22222097 }
@@ -2228,7 +2103,6 @@ public boolean equals(Object o) {
22282103 Aggregation other = (Aggregation ) o ;
22292104 return Objects .equals (this ._kind , other ._kind )
22302105 && Objects .equals (this ._value , other ._value )
2231- && Objects .equals (this .aggregations , other .aggregations )
22322106 && Objects .equals (this .meta , other .meta );
22332107 }
22342108}
0 commit comments