diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java similarity index 83% rename from java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java rename to java-client/src/generated/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java index d6851e85f1..95e097b0d1 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/CoordsGeoBounds.java @@ -30,10 +30,15 @@ * GitHub history for details. */ +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + package org.opensearch.client.opensearch._types; import jakarta.json.stream.JsonGenerator; import java.util.function.Function; +import javax.annotation.Generated; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -47,8 +52,8 @@ // typedef: _types.CoordsGeoBounds @JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") public class CoordsGeoBounds implements PlainJsonSerializable { - private final double top; private final double bottom; @@ -56,28 +61,21 @@ public class CoordsGeoBounds implements PlainJsonSerializable { private final double right; + private final double top; + // --------------------------------------------------------------------------------------------- private CoordsGeoBounds(Builder builder) { - - this.top = ApiTypeHelper.requireNonNull(builder.top, this, "top"); this.bottom = ApiTypeHelper.requireNonNull(builder.bottom, this, "bottom"); this.left = ApiTypeHelper.requireNonNull(builder.left, this, "left"); this.right = ApiTypeHelper.requireNonNull(builder.right, this, "right"); - + this.top = ApiTypeHelper.requireNonNull(builder.top, this, "top"); } - public static CoordsGeoBounds of(Function> fn) { + public static CoordsGeoBounds of(Function> fn) { return fn.apply(new Builder()).build(); } - /** - * Required - API name: {@code top} - */ - public final double top() { - return this.top; - } - /** * Required - API name: {@code bottom} */ @@ -99,9 +97,17 @@ public final double right() { return this.right; } + /** + * Required - API name: {@code top} + */ + public final double top() { + return this.top; + } + /** * Serialize this object to JSON. */ + @Override public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); serializeInternal(generator, mapper); @@ -109,10 +115,6 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("top"); - generator.write(this.top); - generator.writeKey("bottom"); generator.write(this.bottom); @@ -122,6 +124,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("right"); generator.write(this.right); + generator.writeKey("top"); + generator.write(this.top); } // --------------------------------------------------------------------------------------------- @@ -129,23 +133,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { /** * Builder for {@link CoordsGeoBounds}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private Double top; - private Double bottom; - private Double left; - private Double right; - - /** - * Required - API name: {@code top} - */ - public final Builder top(double value) { - this.top = value; - return this; - } + private Double top; /** * Required - API name: {@code bottom} @@ -171,11 +163,18 @@ public final Builder right(double value) { return this; } + /** + * Required - API name: {@code top} + */ + public final Builder top(double value) { + this.top = value; + return this; + } + /** * Builds a {@link CoordsGeoBounds}. * - * @throws NullPointerException - * if some of the required fields are null. + * @throws NullPointerException if some of the required fields are null. */ public CoordsGeoBounds build() { _checkSingleUse(); @@ -195,12 +194,25 @@ public CoordsGeoBounds build() { ); protected static void setupCoordsGeoBoundsDeserializer(ObjectDeserializer op) { - - op.add(Builder::top, JsonpDeserializer.doubleDeserializer(), "top"); op.add(Builder::bottom, JsonpDeserializer.doubleDeserializer(), "bottom"); op.add(Builder::left, JsonpDeserializer.doubleDeserializer(), "left"); op.add(Builder::right, JsonpDeserializer.doubleDeserializer(), "right"); + op.add(Builder::top, JsonpDeserializer.doubleDeserializer(), "top"); + } + public int hashCode() { + int result = 17; + result = 31 * result + Double.hashCode(this.bottom); + result = 31 * result + Double.hashCode(this.left); + result = 31 * result + Double.hashCode(this.right); + result = 31 * result + Double.hashCode(this.top); + return result; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + CoordsGeoBounds other = (CoordsGeoBounds) o; + return this.bottom == other.bottom && this.left == other.left && this.right == other.right && this.top == other.top; + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/GeoBounds.java similarity index 82% rename from java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java rename to java-client/src/generated/java/org/opensearch/client/opensearch/_types/GeoBounds.java index 56f23b35d9..11fabd58d2 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBounds.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/GeoBounds.java @@ -30,14 +30,21 @@ * GitHub history for details. */ +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + package org.opensearch.client.opensearch._types; import jakarta.json.stream.JsonGenerator; +import java.util.Objects; import java.util.function.Function; +import javax.annotation.Generated; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; +import org.opensearch.client.json.PlainJsonSerializable; import org.opensearch.client.json.UnionDeserializer; import org.opensearch.client.util.ApiTypeHelper; import org.opensearch.client.util.ObjectBuilder; @@ -48,24 +55,27 @@ // typedef: _types.GeoBounds /** + *

