Skip to content

Commit

Permalink
Improve toString() (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
swallez committed Jun 21, 2022
1 parent 69e4218 commit c1d3e93
Show file tree
Hide file tree
Showing 76 changed files with 476 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -167,6 +168,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<GeoBounds> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -153,6 +154,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<GeoHashPrecision> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -188,6 +189,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<GeoLocation> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public RequestBase() {
@Override
public String toString() {

StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder(this.getClass().getSimpleName()).append(": ");

try {
@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -125,6 +126,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<Script> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -146,6 +147,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<Slices> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
}
}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends WithJsonObjectBuilderBase<Builder> implements ObjectBuilder<SortOptions> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -155,6 +156,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<Time> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectBuilderDeserializer;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -192,6 +193,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends WithJsonObjectBuilderBase<Builder> implements ObjectBuilder<Transform> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -146,6 +147,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<WaitForActiveShards> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
import co.elastic.clients.util.ObjectBuilder;
Expand Down Expand Up @@ -1385,6 +1386,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<Aggregate> {
private Kind _kind;
private AggregateVariant _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectBuilderDeserializer;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -1502,6 +1503,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends WithJsonObjectBuilderBase<Builder> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder<TBucket> extends ObjectBuilderBase implements ObjectBuilder<Buckets<TBucket>> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -176,6 +177,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<BucketsPath> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -154,6 +155,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<FieldDateMath> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectBuilderDeserializer;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -213,6 +214,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends WithJsonObjectBuilderBase<Builder>
implements
ObjectBuilder<MovingAverageAggregation> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -152,6 +153,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<Percentiles> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -158,6 +159,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<TermsExclude> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -162,6 +163,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<TermsInclude> {
private Kind _kind;
private Object _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectBuilderDeserializer;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -379,6 +380,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends WithJsonObjectBuilderBase<Builder> implements ObjectBuilder<Analyzer> {
private Kind _kind;
private AnalyzerVariant _value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.json.UnionDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
Expand Down Expand Up @@ -134,6 +135,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

}

@Override
public String toString() {
return JsonpUtils.toString(this);
}

public static class Builder extends ObjectBuilderBase implements ObjectBuilder<CharFilter> {
private Kind _kind;
private Object _value;
Expand Down
Loading

0 comments on commit c1d3e93

Please sign in to comment.