Skip to content

Commit

Permalink
Fix duped field
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Oct 2, 2024
1 parent 3a0cda6 commit ea3c9b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class ScaledFloatNumberProperty extends NumberPropertyBase implements PropertyVariant {

@Nullable
private final Boolean coerce;

@Nullable
private final Double nullValue;

Expand All @@ -67,7 +64,6 @@ public class ScaledFloatNumberProperty extends NumberPropertyBase implements Pro

private ScaledFloatNumberProperty(Builder builder) {
super(builder);
this.coerce = builder.coerce;
this.nullValue = builder.nullValue;
this.scalingFactor = builder.scalingFactor;
}
Expand All @@ -84,14 +80,6 @@ public Property.Kind _propertyKind() {
return Property.Kind.ScaledFloat;
}

/**
* API name: {@code coerce}
*/
@Nullable
public final Boolean coerce() {
return this.coerce;
}

/**
* API name: {@code null_value}
*/
Expand All @@ -111,11 +99,6 @@ public final Double scalingFactor() {
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write("type", "scaled_float");
super.serializeInternal(generator, mapper);
if (this.coerce != null) {
generator.writeKey("coerce");
generator.write(this.coerce);
}

if (this.nullValue != null) {
generator.writeKey("null_value");
generator.write(this.nullValue);
Expand All @@ -133,21 +116,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
* Builder for {@link ScaledFloatNumberProperty}.
*/
public static class Builder extends NumberPropertyBase.AbstractBuilder<Builder> implements ObjectBuilder<ScaledFloatNumberProperty> {
@Nullable
private Boolean coerce;
@Nullable
private Double nullValue;
@Nullable
private Double scalingFactor;

/**
* API name: {@code coerce}
*/
public final Builder coerce(@Nullable Boolean value) {
this.coerce = value;
return this;
}

/**
* API name: {@code null_value}
*/
Expand Down Expand Up @@ -193,7 +166,6 @@ public ScaledFloatNumberProperty build() {

protected static void setupScaledFloatNumberPropertyDeserializer(ObjectDeserializer<ScaledFloatNumberProperty.Builder> op) {
setupNumberPropertyBaseDeserializer(op);
op.add(Builder::coerce, JsonpDeserializer.booleanDeserializer(), "coerce");
op.add(Builder::nullValue, JsonpDeserializer.doubleDeserializer(), "null_value");
op.add(Builder::scalingFactor, JsonpDeserializer.doubleDeserializer(), "scaling_factor");

Expand All @@ -202,7 +174,6 @@ protected static void setupScaledFloatNumberPropertyDeserializer(ObjectDeseriali

public int hashCode() {
int result = super.hashCode();
result = 31 * result + Objects.hashCode(this.coerce);
result = 31 * result + Objects.hashCode(this.nullValue);
result = 31 * result + Objects.hashCode(this.scalingFactor);
return result;
Expand All @@ -215,8 +186,6 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || this.getClass() != o.getClass()) return false;
ScaledFloatNumberProperty other = (ScaledFloatNumberProperty) o;
return Objects.equals(this.coerce, other.coerce)
&& Objects.equals(this.nullValue, other.nullValue)
&& Objects.equals(this.scalingFactor, other.scalingFactor);
return Objects.equals(this.nullValue, other.nullValue) && Objects.equals(this.scalingFactor, other.scalingFactor);
}
}
2 changes: 0 additions & 2 deletions java-codegen/opensearch-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38208,8 +38208,6 @@ components:
scaling_factor:
type: number
format: double
coerce:
type: boolean
required:
- type
_common.mapping:SearchAsYouTypeProperty:
Expand Down

0 comments on commit ea3c9b4

Please sign in to comment.