@@ -55,7 +55,10 @@ public class ClusterNodeCount implements JsonpSerializable {
55
55
56
56
private final int ingest ;
57
57
58
- private final int clusterManager ;
58
+ @ Deprecated
59
+ private final Integer master ;
60
+
61
+ private final Integer clusterManager ;
59
62
60
63
private final int total ;
61
64
@@ -71,7 +74,8 @@ private ClusterNodeCount(Builder builder) {
71
74
this .coordinatingOnly = ApiTypeHelper .requireNonNull (builder .coordinatingOnly , this , "coordinatingOnly" );
72
75
this .data = ApiTypeHelper .requireNonNull (builder .data , this , "data" );
73
76
this .ingest = ApiTypeHelper .requireNonNull (builder .ingest , this , "ingest" );
74
- this .clusterManager = ApiTypeHelper .requireNonNull (builder .clusterManager , this , "clusterManager" );
77
+ this .master = builder .master ;
78
+ this .clusterManager = builder .clusterManager ;
75
79
this .total = ApiTypeHelper .requireNonNull (builder .total , this , "total" );
76
80
this .remoteClusterClient = ApiTypeHelper .requireNonNull (builder .remoteClusterClient , this , "remoteClusterClient" );
77
81
this .search = builder .search ;
@@ -103,7 +107,15 @@ public final int ingest() {
103
107
}
104
108
105
109
/**
106
- * Required - API name: {@code clusterManager}
110
+ * API name: {@code master}
111
+ */
112
+ @ Deprecated
113
+ public final int master () {
114
+ return this .master ;
115
+ }
116
+
117
+ /**
118
+ * API name: {@code clusterManager}
107
119
*/
108
120
public final int clusterManager () {
109
121
return this .clusterManager ;
@@ -151,8 +163,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
151
163
generator .writeKey ("ingest" );
152
164
generator .write (this .ingest );
153
165
154
- generator .writeKey ("cluster_manager" );
155
- generator .write (this .clusterManager );
166
+ if (this .master != null ) {
167
+ generator .writeKey ("master" );
168
+ generator .write (this .master );
169
+ }
170
+
171
+ if (this .clusterManager != null ) {
172
+ generator .writeKey ("cluster_manager" );
173
+ generator .write (this .clusterManager );
174
+ }
156
175
157
176
generator .writeKey ("total" );
158
177
generator .write (this .total );
@@ -180,6 +199,8 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder<C
180
199
181
200
private Integer ingest ;
182
201
202
+ private Integer master ;
203
+
183
204
private Integer clusterManager ;
184
205
185
206
private Integer total ;
@@ -213,7 +234,16 @@ public final Builder ingest(int value) {
213
234
}
214
235
215
236
/**
216
- * Required - API name: {@code clusterManager}
237
+ * API name: {@code master}
238
+ */
239
+ @ Deprecated
240
+ public final Builder master (int value ) {
241
+ this .master = value ;
242
+ return this ;
243
+ }
244
+
245
+ /**
246
+ * API name: {@code clusterManager}
217
247
*/
218
248
public final Builder clusterManager (int value ) {
219
249
this .clusterManager = value ;
@@ -273,6 +303,7 @@ protected static void setupClusterNodeCountDeserializer(ObjectDeserializer<Clust
273
303
op .add (Builder ::coordinatingOnly , JsonpDeserializer .integerDeserializer (), "coordinating_only" );
274
304
op .add (Builder ::data , JsonpDeserializer .integerDeserializer (), "data" );
275
305
op .add (Builder ::ingest , JsonpDeserializer .integerDeserializer (), "ingest" );
306
+ op .add (Builder ::master , JsonpDeserializer .integerDeserializer (), "master" );
276
307
op .add (Builder ::clusterManager , JsonpDeserializer .integerDeserializer (), "cluster_manager" );
277
308
op .add (Builder ::total , JsonpDeserializer .integerDeserializer (), "total" );
278
309
op .add (Builder ::remoteClusterClient , JsonpDeserializer .integerDeserializer (), "remote_cluster_client" );
0 commit comments