Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing missing required property exception for cluster manager for 1.… #851

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public class ClusterNodeCount implements JsonpSerializable {

private final int ingest;

private final int clusterManager;
@Deprecated
private final Integer master;

private final Integer clusterManager;

private final int total;

Expand All @@ -71,7 +74,8 @@ private ClusterNodeCount(Builder builder) {
this.coordinatingOnly = ApiTypeHelper.requireNonNull(builder.coordinatingOnly, this, "coordinatingOnly");
this.data = ApiTypeHelper.requireNonNull(builder.data, this, "data");
this.ingest = ApiTypeHelper.requireNonNull(builder.ingest, this, "ingest");
this.clusterManager = ApiTypeHelper.requireNonNull(builder.clusterManager, this, "clusterManager");
this.master = builder.master;
this.clusterManager = builder.clusterManager;
this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total");
this.remoteClusterClient = ApiTypeHelper.requireNonNull(builder.remoteClusterClient, this, "remoteClusterClient");
this.search = builder.search;
Expand Down Expand Up @@ -103,7 +107,15 @@ public final int ingest() {
}

/**
* Required - API name: {@code clusterManager}
* API name: {@code master}
*/
@Deprecated
public final int master() {
return this.master;
}

/**
* API name: {@code clusterManager}
*/
public final int clusterManager() {
return this.clusterManager;
Expand Down Expand Up @@ -151,8 +163,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("ingest");
generator.write(this.ingest);

generator.writeKey("cluster_manager");
generator.write(this.clusterManager);
if (this.master != null) {
generator.writeKey("master");
generator.write(this.master);
}

if (this.clusterManager != null) {
generator.writeKey("cluster_manager");
generator.write(this.clusterManager);
}

generator.writeKey("total");
generator.write(this.total);
Expand Down Expand Up @@ -180,6 +199,8 @@ public static class Builder extends ObjectBuilderBase implements ObjectBuilder<C

private Integer ingest;

private Integer master;

private Integer clusterManager;

private Integer total;
Expand Down Expand Up @@ -213,7 +234,16 @@ public final Builder ingest(int value) {
}

/**
* Required - API name: {@code clusterManager}
* API name: {@code master}
*/
@Deprecated
public final Builder master(int value) {
this.master = value;
return this;
}

/**
* API name: {@code clusterManager}
*/
public final Builder clusterManager(int value) {
this.clusterManager = value;
Expand Down Expand Up @@ -273,6 +303,7 @@ protected static void setupClusterNodeCountDeserializer(ObjectDeserializer<Clust
op.add(Builder::coordinatingOnly, JsonpDeserializer.integerDeserializer(), "coordinating_only");
op.add(Builder::data, JsonpDeserializer.integerDeserializer(), "data");
op.add(Builder::ingest, JsonpDeserializer.integerDeserializer(), "ingest");
op.add(Builder::master, JsonpDeserializer.integerDeserializer(), "master");
op.add(Builder::clusterManager, JsonpDeserializer.integerDeserializer(), "cluster_manager");
op.add(Builder::total, JsonpDeserializer.integerDeserializer(), "total");
op.add(Builder::remoteClusterClient, JsonpDeserializer.integerDeserializer(), "remote_cluster_client");
Expand Down
Loading