diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/SegmentReplicationStats.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/SegmentReplicationStats.java index d62f9ae0b..bf27a2334 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/SegmentReplicationStats.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/SegmentReplicationStats.java @@ -40,6 +40,7 @@ import java.util.function.Function; import javax.annotation.Generated; import javax.annotation.Nonnull; +import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -61,11 +62,14 @@ public class SegmentReplicationStats PlainJsonSerializable, ToCopyableBuilder { - private final long maxBytesBehind; + @Nonnull + private final JsonData maxBytesBehind; - private final long maxReplicationLag; + @Nonnull + private final JsonData maxReplicationLag; - private final long totalBytesBehind; + @Nonnull + private final JsonData totalBytesBehind; // --------------------------------------------------------------------------------------------- @@ -82,21 +86,24 @@ public static SegmentReplicationStats of(Function { - private Long maxBytesBehind; - private Long maxReplicationLag; - private Long totalBytesBehind; + private JsonData maxBytesBehind; + private JsonData maxReplicationLag; + private JsonData totalBytesBehind; public Builder() {} @@ -166,7 +173,7 @@ public Builder copy() { * Required - API name: {@code max_bytes_behind} */ @Nonnull - public final Builder maxBytesBehind(long value) { + public final Builder maxBytesBehind(JsonData value) { this.maxBytesBehind = value; return this; } @@ -175,7 +182,7 @@ public final Builder maxBytesBehind(long value) { * Required - API name: {@code max_replication_lag} */ @Nonnull - public final Builder maxReplicationLag(long value) { + public final Builder maxReplicationLag(JsonData value) { this.maxReplicationLag = value; return this; } @@ -184,7 +191,7 @@ public final Builder maxReplicationLag(long value) { * Required - API name: {@code total_bytes_behind} */ @Nonnull - public final Builder totalBytesBehind(long value) { + public final Builder totalBytesBehind(JsonData value) { this.totalBytesBehind = value; return this; } @@ -214,17 +221,17 @@ public SegmentReplicationStats build() { ); protected static void setupSegmentReplicationStatsDeserializer(ObjectDeserializer op) { - op.add(Builder::maxBytesBehind, JsonpDeserializer.longDeserializer(), "max_bytes_behind"); - op.add(Builder::maxReplicationLag, JsonpDeserializer.longDeserializer(), "max_replication_lag"); - op.add(Builder::totalBytesBehind, JsonpDeserializer.longDeserializer(), "total_bytes_behind"); + op.add(Builder::maxBytesBehind, JsonData._DESERIALIZER, "max_bytes_behind"); + op.add(Builder::maxReplicationLag, JsonData._DESERIALIZER, "max_replication_lag"); + op.add(Builder::totalBytesBehind, JsonData._DESERIALIZER, "total_bytes_behind"); } @Override public int hashCode() { int result = 17; - result = 31 * result + Long.hashCode(this.maxBytesBehind); - result = 31 * result + Long.hashCode(this.maxReplicationLag); - result = 31 * result + Long.hashCode(this.totalBytesBehind); + result = 31 * result + this.maxBytesBehind.hashCode(); + result = 31 * result + this.maxReplicationLag.hashCode(); + result = 31 * result + this.totalBytesBehind.hashCode(); return result; } @@ -233,8 +240,8 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || this.getClass() != o.getClass()) return false; SegmentReplicationStats other = (SegmentReplicationStats) o; - return this.maxBytesBehind == other.maxBytesBehind - && this.maxReplicationLag == other.maxReplicationLag - && this.totalBytesBehind == other.totalBytesBehind; + return this.maxBytesBehind.equals(other.maxBytesBehind) + && this.maxReplicationLag.equals(other.maxReplicationLag) + && this.totalBytesBehind.equals(other.totalBytesBehind); } } diff --git a/java-codegen/opensearch-openapi.yaml b/java-codegen/opensearch-openapi.yaml index 592afbf71..b9267937a 100644 --- a/java-codegen/opensearch-openapi.yaml +++ b/java-codegen/opensearch-openapi.yaml @@ -33906,18 +33906,34 @@ components: - dfs_query_then_fetch - query_then_fetch _common___SegmentReplicationStats: - type: object - properties: - max_bytes_behind: - $ref: '#/components/schemas/_common___ByteCount' - max_replication_lag: - $ref: '#/components/schemas/_common___ByteCount' - total_bytes_behind: - $ref: '#/components/schemas/_common___ByteCount' - required: - - max_bytes_behind - - max_replication_lag - - total_bytes_behind + oneOf: + - x-version-added: 2.10.0 + x-version-removed: 2.12.0 + type: object + properties: + max_bytes_behind: + $ref: '#/components/schemas/_common___HumanReadableByteCount' + max_replication_lag: + $ref: '#/components/schemas/_common___Duration' + total_bytes_behind: + $ref: '#/components/schemas/_common___HumanReadableByteCount' + required: + - max_bytes_behind + - max_replication_lag + - total_bytes_behind + - x-version-added: 2.12.0 + type: object + properties: + max_bytes_behind: + $ref: '#/components/schemas/_common___ByteCount' + max_replication_lag: + $ref: '#/components/schemas/_common___DurationValueUnitMillis' + total_bytes_behind: + $ref: '#/components/schemas/_common___ByteCount' + required: + - max_bytes_behind + - max_replication_lag + - total_bytes_behind _common___SegmentsStats: type: object properties: