Skip to content

Commit

Permalink
Tabs vs. spaces fix.
Browse files Browse the repository at this point in the history
Signed-off-by: pieper <[email protected]>
  • Loading branch information
MikePieperSer committed Sep 29, 2023
1 parent 006c897 commit cbb681e
Showing 1 changed file with 44 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

@JsonpDeserializable
public class TypeFieldMappings implements JsonpSerializable {
private final Map<String,FieldMapping> mappings;
private final Map<String, FieldMapping> mappings;

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

Expand All @@ -69,8 +69,8 @@ public static TypeFieldMappings of(Function<Builder, ObjectBuilder<TypeFieldMapp
}

/**
* Required - API name: {@code mappings}
*/
* Required - API name: {@code mappings}
*/
public final Map<String, FieldMapping> mappings() {
return this.mappings;
}
Expand All @@ -87,13 +87,13 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {

generator.writeKey("mappings");
generator.writeStartObject();
for (Map.Entry<String, FieldMapping> item0 : this.mappings.entrySet()) {
generator.writeKey(item0.getKey());
item0.getValue().serialize(generator, mapper);
generator.writeStartObject();
for (Map.Entry<String, FieldMapping> item0 : this.mappings.entrySet()) {
generator.writeKey(item0.getKey());
item0.getValue().serialize(generator, mapper);

}
generator.writeEnd();
}
generator.writeEnd();

}

Expand All @@ -104,40 +104,40 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
*/

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<TypeFieldMappings> {
private Map<String, FieldMapping> mappings;

/**
* Required - API name: {@code mappings}
*/
public Builder mappings(Map<String, FieldMapping> value) {
this.mappings = value;
return this;
}

/**
* Add a key/value to {@link #mappings(Map)}, creating the map if needed.
*/
public Builder putMappings(String key, FieldMapping value) {
if (this.mappings == null) {
this.mappings = new HashMap<>();
}
this.mappings.put(key, value);
return this;
}

/**
* Set {@link #mappings(Map)} to a singleton map.
*/
public Builder mappings(String key, Function<FieldMapping.Builder, ObjectBuilder<FieldMapping>> fn) {
return this.mappings(Collections.singletonMap(key, fn.apply(new FieldMapping.Builder()).build()));
}

/**
* Add a key/value to {@link #mappings(Map)}, creating the map if needed.
*/
public Builder putMappings(String key, Function<FieldMapping.Builder, ObjectBuilder<FieldMapping>> fn) {
return this.putMappings(key, fn.apply(new FieldMapping.Builder()).build());
}
private Map<String, FieldMapping> mappings;

/**
* Required - API name: {@code mappings}
*/
public Builder mappings(Map<String, FieldMapping> value) {
this.mappings = value;
return this;
}

/**
* Add a key/value to {@link #mappings(Map)}, creating the map if needed.
*/
public Builder putMappings(String key, FieldMapping value) {
if (this.mappings == null) {
this.mappings = new HashMap<>();
}
this.mappings.put(key, value);
return this;
}

/**
* Set {@link #mappings(Map)} to a singleton map.
*/
public Builder mappings(String key, Function<FieldMapping.Builder, ObjectBuilder<FieldMapping>> fn) {
return this.mappings(Collections.singletonMap(key, fn.apply(new FieldMapping.Builder()).build()));
}

/**
* Add a key/value to {@link #mappings(Map)}, creating the map if needed.
*/
public Builder putMappings(String key, Function<FieldMapping.Builder, ObjectBuilder<FieldMapping>> fn) {
return this.putMappings(key, fn.apply(new FieldMapping.Builder()).build());
}

/**
* Builds a {@link TypeFieldMappings}.
Expand All @@ -162,7 +162,7 @@ public TypeFieldMappings build() {

protected static void setupTypeFieldMappingsDeserializer(ObjectDeserializer<TypeFieldMappings.Builder> op) {

op.add(Builder::mappings, JsonpDeserializer.stringMapDeserializer(FieldMapping._DESERIALIZER), "mappings");
op.add(Builder::mappings, JsonpDeserializer.stringMapDeserializer(FieldMapping._DESERIALIZER), "mappings");

}

Expand Down

0 comments on commit cbb681e

Please sign in to comment.