* A geo bounding box. It can be represented in various ways: + *

*
    *
  • as 4 top/bottom/left/right coordinates
  • *
  • as 2 top_left / bottom_right points
  • *
  • as 2 top_right / bottom_left points
  • - *
  • as a WKT bounding box
  • + *
  • as a WKT bounding box.
  • *
- * */ @JsonpDeserializable -public class GeoBounds implements TaggedUnion, JsonpSerializable { - +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class GeoBounds implements TaggedUnion, PlainJsonSerializable { + /** + * {@link GeoBounds} variant kinds. + */ public enum Kind { Coords, Tlbr, Trbl, Wkt - } private final Kind _kind; @@ -87,13 +97,11 @@ private GeoBounds(Kind kind, Object value) { } private GeoBounds(Builder builder) { - this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); - } - public static GeoBounds of(Function> fn) { + public static GeoBounds of(Function> fn) { return fn.apply(new Builder()).build(); } @@ -107,8 +115,7 @@ public boolean isCoords() { /** * Get the {@code coords} variant value. * - * @throws IllegalStateException - * if the current variant is not of the {@code coords} kind. + * @throws IllegalStateException if the current variant is not the {@code coords} kind. */ public CoordsGeoBounds coords() { return TaggedUnionUtils.get(this, Kind.Coords); @@ -124,8 +131,7 @@ public boolean isTlbr() { /** * Get the {@code tlbr} variant value. * - * @throws IllegalStateException - * if the current variant is not of the {@code tlbr} kind. + * @throws IllegalStateException if the current variant is not the {@code tlbr} kind. */ public TopLeftBottomRightGeoBounds tlbr() { return TaggedUnionUtils.get(this, Kind.Tlbr); @@ -141,8 +147,7 @@ public boolean isTrbl() { /** * Get the {@code trbl} variant value. * - * @throws IllegalStateException - * if the current variant is not of the {@code trbl} kind. + * @throws IllegalStateException if the current variant is not the {@code trbl} kind. */ public TopRightBottomLeftGeoBounds trbl() { return TaggedUnionUtils.get(this, Kind.Trbl); @@ -158,8 +163,7 @@ public boolean isWkt() { /** * Get the {@code wkt} variant value. * - * @throws IllegalStateException - * if the current variant is not of the {@code wkt} kind. + * @throws IllegalStateException if the current variant is not the {@code wkt} kind. */ public WktGeoBounds wkt() { return TaggedUnionUtils.get(this, Kind.Wkt); @@ -170,7 +174,6 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { if (_value instanceof JsonpSerializable) { ((JsonpSerializable) _value).serialize(generator, mapper); } - } public static class Builder extends ObjectBuilderBase implements ObjectBuilder { @@ -217,11 +220,11 @@ public ObjectBuilder wkt(Function buildGeoBoundsDeserializer() { @@ -236,4 +239,18 @@ private static JsonpDeserializer buildGeoBoundsDeserializer() { } public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer.lazy(GeoBounds::buildGeoBoundsDeserializer); + + public int hashCode() { + int result = 17; + result = 31 * result + Objects.hashCode(this._kind); + result = 31 * result + Objects.hashCode(this._value); + return result; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + GeoBounds other = (GeoBounds) o; + return Objects.equals(this._kind, other._kind) && Objects.equals(this._value, other._value); + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java similarity index 85% rename from java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java rename to java-client/src/generated/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java index 614522f557..55706b8502 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/GeoBoundsBuilders.java @@ -30,33 +30,37 @@ * GitHub history for details. */ +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + package org.opensearch.client.opensearch._types; +import javax.annotation.Generated; + /** * Builders for {@link GeoBounds} variants. */ +@Generated("org.opensearch.client.codegen.CodeGenerator") public class GeoBoundsBuilders { private GeoBoundsBuilders() {} /** - * Creates a builder for the {@link CoordsGeoBounds coords} {@code GeoBounds} - * variant. + * Creates a builder for the {@link CoordsGeoBounds coords} {@code GeoBounds} variant. */ public static CoordsGeoBounds.Builder coords() { return new CoordsGeoBounds.Builder(); } /** - * Creates a builder for the {@link TopLeftBottomRightGeoBounds tlbr} - * {@code GeoBounds} variant. + * Creates a builder for the {@link TopLeftBottomRightGeoBounds tlbr} {@code GeoBounds} variant. */ public static TopLeftBottomRightGeoBounds.Builder tlbr() { return new TopLeftBottomRightGeoBounds.Builder(); } /** - * Creates a builder for the {@link TopRightBottomLeftGeoBounds trbl} - * {@code GeoBounds} variant. + * Creates a builder for the {@link TopRightBottomLeftGeoBounds trbl} {@code GeoBounds} variant. */ public static TopRightBottomLeftGeoBounds.Builder trbl() { return new TopRightBottomLeftGeoBounds.Builder(); @@ -68,5 +72,4 @@ public static TopRightBottomLeftGeoBounds.Builder trbl() { public static WktGeoBounds.Builder wkt() { return new WktGeoBounds.Builder(); } - } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java similarity index 80% rename from java-client/src/main/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java rename to java-client/src/generated/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java index 6d1b7e1ba8..015b2cb9d8 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/TopLeftBottomRightGeoBounds.java @@ -30,10 +30,16 @@ * GitHub history for details. */ +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + package org.opensearch.client.opensearch._types; import jakarta.json.stream.JsonGenerator; import java.util.function.Function; +import javax.annotation.Generated; +import javax.annotation.Nonnull; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -47,41 +53,48 @@ // typedef: _types.TopLeftBottomRightGeoBounds @JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") public class TopLeftBottomRightGeoBounds implements PlainJsonSerializable { - private final GeoLocation topLeft; + @Nonnull private final GeoLocation bottomRight; + @Nonnull + private final GeoLocation topLeft; + // --------------------------------------------------------------------------------------------- private TopLeftBottomRightGeoBounds(Builder builder) { - - this.topLeft = ApiTypeHelper.requireNonNull(builder.topLeft, this, "topLeft"); this.bottomRight = ApiTypeHelper.requireNonNull(builder.bottomRight, this, "bottomRight"); - + this.topLeft = ApiTypeHelper.requireNonNull(builder.topLeft, this, "topLeft"); } - public static TopLeftBottomRightGeoBounds of(Function> fn) { + public static TopLeftBottomRightGeoBounds of( + Function> fn + ) { return fn.apply(new Builder()).build(); } /** - * Required - API name: {@code top_left} + * Required - API name: {@code bottom_right} */ - public final GeoLocation topLeft() { - return this.topLeft; + @Nonnull + public final GeoLocation bottomRight() { + return this.bottomRight; } /** - * Required - API name: {@code bottom_right} + * Required - API name: {@code top_left} */ - public final GeoLocation bottomRight() { - return this.bottomRight; + @Nonnull + public final GeoLocation topLeft() { + return this.topLeft; } /** * Serialize this object to JSON. */ + @Override public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); serializeInternal(generator, mapper); @@ -89,13 +102,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("top_left"); - this.topLeft.serialize(generator, mapper); - generator.writeKey("bottom_right"); this.bottomRight.serialize(generator, mapper); + generator.writeKey("top_left"); + this.topLeft.serialize(generator, mapper); } // --------------------------------------------------------------------------------------------- @@ -103,47 +114,44 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { /** * Builder for {@link TopLeftBottomRightGeoBounds}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private GeoLocation topLeft; - private GeoLocation bottomRight; + private GeoLocation topLeft; /** - * Required - API name: {@code top_left} + * Required - API name: {@code bottom_right} */ - public final Builder topLeft(GeoLocation value) { - this.topLeft = value; + public final Builder bottomRight(GeoLocation value) { + this.bottomRight = value; return this; } /** - * Required - API name: {@code top_left} + * Required - API name: {@code bottom_right} */ - public final Builder topLeft(Function> fn) { - return this.topLeft(fn.apply(new GeoLocation.Builder()).build()); + public final Builder bottomRight(Function> fn) { + return bottomRight(fn.apply(new GeoLocation.Builder()).build()); } /** - * Required - API name: {@code bottom_right} + * Required - API name: {@code top_left} */ - public final Builder bottomRight(GeoLocation value) { - this.bottomRight = value; + public final Builder topLeft(GeoLocation value) { + this.topLeft = value; return this; } /** - * Required - API name: {@code bottom_right} + * Required - API name: {@code top_left} */ - public final Builder bottomRight(Function> fn) { - return this.bottomRight(fn.apply(new GeoLocation.Builder()).build()); + public final Builder topLeft(Function> fn) { + return topLeft(fn.apply(new GeoLocation.Builder()).build()); } /** * Builds a {@link TopLeftBottomRightGeoBounds}. * - * @throws NullPointerException - * if some of the required fields are null. + * @throws NullPointerException if some of the required fields are null. */ public TopLeftBottomRightGeoBounds build() { _checkSingleUse(); @@ -163,10 +171,21 @@ public TopLeftBottomRightGeoBounds build() { ); protected static void setupTopLeftBottomRightGeoBoundsDeserializer(ObjectDeserializer op) { - - op.add(Builder::topLeft, GeoLocation._DESERIALIZER, "top_left"); op.add(Builder::bottomRight, GeoLocation._DESERIALIZER, "bottom_right"); + op.add(Builder::topLeft, GeoLocation._DESERIALIZER, "top_left"); + } + public int hashCode() { + int result = 17; + result = 31 * result + this.bottomRight.hashCode(); + result = 31 * result + this.topLeft.hashCode(); + return result; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + TopLeftBottomRightGeoBounds other = (TopLeftBottomRightGeoBounds) o; + return this.bottomRight.equals(other.bottomRight) && this.topLeft.equals(other.topLeft); + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java similarity index 80% rename from java-client/src/main/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java rename to java-client/src/generated/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java index c662800744..6131c57dc6 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/TopRightBottomLeftGeoBounds.java @@ -30,10 +30,16 @@ * GitHub history for details. */ +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + package org.opensearch.client.opensearch._types; import jakarta.json.stream.JsonGenerator; import java.util.function.Function; +import javax.annotation.Generated; +import javax.annotation.Nonnull; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -47,41 +53,48 @@ // typedef: _types.TopRightBottomLeftGeoBounds @JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") public class TopRightBottomLeftGeoBounds implements PlainJsonSerializable { - private final GeoLocation topRight; + @Nonnull private final GeoLocation bottomLeft; + @Nonnull + private final GeoLocation topRight; + // --------------------------------------------------------------------------------------------- private TopRightBottomLeftGeoBounds(Builder builder) { - - this.topRight = ApiTypeHelper.requireNonNull(builder.topRight, this, "topRight"); this.bottomLeft = ApiTypeHelper.requireNonNull(builder.bottomLeft, this, "bottomLeft"); - + this.topRight = ApiTypeHelper.requireNonNull(builder.topRight, this, "topRight"); } - public static TopRightBottomLeftGeoBounds of(Function> fn) { + public static TopRightBottomLeftGeoBounds of( + Function> fn + ) { return fn.apply(new Builder()).build(); } /** - * Required - API name: {@code top_right} + * Required - API name: {@code bottom_left} */ - public final GeoLocation topRight() { - return this.topRight; + @Nonnull + public final GeoLocation bottomLeft() { + return this.bottomLeft; } /** - * Required - API name: {@code bottom_left} + * Required - API name: {@code top_right} */ - public final GeoLocation bottomLeft() { - return this.bottomLeft; + @Nonnull + public final GeoLocation topRight() { + return this.topRight; } /** * Serialize this object to JSON. */ + @Override public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); serializeInternal(generator, mapper); @@ -89,13 +102,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - generator.writeKey("top_right"); - this.topRight.serialize(generator, mapper); - generator.writeKey("bottom_left"); this.bottomLeft.serialize(generator, mapper); + generator.writeKey("top_right"); + this.topRight.serialize(generator, mapper); } // --------------------------------------------------------------------------------------------- @@ -103,47 +114,44 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { /** * Builder for {@link TopRightBottomLeftGeoBounds}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { - private GeoLocation topRight; - private GeoLocation bottomLeft; + private GeoLocation topRight; /** - * Required - API name: {@code top_right} + * Required - API name: {@code bottom_left} */ - public final Builder topRight(GeoLocation value) { - this.topRight = value; + public final Builder bottomLeft(GeoLocation value) { + this.bottomLeft = value; return this; } /** - * Required - API name: {@code top_right} + * Required - API name: {@code bottom_left} */ - public final Builder topRight(Function> fn) { - return this.topRight(fn.apply(new GeoLocation.Builder()).build()); + public final Builder bottomLeft(Function> fn) { + return bottomLeft(fn.apply(new GeoLocation.Builder()).build()); } /** - * Required - API name: {@code bottom_left} + * Required - API name: {@code top_right} */ - public final Builder bottomLeft(GeoLocation value) { - this.bottomLeft = value; + public final Builder topRight(GeoLocation value) { + this.topRight = value; return this; } /** - * Required - API name: {@code bottom_left} + * Required - API name: {@code top_right} */ - public final Builder bottomLeft(Function> fn) { - return this.bottomLeft(fn.apply(new GeoLocation.Builder()).build()); + public final Builder topRight(Function> fn) { + return topRight(fn.apply(new GeoLocation.Builder()).build()); } /** * Builds a {@link TopRightBottomLeftGeoBounds}. * - * @throws NullPointerException - * if some of the required fields are null. + * @throws NullPointerException if some of the required fields are null. */ public TopRightBottomLeftGeoBounds build() { _checkSingleUse(); @@ -163,10 +171,21 @@ public TopRightBottomLeftGeoBounds build() { ); protected static void setupTopRightBottomLeftGeoBoundsDeserializer(ObjectDeserializer op) { - - op.add(Builder::topRight, GeoLocation._DESERIALIZER, "top_right"); op.add(Builder::bottomLeft, GeoLocation._DESERIALIZER, "bottom_left"); + op.add(Builder::topRight, GeoLocation._DESERIALIZER, "top_right"); + } + public int hashCode() { + int result = 17; + result = 31 * result + this.bottomLeft.hashCode(); + result = 31 * result + this.topRight.hashCode(); + return result; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + TopRightBottomLeftGeoBounds other = (TopRightBottomLeftGeoBounds) o; + return this.bottomLeft.equals(other.bottomLeft) && this.topRight.equals(other.topRight); + } } diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java similarity index 81% rename from java-client/src/main/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java rename to java-client/src/generated/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java index 4a17c9fda1..6ca51f1b54 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/WktGeoBounds.java @@ -30,10 +30,16 @@ * GitHub history for details. */ +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + package org.opensearch.client.opensearch._types; import jakarta.json.stream.JsonGenerator; import java.util.function.Function; +import javax.annotation.Generated; +import javax.annotation.Nonnull; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -47,24 +53,26 @@ // typedef: _types.WktGeoBounds @JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") public class WktGeoBounds implements PlainJsonSerializable { + + @Nonnull private final String wkt; // --------------------------------------------------------------------------------------------- private WktGeoBounds(Builder builder) { - this.wkt = ApiTypeHelper.requireNonNull(builder.wkt, this, "wkt"); - } - public static WktGeoBounds of(Function> fn) { + public static WktGeoBounds of(Function> fn) { return fn.apply(new Builder()).build(); } /** * Required - API name: {@code wkt} */ + @Nonnull public final String wkt() { return this.wkt; } @@ -72,6 +80,7 @@ public final String wkt() { /** * Serialize this object to JSON. */ + @Override public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); serializeInternal(generator, mapper); @@ -79,10 +88,8 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("wkt"); generator.write(this.wkt); - } // --------------------------------------------------------------------------------------------- @@ -90,7 +97,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { /** * Builder for {@link WktGeoBounds}. */ - public static class Builder extends ObjectBuilderBase implements ObjectBuilder { private String wkt; @@ -105,8 +111,7 @@ public final Builder wkt(String value) { /** * Builds a {@link WktGeoBounds}. * - * @throws NullPointerException - * if some of the required fields are null. + * @throws NullPointerException if some of the required fields are null. */ public WktGeoBounds build() { _checkSingleUse(); @@ -126,9 +131,19 @@ public WktGeoBounds build() { ); protected static void setupWktGeoBoundsDeserializer(ObjectDeserializer op) { - op.add(Builder::wkt, JsonpDeserializer.stringDeserializer(), "wkt"); + } + public int hashCode() { + int result = 17; + result = 31 * result + this.wkt.hashCode(); + return result; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + WktGeoBounds other = (WktGeoBounds) o; + return this.wkt.equals(other.wkt); + } } diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java index f68df0ce7e..201eef4d24 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/mapping/KnnVectorProperty.java @@ -69,6 +69,9 @@ public class KnnVectorProperty extends DocValuesPropertyBase implements Property @Nullable private final String mode; + @Nullable + private final String modelId; + @Nullable private final String spaceType; @@ -81,6 +84,7 @@ private KnnVectorProperty(Builder builder) { this.dimension = ApiTypeHelper.requireNonNull(builder.dimension, this, "dimension"); this.method = builder.method; this.mode = builder.mode; + this.modelId = builder.modelId; this.spaceType = builder.spaceType; } @@ -135,6 +139,14 @@ public final String mode() { return this.mode; } + /** + * API name: {@code model_id} + */ + @Nullable + public final String modelId() { + return this.modelId; + } + /** * API name: {@code space_type} */ @@ -169,6 +181,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.mode); } + if (this.modelId != null) { + generator.writeKey("model_id"); + generator.write(this.modelId); + } + if (this.spaceType != null) { generator.writeKey("space_type"); generator.write(this.spaceType); @@ -191,6 +208,8 @@ public static class Builder extends DocValuesPropertyBase.AbstractBuilder