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

Re-generated client code using latest OpenSearch API specification #1465

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
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 @@ -87,6 +87,9 @@ public class PluginStats implements PlainJsonSerializable, ToCopyableBuilder<Plu
@Nonnull
private final String opensearchVersion;

@Nonnull
private final List<String> optionalExtendedPlugins;

@Nonnull
private final String version;

Expand All @@ -102,6 +105,7 @@ private PluginStats(Builder builder) {
this.licensed = builder.licensed;
this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name");
this.opensearchVersion = ApiTypeHelper.requireNonNull(builder.opensearchVersion, this, "opensearchVersion");
this.optionalExtendedPlugins = ApiTypeHelper.unmodifiable(builder.optionalExtendedPlugins);
this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version");
}

Expand Down Expand Up @@ -180,6 +184,14 @@ public final String opensearchVersion() {
return this.opensearchVersion;
}

/**
* API name: {@code optional_extended_plugins}
*/
@Nonnull
public final List<String> optionalExtendedPlugins() {
return this.optionalExtendedPlugins;
}

/**
* Required - API name: {@code version}
*/
Expand Down Expand Up @@ -234,6 +246,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("opensearch_version");
generator.write(this.opensearchVersion);

if (ApiTypeHelper.isDefined(this.optionalExtendedPlugins)) {
generator.writeKey("optional_extended_plugins");
generator.writeStartArray();
for (String item0 : this.optionalExtendedPlugins) {
generator.write(item0);
}
generator.writeEnd();
}

generator.writeKey("version");
generator.write(this.version);
}
Expand Down Expand Up @@ -266,6 +287,8 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
private Boolean licensed;
private String name;
private String opensearchVersion;
@Nullable
private List<String> optionalExtendedPlugins;
private String version;

public Builder() {}
Expand All @@ -280,6 +303,7 @@ private Builder(PluginStats o) {
this.licensed = o.licensed;
this.name = o.name;
this.opensearchVersion = o.opensearchVersion;
this.optionalExtendedPlugins = _listCopy(o.optionalExtendedPlugins);
this.version = o.version;
}

Expand All @@ -293,6 +317,7 @@ private Builder(Builder o) {
this.licensed = o.licensed;
this.name = o.name;
this.opensearchVersion = o.opensearchVersion;
this.optionalExtendedPlugins = _listCopy(o.optionalExtendedPlugins);
this.version = o.version;
}

Expand Down Expand Up @@ -400,6 +425,32 @@ public final Builder opensearchVersion(String value) {
return this;
}

/**
* API name: {@code optional_extended_plugins}
*
* <p>
* Adds all elements of <code>list</code> to <code>optionalExtendedPlugins</code>.
* </p>
*/
@Nonnull
public final Builder optionalExtendedPlugins(List<String> list) {
this.optionalExtendedPlugins = _listAddAll(this.optionalExtendedPlugins, list);
return this;
}

/**
* API name: {@code optional_extended_plugins}
*
* <p>
* Adds one or more values to <code>optionalExtendedPlugins</code>.
* </p>
*/
@Nonnull
public final Builder optionalExtendedPlugins(String value, String... values) {
this.optionalExtendedPlugins = _listAdd(this.optionalExtendedPlugins, value, values);
return this;
}

/**
* Required - API name: {@code version}
*/
Expand Down Expand Up @@ -443,6 +494,11 @@ protected static void setupPluginStatsDeserializer(ObjectDeserializer<PluginStat
op.add(Builder::licensed, JsonpDeserializer.booleanDeserializer(), "licensed");
op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name");
op.add(Builder::opensearchVersion, JsonpDeserializer.stringDeserializer(), "opensearch_version");
op.add(
Builder::optionalExtendedPlugins,
JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()),
"optional_extended_plugins"
);
op.add(Builder::version, JsonpDeserializer.stringDeserializer(), "version");
}

Expand All @@ -458,6 +514,7 @@ public int hashCode() {
result = 31 * result + Objects.hashCode(this.licensed);
result = 31 * result + this.name.hashCode();
result = 31 * result + this.opensearchVersion.hashCode();
result = 31 * result + Objects.hashCode(this.optionalExtendedPlugins);
result = 31 * result + this.version.hashCode();
return result;
}
Expand All @@ -476,6 +533,7 @@ public boolean equals(Object o) {
&& Objects.equals(this.licensed, other.licensed)
&& this.name.equals(other.name)
&& this.opensearchVersion.equals(other.opensearchVersion)
&& Objects.equals(this.optionalExtendedPlugins, other.optionalExtendedPlugins)
&& this.version.equals(other.version);
}
}
Loading
Loading