mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 05:02:46 +00:00
* add builder pattern to java client and spring generator * regenerate samples * update doc --------- Co-authored-by: jpfinne <jeanpaul@finne.be>
This commit is contained in:
@@ -471,5 +471,98 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private AdditionalPropertiesClass instance;
|
||||
|
||||
public Builder() {
|
||||
this(new AdditionalPropertiesClass());
|
||||
}
|
||||
|
||||
protected Builder(AdditionalPropertiesClass instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass.Builder mapProperty(Map<String, String> mapProperty) {
|
||||
this.instance.mapProperty = mapProperty;
|
||||
return this;
|
||||
}
|
||||
public AdditionalPropertiesClass.Builder mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
|
||||
this.instance.mapOfMapProperty = mapOfMapProperty;
|
||||
return this;
|
||||
}
|
||||
public AdditionalPropertiesClass.Builder anytype1(Object anytype1) {
|
||||
this.instance.anytype1 = JsonNullable.<Object>of(anytype1);
|
||||
return this;
|
||||
}
|
||||
public AdditionalPropertiesClass.Builder anytype1(JsonNullable<Object> anytype1) {
|
||||
this.instance.anytype1 = anytype1;
|
||||
return this;
|
||||
}
|
||||
public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) {
|
||||
this.instance.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1;
|
||||
return this;
|
||||
}
|
||||
public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) {
|
||||
this.instance.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2;
|
||||
return this;
|
||||
}
|
||||
public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(Map<String, Object> mapWithUndeclaredPropertiesAnytype3) {
|
||||
this.instance.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3;
|
||||
return this;
|
||||
}
|
||||
public AdditionalPropertiesClass.Builder emptyMap(Object emptyMap) {
|
||||
this.instance.emptyMap = emptyMap;
|
||||
return this;
|
||||
}
|
||||
public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(Map<String, String> mapWithUndeclaredPropertiesString) {
|
||||
this.instance.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built AdditionalPropertiesClass instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public AdditionalPropertiesClass build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static AdditionalPropertiesClass.Builder builder() {
|
||||
return new AdditionalPropertiesClass.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public AdditionalPropertiesClass.Builder toBuilder() {
|
||||
return new AdditionalPropertiesClass.Builder()
|
||||
.mapProperty(getMapProperty())
|
||||
.mapOfMapProperty(getMapOfMapProperty())
|
||||
.anytype1(getAnytype1())
|
||||
.mapWithUndeclaredPropertiesAnytype1(getMapWithUndeclaredPropertiesAnytype1())
|
||||
.mapWithUndeclaredPropertiesAnytype2(getMapWithUndeclaredPropertiesAnytype2())
|
||||
.mapWithUndeclaredPropertiesAnytype3(getMapWithUndeclaredPropertiesAnytype3())
|
||||
.emptyMap(getEmptyMap())
|
||||
.mapWithUndeclaredPropertiesString(getMapWithUndeclaredPropertiesString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -204,5 +204,64 @@ static {
|
||||
mappings.put("Animal", Animal.class);
|
||||
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Animal instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Animal());
|
||||
}
|
||||
|
||||
protected Builder(Animal instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Animal.Builder className(String className) {
|
||||
this.instance.className = className;
|
||||
return this;
|
||||
}
|
||||
public Animal.Builder color(String color) {
|
||||
this.instance.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Animal instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Animal build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Animal.Builder builder() {
|
||||
return new Animal.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Animal.Builder toBuilder() {
|
||||
return new Animal.Builder()
|
||||
.className(getClassName())
|
||||
.color(getColor());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class Apple {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Apple instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Apple());
|
||||
}
|
||||
|
||||
protected Builder(Apple instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Apple.Builder cultivar(String cultivar) {
|
||||
this.instance.cultivar = cultivar;
|
||||
return this;
|
||||
}
|
||||
public Apple.Builder origin(String origin) {
|
||||
this.instance.origin = origin;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Apple instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Apple build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Apple.Builder builder() {
|
||||
return new Apple.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Apple.Builder toBuilder() {
|
||||
return new Apple.Builder()
|
||||
.cultivar(getCultivar())
|
||||
.origin(getOrigin());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class AppleReq {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private AppleReq instance;
|
||||
|
||||
public Builder() {
|
||||
this(new AppleReq());
|
||||
}
|
||||
|
||||
protected Builder(AppleReq instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public AppleReq.Builder cultivar(String cultivar) {
|
||||
this.instance.cultivar = cultivar;
|
||||
return this;
|
||||
}
|
||||
public AppleReq.Builder mealy(Boolean mealy) {
|
||||
this.instance.mealy = mealy;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built AppleReq instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public AppleReq build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static AppleReq.Builder builder() {
|
||||
return new AppleReq.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public AppleReq.Builder toBuilder() {
|
||||
return new AppleReq.Builder()
|
||||
.cultivar(getCultivar())
|
||||
.mealy(getMealy());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -163,5 +163,59 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ArrayOfArrayOfNumberOnly instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ArrayOfArrayOfNumberOnly());
|
||||
}
|
||||
|
||||
protected Builder(ArrayOfArrayOfNumberOnly instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
this.instance.arrayArrayNumber = arrayArrayNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ArrayOfArrayOfNumberOnly instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ArrayOfArrayOfNumberOnly build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ArrayOfArrayOfNumberOnly.Builder builder() {
|
||||
return new ArrayOfArrayOfNumberOnly.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ArrayOfArrayOfNumberOnly.Builder toBuilder() {
|
||||
return new ArrayOfArrayOfNumberOnly.Builder()
|
||||
.arrayArrayNumber(getArrayArrayNumber());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -163,5 +163,59 @@ public class ArrayOfNumberOnly {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ArrayOfNumberOnly instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ArrayOfNumberOnly());
|
||||
}
|
||||
|
||||
protected Builder(ArrayOfNumberOnly instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ArrayOfNumberOnly.Builder arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
this.instance.arrayNumber = arrayNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ArrayOfNumberOnly instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ArrayOfNumberOnly build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ArrayOfNumberOnly.Builder builder() {
|
||||
return new ArrayOfNumberOnly.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ArrayOfNumberOnly.Builder toBuilder() {
|
||||
return new ArrayOfNumberOnly.Builder()
|
||||
.arrayNumber(getArrayNumber());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -259,5 +259,69 @@ public class ArrayTest {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ArrayTest instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ArrayTest());
|
||||
}
|
||||
|
||||
protected Builder(ArrayTest instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ArrayTest.Builder arrayOfString(List<String> arrayOfString) {
|
||||
this.instance.arrayOfString = arrayOfString;
|
||||
return this;
|
||||
}
|
||||
public ArrayTest.Builder arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
|
||||
this.instance.arrayArrayOfInteger = arrayArrayOfInteger;
|
||||
return this;
|
||||
}
|
||||
public ArrayTest.Builder arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
|
||||
this.instance.arrayArrayOfModel = arrayArrayOfModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ArrayTest instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ArrayTest build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ArrayTest.Builder builder() {
|
||||
return new ArrayTest.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ArrayTest.Builder toBuilder() {
|
||||
return new ArrayTest.Builder()
|
||||
.arrayOfString(getArrayOfString())
|
||||
.arrayArrayOfInteger(getArrayArrayOfInteger())
|
||||
.arrayArrayOfModel(getArrayArrayOfModel());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -147,5 +147,59 @@ public class Banana {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Banana instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Banana());
|
||||
}
|
||||
|
||||
protected Builder(Banana instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Banana.Builder lengthCm(BigDecimal lengthCm) {
|
||||
this.instance.lengthCm = lengthCm;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Banana instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Banana build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Banana.Builder builder() {
|
||||
return new Banana.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Banana.Builder toBuilder() {
|
||||
return new Banana.Builder()
|
||||
.lengthCm(getLengthCm());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -183,5 +183,64 @@ public class BananaReq {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private BananaReq instance;
|
||||
|
||||
public Builder() {
|
||||
this(new BananaReq());
|
||||
}
|
||||
|
||||
protected Builder(BananaReq instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public BananaReq.Builder lengthCm(BigDecimal lengthCm) {
|
||||
this.instance.lengthCm = lengthCm;
|
||||
return this;
|
||||
}
|
||||
public BananaReq.Builder sweet(Boolean sweet) {
|
||||
this.instance.sweet = sweet;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built BananaReq instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public BananaReq build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static BananaReq.Builder builder() {
|
||||
return new BananaReq.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public BananaReq.Builder toBuilder() {
|
||||
return new BananaReq.Builder()
|
||||
.lengthCm(getLengthCm())
|
||||
.sweet(getSweet());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class BasquePig {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private BasquePig instance;
|
||||
|
||||
public Builder() {
|
||||
this(new BasquePig());
|
||||
}
|
||||
|
||||
protected Builder(BasquePig instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public BasquePig.Builder className(String className) {
|
||||
this.instance.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built BasquePig instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public BasquePig build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static BasquePig.Builder builder() {
|
||||
return new BasquePig.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public BasquePig.Builder toBuilder() {
|
||||
return new BasquePig.Builder()
|
||||
.className(getClassName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -326,5 +326,84 @@ public class Capitalization {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Capitalization instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Capitalization());
|
||||
}
|
||||
|
||||
protected Builder(Capitalization instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Capitalization.Builder smallCamel(String smallCamel) {
|
||||
this.instance.smallCamel = smallCamel;
|
||||
return this;
|
||||
}
|
||||
public Capitalization.Builder capitalCamel(String capitalCamel) {
|
||||
this.instance.capitalCamel = capitalCamel;
|
||||
return this;
|
||||
}
|
||||
public Capitalization.Builder smallSnake(String smallSnake) {
|
||||
this.instance.smallSnake = smallSnake;
|
||||
return this;
|
||||
}
|
||||
public Capitalization.Builder capitalSnake(String capitalSnake) {
|
||||
this.instance.capitalSnake = capitalSnake;
|
||||
return this;
|
||||
}
|
||||
public Capitalization.Builder scAETHFlowPoints(String scAETHFlowPoints) {
|
||||
this.instance.scAETHFlowPoints = scAETHFlowPoints;
|
||||
return this;
|
||||
}
|
||||
public Capitalization.Builder ATT_NAME(String ATT_NAME) {
|
||||
this.instance.ATT_NAME = ATT_NAME;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Capitalization instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Capitalization build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Capitalization.Builder builder() {
|
||||
return new Capitalization.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Capitalization.Builder toBuilder() {
|
||||
return new Capitalization.Builder()
|
||||
.smallCamel(getSmallCamel())
|
||||
.capitalCamel(getCapitalCamel())
|
||||
.smallSnake(getSmallSnake())
|
||||
.capitalSnake(getCapitalSnake())
|
||||
.scAETHFlowPoints(getScAETHFlowPoints())
|
||||
.ATT_NAME(getATTNAME());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -188,5 +188,73 @@ static {
|
||||
mappings.put("Cat", Cat.class);
|
||||
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
||||
}
|
||||
|
||||
public static class Builder extends Animal.Builder {
|
||||
|
||||
private Cat instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Cat());
|
||||
}
|
||||
|
||||
protected Builder(Cat instance) {
|
||||
super(instance);
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Cat.Builder declawed(Boolean declawed) {
|
||||
this.instance.declawed = declawed;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Cat.Builder className(String className) { // inherited: true
|
||||
super.className(className);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Cat.Builder color(String color) { // inherited: true
|
||||
super.color(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Cat instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Cat build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
super.build();
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Cat.Builder builder() {
|
||||
return new Cat.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Cat.Builder toBuilder() {
|
||||
return new Cat.Builder()
|
||||
.className(getClassName())
|
||||
.color(getColor())
|
||||
.declawed(getDeclawed());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class Category {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Category instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Category());
|
||||
}
|
||||
|
||||
protected Builder(Category instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Category.Builder id(Long id) {
|
||||
this.instance.id = id;
|
||||
return this;
|
||||
}
|
||||
public Category.Builder name(String name) {
|
||||
this.instance.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Category instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Category build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Category.Builder builder() {
|
||||
return new Category.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Category.Builder toBuilder() {
|
||||
return new Category.Builder()
|
||||
.id(getId())
|
||||
.name(getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -215,5 +215,66 @@ static {
|
||||
mappings.put("ChildCat", ChildCat.class);
|
||||
JSON.registerDiscriminator(ChildCat.class, "pet_type", mappings);
|
||||
}
|
||||
|
||||
public static class Builder extends ParentPet.Builder {
|
||||
|
||||
private ChildCat instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ChildCat());
|
||||
}
|
||||
|
||||
protected Builder(ChildCat instance) {
|
||||
super(instance);
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ChildCat.Builder name(String name) {
|
||||
this.instance.name = name;
|
||||
return this;
|
||||
}
|
||||
public ChildCat.Builder petType(String petType) {
|
||||
this.instance.petType = petType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ChildCat instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ChildCat build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
super.build();
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ChildCat.Builder builder() {
|
||||
return new ChildCat.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ChildCat.Builder toBuilder() {
|
||||
return new ChildCat.Builder()
|
||||
.petType(getPetType())
|
||||
.name(getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class ClassModel {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ClassModel instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ClassModel());
|
||||
}
|
||||
|
||||
protected Builder(ClassModel instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ClassModel.Builder propertyClass(String propertyClass) {
|
||||
this.instance.propertyClass = propertyClass;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ClassModel instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ClassModel build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ClassModel.Builder builder() {
|
||||
return new ClassModel.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ClassModel.Builder toBuilder() {
|
||||
return new ClassModel.Builder()
|
||||
.propertyClass(getPropertyClass());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class Client {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Client instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Client());
|
||||
}
|
||||
|
||||
protected Builder(Client instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Client.Builder client(String client) {
|
||||
this.instance.client = client;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Client instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Client build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Client.Builder builder() {
|
||||
return new Client.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Client.Builder toBuilder() {
|
||||
return new Client.Builder()
|
||||
.client(getClient());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class ComplexQuadrilateral {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ComplexQuadrilateral instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ComplexQuadrilateral());
|
||||
}
|
||||
|
||||
protected Builder(ComplexQuadrilateral instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ComplexQuadrilateral.Builder shapeType(String shapeType) {
|
||||
this.instance.shapeType = shapeType;
|
||||
return this;
|
||||
}
|
||||
public ComplexQuadrilateral.Builder quadrilateralType(String quadrilateralType) {
|
||||
this.instance.quadrilateralType = quadrilateralType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ComplexQuadrilateral instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ComplexQuadrilateral build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ComplexQuadrilateral.Builder builder() {
|
||||
return new ComplexQuadrilateral.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ComplexQuadrilateral.Builder toBuilder() {
|
||||
return new ComplexQuadrilateral.Builder()
|
||||
.shapeType(getShapeType())
|
||||
.quadrilateralType(getQuadrilateralType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class DanishPig {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private DanishPig instance;
|
||||
|
||||
public Builder() {
|
||||
this(new DanishPig());
|
||||
}
|
||||
|
||||
protected Builder(DanishPig instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public DanishPig.Builder className(String className) {
|
||||
this.instance.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built DanishPig instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public DanishPig build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static DanishPig.Builder builder() {
|
||||
return new DanishPig.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public DanishPig.Builder toBuilder() {
|
||||
return new DanishPig.Builder()
|
||||
.className(getClassName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -148,5 +148,59 @@ public class DeprecatedObject {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private DeprecatedObject instance;
|
||||
|
||||
public Builder() {
|
||||
this(new DeprecatedObject());
|
||||
}
|
||||
|
||||
protected Builder(DeprecatedObject instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public DeprecatedObject.Builder name(String name) {
|
||||
this.instance.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built DeprecatedObject instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public DeprecatedObject build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static DeprecatedObject.Builder builder() {
|
||||
return new DeprecatedObject.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public DeprecatedObject.Builder toBuilder() {
|
||||
return new DeprecatedObject.Builder()
|
||||
.name(getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -187,5 +187,73 @@ static {
|
||||
mappings.put("Dog", Dog.class);
|
||||
JSON.registerDiscriminator(Dog.class, "className", mappings);
|
||||
}
|
||||
|
||||
public static class Builder extends Animal.Builder {
|
||||
|
||||
private Dog instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Dog());
|
||||
}
|
||||
|
||||
protected Builder(Dog instance) {
|
||||
super(instance);
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Dog.Builder breed(String breed) {
|
||||
this.instance.breed = breed;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Dog.Builder className(String className) { // inherited: true
|
||||
super.className(className);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Dog.Builder color(String color) { // inherited: true
|
||||
super.color(color);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Dog instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Dog build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
super.build();
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Dog.Builder builder() {
|
||||
return new Dog.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Dog.Builder toBuilder() {
|
||||
return new Dog.Builder()
|
||||
.className(getClassName())
|
||||
.color(getColor())
|
||||
.breed(getBreed());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -349,5 +349,78 @@ public class Drawing extends HashMap<String, Fruit> {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Drawing instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Drawing());
|
||||
}
|
||||
|
||||
protected Builder(Drawing instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Drawing.Builder mainShape(Shape mainShape) {
|
||||
this.instance.mainShape = mainShape;
|
||||
return this;
|
||||
}
|
||||
public Drawing.Builder shapeOrNull(ShapeOrNull shapeOrNull) {
|
||||
this.instance.shapeOrNull = shapeOrNull;
|
||||
return this;
|
||||
}
|
||||
public Drawing.Builder nullableShape(NullableShape nullableShape) {
|
||||
this.instance.nullableShape = JsonNullable.<NullableShape>of(nullableShape);
|
||||
return this;
|
||||
}
|
||||
public Drawing.Builder nullableShape(JsonNullable<NullableShape> nullableShape) {
|
||||
this.instance.nullableShape = nullableShape;
|
||||
return this;
|
||||
}
|
||||
public Drawing.Builder shapes(List<Shape> shapes) {
|
||||
this.instance.shapes = shapes;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Drawing instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Drawing build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Drawing.Builder builder() {
|
||||
return new Drawing.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Drawing.Builder toBuilder() {
|
||||
return new Drawing.Builder()
|
||||
.mainShape(getMainShape())
|
||||
.shapeOrNull(getShapeOrNull())
|
||||
.nullableShape(getNullableShape())
|
||||
.shapes(getShapes());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -266,5 +266,64 @@ public class EnumArrays {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private EnumArrays instance;
|
||||
|
||||
public Builder() {
|
||||
this(new EnumArrays());
|
||||
}
|
||||
|
||||
protected Builder(EnumArrays instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public EnumArrays.Builder justSymbol(JustSymbolEnum justSymbol) {
|
||||
this.instance.justSymbol = justSymbol;
|
||||
return this;
|
||||
}
|
||||
public EnumArrays.Builder arrayEnum(List<ArrayEnumEnum> arrayEnum) {
|
||||
this.instance.arrayEnum = arrayEnum;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built EnumArrays instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public EnumArrays build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static EnumArrays.Builder builder() {
|
||||
return new EnumArrays.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public EnumArrays.Builder toBuilder() {
|
||||
return new EnumArrays.Builder()
|
||||
.justSymbol(getJustSymbol())
|
||||
.arrayEnum(getArrayEnum());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -640,5 +640,103 @@ public class EnumTest {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private EnumTest instance;
|
||||
|
||||
public Builder() {
|
||||
this(new EnumTest());
|
||||
}
|
||||
|
||||
protected Builder(EnumTest instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public EnumTest.Builder enumString(EnumStringEnum enumString) {
|
||||
this.instance.enumString = enumString;
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||
this.instance.enumStringRequired = enumStringRequired;
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder enumInteger(EnumIntegerEnum enumInteger) {
|
||||
this.instance.enumInteger = enumInteger;
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder enumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) {
|
||||
this.instance.enumIntegerOnly = enumIntegerOnly;
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder enumNumber(EnumNumberEnum enumNumber) {
|
||||
this.instance.enumNumber = enumNumber;
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder outerEnum(OuterEnum outerEnum) {
|
||||
this.instance.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder outerEnum(JsonNullable<OuterEnum> outerEnum) {
|
||||
this.instance.outerEnum = outerEnum;
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder outerEnumInteger(OuterEnumInteger outerEnumInteger) {
|
||||
this.instance.outerEnumInteger = outerEnumInteger;
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
|
||||
this.instance.outerEnumDefaultValue = outerEnumDefaultValue;
|
||||
return this;
|
||||
}
|
||||
public EnumTest.Builder outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
|
||||
this.instance.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built EnumTest instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public EnumTest build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static EnumTest.Builder builder() {
|
||||
return new EnumTest.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public EnumTest.Builder toBuilder() {
|
||||
return new EnumTest.Builder()
|
||||
.enumString(getEnumString())
|
||||
.enumStringRequired(getEnumStringRequired())
|
||||
.enumInteger(getEnumInteger())
|
||||
.enumIntegerOnly(getEnumIntegerOnly())
|
||||
.enumNumber(getEnumNumber())
|
||||
.outerEnum(getOuterEnum())
|
||||
.outerEnumInteger(getOuterEnumInteger())
|
||||
.outerEnumDefaultValue(getOuterEnumDefaultValue())
|
||||
.outerEnumIntegerDefaultValue(getOuterEnumIntegerDefaultValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class EquilateralTriangle {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private EquilateralTriangle instance;
|
||||
|
||||
public Builder() {
|
||||
this(new EquilateralTriangle());
|
||||
}
|
||||
|
||||
protected Builder(EquilateralTriangle instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public EquilateralTriangle.Builder shapeType(String shapeType) {
|
||||
this.instance.shapeType = shapeType;
|
||||
return this;
|
||||
}
|
||||
public EquilateralTriangle.Builder triangleType(String triangleType) {
|
||||
this.instance.triangleType = triangleType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built EquilateralTriangle instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public EquilateralTriangle build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static EquilateralTriangle.Builder builder() {
|
||||
return new EquilateralTriangle.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public EquilateralTriangle.Builder toBuilder() {
|
||||
return new EquilateralTriangle.Builder()
|
||||
.shapeType(getShapeType())
|
||||
.triangleType(getTriangleType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -197,5 +197,64 @@ public class FakeBigDecimalMap200Response {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private FakeBigDecimalMap200Response instance;
|
||||
|
||||
public Builder() {
|
||||
this(new FakeBigDecimalMap200Response());
|
||||
}
|
||||
|
||||
protected Builder(FakeBigDecimalMap200Response instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public FakeBigDecimalMap200Response.Builder someId(BigDecimal someId) {
|
||||
this.instance.someId = someId;
|
||||
return this;
|
||||
}
|
||||
public FakeBigDecimalMap200Response.Builder someMap(Map<String, BigDecimal> someMap) {
|
||||
this.instance.someMap = someMap;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built FakeBigDecimalMap200Response instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public FakeBigDecimalMap200Response build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static FakeBigDecimalMap200Response.Builder builder() {
|
||||
return new FakeBigDecimalMap200Response.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public FakeBigDecimalMap200Response.Builder toBuilder() {
|
||||
return new FakeBigDecimalMap200Response.Builder()
|
||||
.someId(getSomeId())
|
||||
.someMap(getSomeMap());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -198,5 +198,64 @@ public class FileSchemaTestClass {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private FileSchemaTestClass instance;
|
||||
|
||||
public Builder() {
|
||||
this(new FileSchemaTestClass());
|
||||
}
|
||||
|
||||
protected Builder(FileSchemaTestClass instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public FileSchemaTestClass.Builder _file(ModelFile _file) {
|
||||
this.instance._file = _file;
|
||||
return this;
|
||||
}
|
||||
public FileSchemaTestClass.Builder files(List<ModelFile> files) {
|
||||
this.instance.files = files;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built FileSchemaTestClass instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public FileSchemaTestClass build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static FileSchemaTestClass.Builder builder() {
|
||||
return new FileSchemaTestClass.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public FileSchemaTestClass.Builder toBuilder() {
|
||||
return new FileSchemaTestClass.Builder()
|
||||
._file(getFile())
|
||||
.files(getFiles());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class Foo {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Foo instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Foo());
|
||||
}
|
||||
|
||||
protected Builder(Foo instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Foo.Builder bar(String bar) {
|
||||
this.instance.bar = bar;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Foo instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Foo build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Foo.Builder builder() {
|
||||
return new Foo.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Foo.Builder toBuilder() {
|
||||
return new Foo.Builder()
|
||||
.bar(getBar());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -147,5 +147,59 @@ public class FooGetDefaultResponse {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private FooGetDefaultResponse instance;
|
||||
|
||||
public Builder() {
|
||||
this(new FooGetDefaultResponse());
|
||||
}
|
||||
|
||||
protected Builder(FooGetDefaultResponse instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public FooGetDefaultResponse.Builder string(Foo string) {
|
||||
this.instance.string = string;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built FooGetDefaultResponse instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public FooGetDefaultResponse build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static FooGetDefaultResponse.Builder builder() {
|
||||
return new FooGetDefaultResponse.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public FooGetDefaultResponse.Builder toBuilder() {
|
||||
return new FooGetDefaultResponse.Builder()
|
||||
.string(getString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -701,5 +701,134 @@ public class FormatTest {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private FormatTest instance;
|
||||
|
||||
public Builder() {
|
||||
this(new FormatTest());
|
||||
}
|
||||
|
||||
protected Builder(FormatTest instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public FormatTest.Builder integer(Integer integer) {
|
||||
this.instance.integer = integer;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder int32(Integer int32) {
|
||||
this.instance.int32 = int32;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder int64(Long int64) {
|
||||
this.instance.int64 = int64;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder number(BigDecimal number) {
|
||||
this.instance.number = number;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder _float(Float _float) {
|
||||
this.instance._float = _float;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder _double(Double _double) {
|
||||
this.instance._double = _double;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder decimal(BigDecimal decimal) {
|
||||
this.instance.decimal = decimal;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder string(String string) {
|
||||
this.instance.string = string;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder _byte(byte[] _byte) {
|
||||
this.instance._byte = _byte;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder binary(File binary) {
|
||||
this.instance.binary = binary;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder date(LocalDate date) {
|
||||
this.instance.date = date;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder dateTime(OffsetDateTime dateTime) {
|
||||
this.instance.dateTime = dateTime;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder uuid(UUID uuid) {
|
||||
this.instance.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder password(String password) {
|
||||
this.instance.password = password;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder patternWithDigits(String patternWithDigits) {
|
||||
this.instance.patternWithDigits = patternWithDigits;
|
||||
return this;
|
||||
}
|
||||
public FormatTest.Builder patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
|
||||
this.instance.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built FormatTest instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public FormatTest build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static FormatTest.Builder builder() {
|
||||
return new FormatTest.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public FormatTest.Builder toBuilder() {
|
||||
return new FormatTest.Builder()
|
||||
.integer(getInteger())
|
||||
.int32(getInt32())
|
||||
.int64(getInt64())
|
||||
.number(getNumber())
|
||||
._float(getFloat())
|
||||
._double(getDouble())
|
||||
.decimal(getDecimal())
|
||||
.string(getString())
|
||||
._byte(getByte())
|
||||
.binary(getBinary())
|
||||
.date(getDate())
|
||||
.dateTime(getDateTime())
|
||||
.uuid(getUuid())
|
||||
.password(getPassword())
|
||||
.patternWithDigits(getPatternWithDigits())
|
||||
.patternWithDigitsAndDelimiter(getPatternWithDigitsAndDelimiter());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -168,5 +168,59 @@ static {
|
||||
mappings.put("GrandparentAnimal", GrandparentAnimal.class);
|
||||
JSON.registerDiscriminator(GrandparentAnimal.class, "pet_type", mappings);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private GrandparentAnimal instance;
|
||||
|
||||
public Builder() {
|
||||
this(new GrandparentAnimal());
|
||||
}
|
||||
|
||||
protected Builder(GrandparentAnimal instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public GrandparentAnimal.Builder petType(String petType) {
|
||||
this.instance.petType = petType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built GrandparentAnimal instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public GrandparentAnimal build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static GrandparentAnimal.Builder builder() {
|
||||
return new GrandparentAnimal.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public GrandparentAnimal.Builder toBuilder() {
|
||||
return new GrandparentAnimal.Builder()
|
||||
.petType(getPetType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -172,5 +172,64 @@ public class HasOnlyReadOnly {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private HasOnlyReadOnly instance;
|
||||
|
||||
public Builder() {
|
||||
this(new HasOnlyReadOnly());
|
||||
}
|
||||
|
||||
protected Builder(HasOnlyReadOnly instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public HasOnlyReadOnly.Builder bar(String bar) {
|
||||
this.instance.bar = bar;
|
||||
return this;
|
||||
}
|
||||
public HasOnlyReadOnly.Builder foo(String foo) {
|
||||
this.instance.foo = foo;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built HasOnlyReadOnly instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public HasOnlyReadOnly build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static HasOnlyReadOnly.Builder builder() {
|
||||
return new HasOnlyReadOnly.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public HasOnlyReadOnly.Builder toBuilder() {
|
||||
return new HasOnlyReadOnly.Builder()
|
||||
.bar(getBar())
|
||||
.foo(getFoo());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -169,5 +169,63 @@ public class HealthCheckResult {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private HealthCheckResult instance;
|
||||
|
||||
public Builder() {
|
||||
this(new HealthCheckResult());
|
||||
}
|
||||
|
||||
protected Builder(HealthCheckResult instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public HealthCheckResult.Builder nullableMessage(String nullableMessage) {
|
||||
this.instance.nullableMessage = JsonNullable.<String>of(nullableMessage);
|
||||
return this;
|
||||
}
|
||||
public HealthCheckResult.Builder nullableMessage(JsonNullable<String> nullableMessage) {
|
||||
this.instance.nullableMessage = nullableMessage;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built HealthCheckResult instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public HealthCheckResult build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static HealthCheckResult.Builder builder() {
|
||||
return new HealthCheckResult.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public HealthCheckResult.Builder toBuilder() {
|
||||
return new HealthCheckResult.Builder()
|
||||
.nullableMessage(getNullableMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class IsoscelesTriangle {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private IsoscelesTriangle instance;
|
||||
|
||||
public Builder() {
|
||||
this(new IsoscelesTriangle());
|
||||
}
|
||||
|
||||
protected Builder(IsoscelesTriangle instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public IsoscelesTriangle.Builder shapeType(String shapeType) {
|
||||
this.instance.shapeType = shapeType;
|
||||
return this;
|
||||
}
|
||||
public IsoscelesTriangle.Builder triangleType(String triangleType) {
|
||||
this.instance.triangleType = triangleType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built IsoscelesTriangle instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public IsoscelesTriangle build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static IsoscelesTriangle.Builder builder() {
|
||||
return new IsoscelesTriangle.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public IsoscelesTriangle.Builder toBuilder() {
|
||||
return new IsoscelesTriangle.Builder()
|
||||
.shapeType(getShapeType())
|
||||
.triangleType(getTriangleType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -339,5 +339,74 @@ public class MapTest {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private MapTest instance;
|
||||
|
||||
public Builder() {
|
||||
this(new MapTest());
|
||||
}
|
||||
|
||||
protected Builder(MapTest instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public MapTest.Builder mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
this.instance.mapMapOfString = mapMapOfString;
|
||||
return this;
|
||||
}
|
||||
public MapTest.Builder mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
|
||||
this.instance.mapOfEnumString = mapOfEnumString;
|
||||
return this;
|
||||
}
|
||||
public MapTest.Builder directMap(Map<String, Boolean> directMap) {
|
||||
this.instance.directMap = directMap;
|
||||
return this;
|
||||
}
|
||||
public MapTest.Builder indirectMap(Map<String, Boolean> indirectMap) {
|
||||
this.instance.indirectMap = indirectMap;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built MapTest instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public MapTest build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static MapTest.Builder builder() {
|
||||
return new MapTest.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public MapTest.Builder toBuilder() {
|
||||
return new MapTest.Builder()
|
||||
.mapMapOfString(getMapMapOfString())
|
||||
.mapOfEnumString(getMapOfEnumString())
|
||||
.directMap(getDirectMap())
|
||||
.indirectMap(getIndirectMap());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -236,5 +236,69 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private MixedPropertiesAndAdditionalPropertiesClass instance;
|
||||
|
||||
public Builder() {
|
||||
this(new MixedPropertiesAndAdditionalPropertiesClass());
|
||||
}
|
||||
|
||||
protected Builder(MixedPropertiesAndAdditionalPropertiesClass instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(UUID uuid) {
|
||||
this.instance.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(OffsetDateTime dateTime) {
|
||||
this.instance.dateTime = dateTime;
|
||||
return this;
|
||||
}
|
||||
public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map<String, Animal> map) {
|
||||
this.instance.map = map;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built MixedPropertiesAndAdditionalPropertiesClass instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public MixedPropertiesAndAdditionalPropertiesClass build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static MixedPropertiesAndAdditionalPropertiesClass.Builder builder() {
|
||||
return new MixedPropertiesAndAdditionalPropertiesClass.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public MixedPropertiesAndAdditionalPropertiesClass.Builder toBuilder() {
|
||||
return new MixedPropertiesAndAdditionalPropertiesClass.Builder()
|
||||
.uuid(getUuid())
|
||||
.dateTime(getDateTime())
|
||||
.map(getMap());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class Model200Response {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Model200Response instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Model200Response());
|
||||
}
|
||||
|
||||
protected Builder(Model200Response instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Model200Response.Builder name(Integer name) {
|
||||
this.instance.name = name;
|
||||
return this;
|
||||
}
|
||||
public Model200Response.Builder propertyClass(String propertyClass) {
|
||||
this.instance.propertyClass = propertyClass;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Model200Response instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Model200Response build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Model200Response.Builder builder() {
|
||||
return new Model200Response.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Model200Response.Builder toBuilder() {
|
||||
return new Model200Response.Builder()
|
||||
.name(getName())
|
||||
.propertyClass(getPropertyClass());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -218,5 +218,69 @@ public class ModelApiResponse {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ModelApiResponse instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ModelApiResponse());
|
||||
}
|
||||
|
||||
protected Builder(ModelApiResponse instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ModelApiResponse.Builder code(Integer code) {
|
||||
this.instance.code = code;
|
||||
return this;
|
||||
}
|
||||
public ModelApiResponse.Builder type(String type) {
|
||||
this.instance.type = type;
|
||||
return this;
|
||||
}
|
||||
public ModelApiResponse.Builder message(String message) {
|
||||
this.instance.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ModelApiResponse instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ModelApiResponse build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ModelApiResponse.Builder builder() {
|
||||
return new ModelApiResponse.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ModelApiResponse.Builder toBuilder() {
|
||||
return new ModelApiResponse.Builder()
|
||||
.code(getCode())
|
||||
.type(getType())
|
||||
.message(getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class ModelFile {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ModelFile instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ModelFile());
|
||||
}
|
||||
|
||||
protected Builder(ModelFile instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ModelFile.Builder sourceURI(String sourceURI) {
|
||||
this.instance.sourceURI = sourceURI;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ModelFile instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ModelFile build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ModelFile.Builder builder() {
|
||||
return new ModelFile.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ModelFile.Builder toBuilder() {
|
||||
return new ModelFile.Builder()
|
||||
.sourceURI(getSourceURI());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class ModelList {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ModelList instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ModelList());
|
||||
}
|
||||
|
||||
protected Builder(ModelList instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ModelList.Builder _123list(String _123list) {
|
||||
this.instance._123list = _123list;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ModelList instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ModelList build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ModelList.Builder builder() {
|
||||
return new ModelList.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ModelList.Builder toBuilder() {
|
||||
return new ModelList.Builder()
|
||||
._123list(get123list());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class ModelReturn {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ModelReturn instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ModelReturn());
|
||||
}
|
||||
|
||||
protected Builder(ModelReturn instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ModelReturn.Builder _return(Integer _return) {
|
||||
this.instance._return = _return;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ModelReturn instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ModelReturn build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ModelReturn.Builder builder() {
|
||||
return new ModelReturn.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ModelReturn.Builder toBuilder() {
|
||||
return new ModelReturn.Builder()
|
||||
._return(getReturn());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -244,5 +244,74 @@ public class Name {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Name instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Name());
|
||||
}
|
||||
|
||||
protected Builder(Name instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Name.Builder name(Integer name) {
|
||||
this.instance.name = name;
|
||||
return this;
|
||||
}
|
||||
public Name.Builder snakeCase(Integer snakeCase) {
|
||||
this.instance.snakeCase = snakeCase;
|
||||
return this;
|
||||
}
|
||||
public Name.Builder property(String property) {
|
||||
this.instance.property = property;
|
||||
return this;
|
||||
}
|
||||
public Name.Builder _123number(Integer _123number) {
|
||||
this.instance._123number = _123number;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Name instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Name build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Name.Builder builder() {
|
||||
return new Name.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Name.Builder toBuilder() {
|
||||
return new Name.Builder()
|
||||
.name(getName())
|
||||
.snakeCase(getSnakeCase())
|
||||
.property(getProperty())
|
||||
._123number(get123number());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -783,5 +783,154 @@ public class NullableClass extends HashMap<String, Object> {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private NullableClass instance;
|
||||
|
||||
public Builder() {
|
||||
this(new NullableClass());
|
||||
}
|
||||
|
||||
protected Builder(NullableClass instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public NullableClass.Builder integerProp(Integer integerProp) {
|
||||
this.instance.integerProp = JsonNullable.<Integer>of(integerProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder integerProp(JsonNullable<Integer> integerProp) {
|
||||
this.instance.integerProp = integerProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder numberProp(BigDecimal numberProp) {
|
||||
this.instance.numberProp = JsonNullable.<BigDecimal>of(numberProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder numberProp(JsonNullable<BigDecimal> numberProp) {
|
||||
this.instance.numberProp = numberProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder booleanProp(Boolean booleanProp) {
|
||||
this.instance.booleanProp = JsonNullable.<Boolean>of(booleanProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder booleanProp(JsonNullable<Boolean> booleanProp) {
|
||||
this.instance.booleanProp = booleanProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder stringProp(String stringProp) {
|
||||
this.instance.stringProp = JsonNullable.<String>of(stringProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder stringProp(JsonNullable<String> stringProp) {
|
||||
this.instance.stringProp = stringProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder dateProp(LocalDate dateProp) {
|
||||
this.instance.dateProp = JsonNullable.<LocalDate>of(dateProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder dateProp(JsonNullable<LocalDate> dateProp) {
|
||||
this.instance.dateProp = dateProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder datetimeProp(OffsetDateTime datetimeProp) {
|
||||
this.instance.datetimeProp = JsonNullable.<OffsetDateTime>of(datetimeProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder datetimeProp(JsonNullable<OffsetDateTime> datetimeProp) {
|
||||
this.instance.datetimeProp = datetimeProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder arrayNullableProp(List<Object> arrayNullableProp) {
|
||||
this.instance.arrayNullableProp = JsonNullable.<List<Object>>of(arrayNullableProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder arrayNullableProp(JsonNullable<List<Object>> arrayNullableProp) {
|
||||
this.instance.arrayNullableProp = arrayNullableProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder arrayAndItemsNullableProp(List<Object> arrayAndItemsNullableProp) {
|
||||
this.instance.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(arrayAndItemsNullableProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder arrayAndItemsNullableProp(JsonNullable<List<Object>> arrayAndItemsNullableProp) {
|
||||
this.instance.arrayAndItemsNullableProp = arrayAndItemsNullableProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder arrayItemsNullable(List<Object> arrayItemsNullable) {
|
||||
this.instance.arrayItemsNullable = arrayItemsNullable;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder objectNullableProp(Map<String, Object> objectNullableProp) {
|
||||
this.instance.objectNullableProp = JsonNullable.<Map<String, Object>>of(objectNullableProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder objectNullableProp(JsonNullable<Map<String, Object>> objectNullableProp) {
|
||||
this.instance.objectNullableProp = objectNullableProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder objectAndItemsNullableProp(Map<String, Object> objectAndItemsNullableProp) {
|
||||
this.instance.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(objectAndItemsNullableProp);
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder objectAndItemsNullableProp(JsonNullable<Map<String, Object>> objectAndItemsNullableProp) {
|
||||
this.instance.objectAndItemsNullableProp = objectAndItemsNullableProp;
|
||||
return this;
|
||||
}
|
||||
public NullableClass.Builder objectItemsNullable(Map<String, Object> objectItemsNullable) {
|
||||
this.instance.objectItemsNullable = objectItemsNullable;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built NullableClass instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public NullableClass build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static NullableClass.Builder builder() {
|
||||
return new NullableClass.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public NullableClass.Builder toBuilder() {
|
||||
return new NullableClass.Builder()
|
||||
.integerProp(getIntegerProp())
|
||||
.numberProp(getNumberProp())
|
||||
.booleanProp(getBooleanProp())
|
||||
.stringProp(getStringProp())
|
||||
.dateProp(getDateProp())
|
||||
.datetimeProp(getDatetimeProp())
|
||||
.arrayNullableProp(getArrayNullableProp())
|
||||
.arrayAndItemsNullableProp(getArrayAndItemsNullableProp())
|
||||
.arrayItemsNullable(getArrayItemsNullable())
|
||||
.objectNullableProp(getObjectNullableProp())
|
||||
.objectAndItemsNullableProp(getObjectAndItemsNullableProp())
|
||||
.objectItemsNullable(getObjectItemsNullable());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -147,5 +147,59 @@ public class NumberOnly {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private NumberOnly instance;
|
||||
|
||||
public Builder() {
|
||||
this(new NumberOnly());
|
||||
}
|
||||
|
||||
protected Builder(NumberOnly instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public NumberOnly.Builder justNumber(BigDecimal justNumber) {
|
||||
this.instance.justNumber = justNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built NumberOnly instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public NumberOnly build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static NumberOnly.Builder builder() {
|
||||
return new NumberOnly.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public NumberOnly.Builder toBuilder() {
|
||||
return new NumberOnly.Builder()
|
||||
.justNumber(getJustNumber());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -276,5 +276,74 @@ public class ObjectWithDeprecatedFields {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ObjectWithDeprecatedFields instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ObjectWithDeprecatedFields());
|
||||
}
|
||||
|
||||
protected Builder(ObjectWithDeprecatedFields instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ObjectWithDeprecatedFields.Builder uuid(String uuid) {
|
||||
this.instance.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
public ObjectWithDeprecatedFields.Builder id(BigDecimal id) {
|
||||
this.instance.id = id;
|
||||
return this;
|
||||
}
|
||||
public ObjectWithDeprecatedFields.Builder deprecatedRef(DeprecatedObject deprecatedRef) {
|
||||
this.instance.deprecatedRef = deprecatedRef;
|
||||
return this;
|
||||
}
|
||||
public ObjectWithDeprecatedFields.Builder bars(List<String> bars) {
|
||||
this.instance.bars = bars;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ObjectWithDeprecatedFields instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ObjectWithDeprecatedFields build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ObjectWithDeprecatedFields.Builder builder() {
|
||||
return new ObjectWithDeprecatedFields.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ObjectWithDeprecatedFields.Builder toBuilder() {
|
||||
return new ObjectWithDeprecatedFields.Builder()
|
||||
.uuid(getUuid())
|
||||
.id(getId())
|
||||
.deprecatedRef(getDeprecatedRef())
|
||||
.bars(getBars());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -364,5 +364,84 @@ public class Order {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Order instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Order());
|
||||
}
|
||||
|
||||
protected Builder(Order instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Order.Builder id(Long id) {
|
||||
this.instance.id = id;
|
||||
return this;
|
||||
}
|
||||
public Order.Builder petId(Long petId) {
|
||||
this.instance.petId = petId;
|
||||
return this;
|
||||
}
|
||||
public Order.Builder quantity(Integer quantity) {
|
||||
this.instance.quantity = quantity;
|
||||
return this;
|
||||
}
|
||||
public Order.Builder shipDate(OffsetDateTime shipDate) {
|
||||
this.instance.shipDate = shipDate;
|
||||
return this;
|
||||
}
|
||||
public Order.Builder status(StatusEnum status) {
|
||||
this.instance.status = status;
|
||||
return this;
|
||||
}
|
||||
public Order.Builder complete(Boolean complete) {
|
||||
this.instance.complete = complete;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Order instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Order build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Order.Builder builder() {
|
||||
return new Order.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Order.Builder toBuilder() {
|
||||
return new Order.Builder()
|
||||
.id(getId())
|
||||
.petId(getPetId())
|
||||
.quantity(getQuantity())
|
||||
.shipDate(getShipDate())
|
||||
.status(getStatus())
|
||||
.complete(getComplete());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -219,5 +219,69 @@ public class OuterComposite {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private OuterComposite instance;
|
||||
|
||||
public Builder() {
|
||||
this(new OuterComposite());
|
||||
}
|
||||
|
||||
protected Builder(OuterComposite instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public OuterComposite.Builder myNumber(BigDecimal myNumber) {
|
||||
this.instance.myNumber = myNumber;
|
||||
return this;
|
||||
}
|
||||
public OuterComposite.Builder myString(String myString) {
|
||||
this.instance.myString = myString;
|
||||
return this;
|
||||
}
|
||||
public OuterComposite.Builder myBoolean(Boolean myBoolean) {
|
||||
this.instance.myBoolean = myBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built OuterComposite instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public OuterComposite build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static OuterComposite.Builder builder() {
|
||||
return new OuterComposite.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public OuterComposite.Builder toBuilder() {
|
||||
return new OuterComposite.Builder()
|
||||
.myNumber(getMyNumber())
|
||||
.myString(getMyString())
|
||||
.myBoolean(getMyBoolean());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -143,5 +143,62 @@ static {
|
||||
mappings.put("ParentPet", ParentPet.class);
|
||||
JSON.registerDiscriminator(ParentPet.class, "pet_type", mappings);
|
||||
}
|
||||
|
||||
public static class Builder extends GrandparentAnimal.Builder {
|
||||
|
||||
private ParentPet instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ParentPet());
|
||||
}
|
||||
|
||||
protected Builder(ParentPet instance) {
|
||||
super(instance);
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
|
||||
public ParentPet.Builder petType(String petType) { // inherited: true
|
||||
super.petType(petType);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ParentPet instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ParentPet build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
super.build();
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ParentPet.Builder builder() {
|
||||
return new ParentPet.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ParentPet.Builder toBuilder() {
|
||||
return new ParentPet.Builder()
|
||||
.petType(getPetType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -392,5 +392,84 @@ public class Pet {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Pet instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Pet());
|
||||
}
|
||||
|
||||
protected Builder(Pet instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Pet.Builder id(Long id) {
|
||||
this.instance.id = id;
|
||||
return this;
|
||||
}
|
||||
public Pet.Builder category(Category category) {
|
||||
this.instance.category = category;
|
||||
return this;
|
||||
}
|
||||
public Pet.Builder name(String name) {
|
||||
this.instance.name = name;
|
||||
return this;
|
||||
}
|
||||
public Pet.Builder photoUrls(List<String> photoUrls) {
|
||||
this.instance.photoUrls = photoUrls;
|
||||
return this;
|
||||
}
|
||||
public Pet.Builder tags(List<Tag> tags) {
|
||||
this.instance.tags = tags;
|
||||
return this;
|
||||
}
|
||||
public Pet.Builder status(StatusEnum status) {
|
||||
this.instance.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Pet instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Pet build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Pet.Builder builder() {
|
||||
return new Pet.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Pet.Builder toBuilder() {
|
||||
return new Pet.Builder()
|
||||
.id(getId())
|
||||
.category(getCategory())
|
||||
.name(getName())
|
||||
.photoUrls(getPhotoUrls())
|
||||
.tags(getTags())
|
||||
.status(getStatus());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class QuadrilateralInterface {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private QuadrilateralInterface instance;
|
||||
|
||||
public Builder() {
|
||||
this(new QuadrilateralInterface());
|
||||
}
|
||||
|
||||
protected Builder(QuadrilateralInterface instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public QuadrilateralInterface.Builder quadrilateralType(String quadrilateralType) {
|
||||
this.instance.quadrilateralType = quadrilateralType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built QuadrilateralInterface instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public QuadrilateralInterface build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static QuadrilateralInterface.Builder builder() {
|
||||
return new QuadrilateralInterface.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public QuadrilateralInterface.Builder toBuilder() {
|
||||
return new QuadrilateralInterface.Builder()
|
||||
.quadrilateralType(getQuadrilateralType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -180,5 +180,64 @@ public class ReadOnlyFirst {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ReadOnlyFirst instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ReadOnlyFirst());
|
||||
}
|
||||
|
||||
protected Builder(ReadOnlyFirst instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ReadOnlyFirst.Builder bar(String bar) {
|
||||
this.instance.bar = bar;
|
||||
return this;
|
||||
}
|
||||
public ReadOnlyFirst.Builder baz(String baz) {
|
||||
this.instance.baz = baz;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ReadOnlyFirst instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ReadOnlyFirst build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ReadOnlyFirst.Builder builder() {
|
||||
return new ReadOnlyFirst.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ReadOnlyFirst.Builder toBuilder() {
|
||||
return new ReadOnlyFirst.Builder()
|
||||
.bar(getBar())
|
||||
.baz(getBaz());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class ScaleneTriangle {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ScaleneTriangle instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ScaleneTriangle());
|
||||
}
|
||||
|
||||
protected Builder(ScaleneTriangle instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ScaleneTriangle.Builder shapeType(String shapeType) {
|
||||
this.instance.shapeType = shapeType;
|
||||
return this;
|
||||
}
|
||||
public ScaleneTriangle.Builder triangleType(String triangleType) {
|
||||
this.instance.triangleType = triangleType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ScaleneTriangle instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ScaleneTriangle build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ScaleneTriangle.Builder builder() {
|
||||
return new ScaleneTriangle.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ScaleneTriangle.Builder toBuilder() {
|
||||
return new ScaleneTriangle.Builder()
|
||||
.shapeType(getShapeType())
|
||||
.triangleType(getTriangleType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class ShapeInterface {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private ShapeInterface instance;
|
||||
|
||||
public Builder() {
|
||||
this(new ShapeInterface());
|
||||
}
|
||||
|
||||
protected Builder(ShapeInterface instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public ShapeInterface.Builder shapeType(String shapeType) {
|
||||
this.instance.shapeType = shapeType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built ShapeInterface instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public ShapeInterface build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static ShapeInterface.Builder builder() {
|
||||
return new ShapeInterface.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public ShapeInterface.Builder toBuilder() {
|
||||
return new ShapeInterface.Builder()
|
||||
.shapeType(getShapeType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class SimpleQuadrilateral {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private SimpleQuadrilateral instance;
|
||||
|
||||
public Builder() {
|
||||
this(new SimpleQuadrilateral());
|
||||
}
|
||||
|
||||
protected Builder(SimpleQuadrilateral instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public SimpleQuadrilateral.Builder shapeType(String shapeType) {
|
||||
this.instance.shapeType = shapeType;
|
||||
return this;
|
||||
}
|
||||
public SimpleQuadrilateral.Builder quadrilateralType(String quadrilateralType) {
|
||||
this.instance.quadrilateralType = quadrilateralType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built SimpleQuadrilateral instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public SimpleQuadrilateral build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static SimpleQuadrilateral.Builder builder() {
|
||||
return new SimpleQuadrilateral.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public SimpleQuadrilateral.Builder toBuilder() {
|
||||
return new SimpleQuadrilateral.Builder()
|
||||
.shapeType(getShapeType())
|
||||
.quadrilateralType(getQuadrilateralType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class SpecialModelName {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private SpecialModelName instance;
|
||||
|
||||
public Builder() {
|
||||
this(new SpecialModelName());
|
||||
}
|
||||
|
||||
protected Builder(SpecialModelName instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public SpecialModelName.Builder $specialPropertyName(Long $specialPropertyName) {
|
||||
this.instance.$specialPropertyName = $specialPropertyName;
|
||||
return this;
|
||||
}
|
||||
public SpecialModelName.Builder specialModelName(String specialModelName) {
|
||||
this.instance.specialModelName = specialModelName;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built SpecialModelName instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public SpecialModelName build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static SpecialModelName.Builder builder() {
|
||||
return new SpecialModelName.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public SpecialModelName.Builder toBuilder() {
|
||||
return new SpecialModelName.Builder()
|
||||
.$specialPropertyName(get$SpecialPropertyName())
|
||||
.specialModelName(getSpecialModelName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -182,5 +182,64 @@ public class Tag {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Tag instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Tag());
|
||||
}
|
||||
|
||||
protected Builder(Tag instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Tag.Builder id(Long id) {
|
||||
this.instance.id = id;
|
||||
return this;
|
||||
}
|
||||
public Tag.Builder name(String name) {
|
||||
this.instance.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Tag instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Tag build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Tag.Builder builder() {
|
||||
return new Tag.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Tag.Builder toBuilder() {
|
||||
return new Tag.Builder()
|
||||
.id(getId())
|
||||
.name(getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -199,5 +199,59 @@ public class TestInlineFreeformAdditionalPropertiesRequest extends HashMap<Strin
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private TestInlineFreeformAdditionalPropertiesRequest instance;
|
||||
|
||||
public Builder() {
|
||||
this(new TestInlineFreeformAdditionalPropertiesRequest());
|
||||
}
|
||||
|
||||
protected Builder(TestInlineFreeformAdditionalPropertiesRequest instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(String someProperty) {
|
||||
this.instance.someProperty = someProperty;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built TestInlineFreeformAdditionalPropertiesRequest instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public TestInlineFreeformAdditionalPropertiesRequest build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static TestInlineFreeformAdditionalPropertiesRequest.Builder builder() {
|
||||
return new TestInlineFreeformAdditionalPropertiesRequest.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public TestInlineFreeformAdditionalPropertiesRequest.Builder toBuilder() {
|
||||
return new TestInlineFreeformAdditionalPropertiesRequest.Builder()
|
||||
.someProperty(getSomeProperty());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,5 +146,59 @@ public class TriangleInterface {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private TriangleInterface instance;
|
||||
|
||||
public Builder() {
|
||||
this(new TriangleInterface());
|
||||
}
|
||||
|
||||
protected Builder(TriangleInterface instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public TriangleInterface.Builder triangleType(String triangleType) {
|
||||
this.instance.triangleType = triangleType;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built TriangleInterface instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public TriangleInterface build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static TriangleInterface.Builder builder() {
|
||||
return new TriangleInterface.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public TriangleInterface.Builder toBuilder() {
|
||||
return new TriangleInterface.Builder()
|
||||
.triangleType(getTriangleType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -581,5 +581,126 @@ public class User {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private User instance;
|
||||
|
||||
public Builder() {
|
||||
this(new User());
|
||||
}
|
||||
|
||||
protected Builder(User instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public User.Builder id(Long id) {
|
||||
this.instance.id = id;
|
||||
return this;
|
||||
}
|
||||
public User.Builder username(String username) {
|
||||
this.instance.username = username;
|
||||
return this;
|
||||
}
|
||||
public User.Builder firstName(String firstName) {
|
||||
this.instance.firstName = firstName;
|
||||
return this;
|
||||
}
|
||||
public User.Builder lastName(String lastName) {
|
||||
this.instance.lastName = lastName;
|
||||
return this;
|
||||
}
|
||||
public User.Builder email(String email) {
|
||||
this.instance.email = email;
|
||||
return this;
|
||||
}
|
||||
public User.Builder password(String password) {
|
||||
this.instance.password = password;
|
||||
return this;
|
||||
}
|
||||
public User.Builder phone(String phone) {
|
||||
this.instance.phone = phone;
|
||||
return this;
|
||||
}
|
||||
public User.Builder userStatus(Integer userStatus) {
|
||||
this.instance.userStatus = userStatus;
|
||||
return this;
|
||||
}
|
||||
public User.Builder objectWithNoDeclaredProps(Object objectWithNoDeclaredProps) {
|
||||
this.instance.objectWithNoDeclaredProps = objectWithNoDeclaredProps;
|
||||
return this;
|
||||
}
|
||||
public User.Builder objectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) {
|
||||
this.instance.objectWithNoDeclaredPropsNullable = JsonNullable.<Object>of(objectWithNoDeclaredPropsNullable);
|
||||
return this;
|
||||
}
|
||||
public User.Builder objectWithNoDeclaredPropsNullable(JsonNullable<Object> objectWithNoDeclaredPropsNullable) {
|
||||
this.instance.objectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable;
|
||||
return this;
|
||||
}
|
||||
public User.Builder anyTypeProp(Object anyTypeProp) {
|
||||
this.instance.anyTypeProp = JsonNullable.<Object>of(anyTypeProp);
|
||||
return this;
|
||||
}
|
||||
public User.Builder anyTypeProp(JsonNullable<Object> anyTypeProp) {
|
||||
this.instance.anyTypeProp = anyTypeProp;
|
||||
return this;
|
||||
}
|
||||
public User.Builder anyTypePropNullable(Object anyTypePropNullable) {
|
||||
this.instance.anyTypePropNullable = JsonNullable.<Object>of(anyTypePropNullable);
|
||||
return this;
|
||||
}
|
||||
public User.Builder anyTypePropNullable(JsonNullable<Object> anyTypePropNullable) {
|
||||
this.instance.anyTypePropNullable = anyTypePropNullable;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built User instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public User build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static User.Builder builder() {
|
||||
return new User.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public User.Builder toBuilder() {
|
||||
return new User.Builder()
|
||||
.id(getId())
|
||||
.username(getUsername())
|
||||
.firstName(getFirstName())
|
||||
.lastName(getLastName())
|
||||
.email(getEmail())
|
||||
.password(getPassword())
|
||||
.phone(getPhone())
|
||||
.userStatus(getUserStatus())
|
||||
.objectWithNoDeclaredProps(getObjectWithNoDeclaredProps())
|
||||
.objectWithNoDeclaredPropsNullable(getObjectWithNoDeclaredPropsNullable())
|
||||
.anyTypeProp(getAnyTypeProp())
|
||||
.anyTypePropNullable(getAnyTypePropNullable());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -218,5 +218,69 @@ public class Whale {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Whale instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Whale());
|
||||
}
|
||||
|
||||
protected Builder(Whale instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Whale.Builder hasBaleen(Boolean hasBaleen) {
|
||||
this.instance.hasBaleen = hasBaleen;
|
||||
return this;
|
||||
}
|
||||
public Whale.Builder hasTeeth(Boolean hasTeeth) {
|
||||
this.instance.hasTeeth = hasTeeth;
|
||||
return this;
|
||||
}
|
||||
public Whale.Builder className(String className) {
|
||||
this.instance.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Whale instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Whale build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Whale.Builder builder() {
|
||||
return new Whale.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Whale.Builder toBuilder() {
|
||||
return new Whale.Builder()
|
||||
.hasBaleen(getHasBaleen())
|
||||
.hasTeeth(getHasTeeth())
|
||||
.className(getClassName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -272,5 +272,64 @@ public class Zebra extends HashMap<String, Object> {
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Zebra instance;
|
||||
|
||||
public Builder() {
|
||||
this(new Zebra());
|
||||
}
|
||||
|
||||
protected Builder(Zebra instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
public Zebra.Builder type(TypeEnum type) {
|
||||
this.instance.type = type;
|
||||
return this;
|
||||
}
|
||||
public Zebra.Builder className(String className) {
|
||||
this.instance.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns a built Zebra instance.
|
||||
*
|
||||
* The builder is not reusable.
|
||||
*/
|
||||
public Zebra build() {
|
||||
try {
|
||||
return this.instance;
|
||||
} finally {
|
||||
// ensure that this.instance is not reused
|
||||
this.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass() + "=(" + instance + ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with no initialized field.
|
||||
*/
|
||||
public static Zebra.Builder builder() {
|
||||
return new Zebra.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with a shallow copy of this instance.
|
||||
*/
|
||||
public Zebra.Builder toBuilder() {
|
||||
return new Zebra.Builder()
|
||||
.type(getType())
|
||||
.className(getClassName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user