Skip to content

Commit

Permalink
Cleanup SourceFieldMode
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Oct 31, 2024
1 parent 5634da2 commit 7347a68
Show file tree
Hide file tree
Showing 3 changed files with 559 additions and 147 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ public class SourceField implements PlainJsonSerializable {
@Nonnull
private final List<String> includes;

@Nullable
private final SourceFieldMode mode;

// ---------------------------------------------------------------------------------------------

private SourceField(Builder builder) {
Expand All @@ -86,7 +83,6 @@ private SourceField(Builder builder) {
this.enabled = builder.enabled;
this.excludes = ApiTypeHelper.unmodifiable(builder.excludes);
this.includes = ApiTypeHelper.unmodifiable(builder.includes);
this.mode = builder.mode;
}

public static SourceField of(Function<SourceField.Builder, ObjectBuilder<SourceField>> fn) {
Expand Down Expand Up @@ -133,14 +129,6 @@ public final List<String> includes() {
return this.includes;
}

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

/**
* Serialize this object to JSON.
*/
Expand Down Expand Up @@ -184,11 +172,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
}
generator.writeEnd();
}

if (this.mode != null) {
generator.writeKey("mode");
this.mode.serialize(generator, mapper);
}
}

// ---------------------------------------------------------------------------------------------
Expand All @@ -212,8 +195,6 @@ public Builder self() {
private List<String> excludes;
@Nullable
private List<String> includes;
@Nullable
private SourceFieldMode mode;

/**
* API name: {@code compress}
Expand Down Expand Up @@ -287,14 +268,6 @@ public final Builder includes(String value, String... values) {
return this;
}

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

/**
* Builds a {@link SourceField}.
*
Expand Down Expand Up @@ -323,7 +296,6 @@ protected static void setupSourceFieldDeserializer(ObjectDeserializer<SourceFiel
op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled");
op.add(Builder::excludes, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "excludes");
op.add(Builder::includes, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "includes");
op.add(Builder::mode, SourceFieldMode._DESERIALIZER, "mode");
}

@Override
Expand All @@ -334,7 +306,6 @@ public int hashCode() {
result = 31 * result + Objects.hashCode(this.enabled);
result = 31 * result + Objects.hashCode(this.excludes);
result = 31 * result + Objects.hashCode(this.includes);
result = 31 * result + Objects.hashCode(this.mode);
return result;
}

Expand All @@ -347,7 +318,6 @@ public boolean equals(Object o) {
&& Objects.equals(this.compressThreshold, other.compressThreshold)
&& Objects.equals(this.enabled, other.enabled)
&& Objects.equals(this.excludes, other.excludes)
&& Objects.equals(this.includes, other.includes)
&& Objects.equals(this.mode, other.mode);
&& Objects.equals(this.includes, other.includes);
}
}

This file was deleted.

Loading

0 comments on commit 7347a68

Please sign in to comment.