Add null pointer check to add/put methods (#5385) (#5386)

Commit e3d04ee01 (issue #5240) introduced unsafe add/put methods for optional
list/map parameters. This change maintains the spirit of issue #5240 (optional
containers are null by default) while still making add/put calls safe. It does
this by checking for null first and, if so, initializing it with an empty
container.

Also updated the affected samples using the various scripts in bin/.
This commit is contained in:
Benjamin Douglas 2017-04-13 02:37:49 -07:00 committed by wing328
parent df1055fe38
commit ab69ce5dc3
180 changed files with 881 additions and 66 deletions

View File

@ -44,6 +44,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
{{#isListContainer}}
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.add({{name}}Item);
return this;
}
@ -51,6 +56,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
{{#isMapContainer}}
public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.put(key, {{name}}Item);
return this;
}

View File

@ -40,6 +40,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#isListContainer}}
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.add({{name}}Item);
return this;
}
@ -47,6 +52,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#isMapContainer}}
public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.put(key, {{name}}Item);
return this;
}

View File

@ -38,6 +38,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#isListContainer}}
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.add({{name}}Item);
return this;
}
@ -45,6 +50,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#isMapContainer}}
public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.put(key, {{name}}Item);
return this;
}

View File

@ -43,6 +43,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#isListContainer}}
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.add({{name}}Item);
return this;
}
@ -50,6 +55,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#isMapContainer}}
public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.put(key, {{name}}Item);
return this;
}

View File

@ -40,6 +40,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#isListContainer}}
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.add({{name}}Item);
return this;
}
@ -47,6 +52,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#isMapContainer}}
public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
{{^required}}
if (this.{{name}} == null) {
this.{{name}} = {{{defaultValue}}};
}
{{/required}}
this.{{name}}.put(key, {{name}}Item);
return this;
}

View File

@ -39,6 +39,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -62,6 +65,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -42,6 +42,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -65,6 +68,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -88,6 +94,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -116,6 +116,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -69,6 +69,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -92,6 +95,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -81,6 +81,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -161,6 +161,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -39,6 +39,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -62,6 +65,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -42,6 +42,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -65,6 +68,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -88,6 +94,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -116,6 +116,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -69,6 +69,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -92,6 +95,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -81,6 +81,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -161,6 +161,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -39,6 +39,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -62,6 +65,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -42,6 +42,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -65,6 +68,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -88,6 +94,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -116,6 +116,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -69,6 +69,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -92,6 +95,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -81,6 +81,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -161,6 +161,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -39,6 +39,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -62,6 +65,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -42,6 +42,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -65,6 +68,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -88,6 +94,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -116,6 +116,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -69,6 +69,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -92,6 +95,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -81,6 +81,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -161,6 +161,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -39,6 +39,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -62,6 +65,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -36,6 +36,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -42,6 +42,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -65,6 +68,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -88,6 +94,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -116,6 +116,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -69,6 +69,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -92,6 +95,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -81,6 +81,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -161,6 +161,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -29,10 +29,10 @@ import android.os.Parcel;
public class AdditionalPropertiesClass implements Parcelable {
@SerializedName("map_property")
private Map<String, String> mapProperty = new HashMap<String, String>();
private Map<String, String> mapProperty = null;
@SerializedName("map_of_map_property")
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<String, Map<String, String>>();
private Map<String, Map<String, String>> mapOfMapProperty = null;
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
@ -40,6 +40,9 @@ public class AdditionalPropertiesClass implements Parcelable {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -63,6 +66,9 @@ public class AdditionalPropertiesClass implements Parcelable {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -29,7 +29,7 @@ import android.os.Parcel;
public class ArrayOfArrayOfNumberOnly implements Parcelable {
@SerializedName("ArrayArrayNumber")
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
@ -37,6 +37,9 @@ public class ArrayOfArrayOfNumberOnly implements Parcelable {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -29,7 +29,7 @@ import android.os.Parcel;
public class ArrayOfNumberOnly implements Parcelable {
@SerializedName("ArrayNumber")
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
@ -37,6 +37,9 @@ public class ArrayOfNumberOnly implements Parcelable {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -29,13 +29,13 @@ import android.os.Parcel;
public class ArrayTest implements Parcelable {
@SerializedName("array_of_string")
private List<String> arrayOfString = new ArrayList<String>();
private List<String> arrayOfString = null;
@SerializedName("array_array_of_integer")
private List<List<Long>> arrayArrayOfInteger = new ArrayList<List<Long>>();
private List<List<Long>> arrayArrayOfInteger = null;
@SerializedName("array_array_of_model")
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
@ -43,6 +43,9 @@ public class ArrayTest implements Parcelable {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -66,6 +69,9 @@ public class ArrayTest implements Parcelable {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -89,6 +95,9 @@ public class ArrayTest implements Parcelable {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -75,7 +75,7 @@ public class EnumArrays implements Parcelable {
}
@SerializedName("array_enum")
private List<ArrayEnumEnum> arrayEnum = new ArrayList<ArrayEnumEnum>();
private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
@ -101,6 +101,9 @@ public class EnumArrays implements Parcelable {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -29,7 +29,7 @@ import android.os.Parcel;
public class MapTest implements Parcelable {
@SerializedName("map_map_of_string")
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
private Map<String, Map<String, String>> mapMapOfString = null;
/**
* Gets or Sets inner
@ -54,7 +54,7 @@ public class MapTest implements Parcelable {
}
@SerializedName("map_of_enum_string")
private Map<String, InnerEnum> mapOfEnumString = new HashMap<String, InnerEnum>();
private Map<String, InnerEnum> mapOfEnumString = null;
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
@ -62,6 +62,9 @@ public class MapTest implements Parcelable {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -85,6 +88,9 @@ public class MapTest implements Parcelable {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -38,7 +38,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable {
private DateTime dateTime = null;
@SerializedName("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
@ -82,6 +82,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -42,7 +42,7 @@ public class Pet implements Parcelable {
private List<String> photoUrls = new ArrayList<String>();
@SerializedName("tags")
private List<Tag> tags = new ArrayList<Tag>();
private List<Tag> tags = null;
/**
* pet status in the store
@ -155,6 +155,9 @@ public class Pet implements Parcelable {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -38,6 +38,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -61,6 +64,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -35,6 +35,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -35,6 +35,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -41,6 +41,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -64,6 +67,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -87,6 +93,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -99,6 +99,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -60,6 +60,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -83,6 +86,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -80,6 +80,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -153,6 +153,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -38,6 +38,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -61,6 +64,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -35,6 +35,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -35,6 +35,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -41,6 +41,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -64,6 +67,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -87,6 +93,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -99,6 +99,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -60,6 +60,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -83,6 +86,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -80,6 +80,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -153,6 +153,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -40,6 +40,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -63,6 +66,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -37,6 +37,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -37,6 +37,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -43,6 +43,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -66,6 +69,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -89,6 +95,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -117,6 +117,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -70,6 +70,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -93,6 +96,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -82,6 +82,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -164,6 +164,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -38,6 +38,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -61,6 +64,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -35,6 +35,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -35,6 +35,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -41,6 +41,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -64,6 +67,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -87,6 +93,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -99,6 +99,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -60,6 +60,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -83,6 +86,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -80,6 +80,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -153,6 +153,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -38,6 +38,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -61,6 +64,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -35,6 +35,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -35,6 +35,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -41,6 +41,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -64,6 +67,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -87,6 +93,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -99,6 +99,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -60,6 +60,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -83,6 +86,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -80,6 +80,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

View File

@ -153,6 +153,9 @@ public class Pet {
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}

View File

@ -27,10 +27,10 @@ import java.util.Map;
public class AdditionalPropertiesClass {
@SerializedName("map_property")
private Map<String, String> mapProperty = new HashMap<String, String>();
private Map<String, String> mapProperty = null;
@SerializedName("map_of_map_property")
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<String, Map<String, String>>();
private Map<String, Map<String, String>> mapOfMapProperty = null;
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
@ -38,6 +38,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
@ -61,6 +64,9 @@ public class AdditionalPropertiesClass {
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}

View File

@ -27,7 +27,7 @@ import java.util.List;
public class ArrayOfArrayOfNumberOnly {
@SerializedName("ArrayArrayNumber")
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
@ -35,6 +35,9 @@ public class ArrayOfArrayOfNumberOnly {
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}

View File

@ -27,7 +27,7 @@ import java.util.List;
public class ArrayOfNumberOnly {
@SerializedName("ArrayNumber")
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
@ -35,6 +35,9 @@ public class ArrayOfNumberOnly {
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}

View File

@ -27,13 +27,13 @@ import java.util.List;
public class ArrayTest {
@SerializedName("array_of_string")
private List<String> arrayOfString = new ArrayList<String>();
private List<String> arrayOfString = null;
@SerializedName("array_array_of_integer")
private List<List<Long>> arrayArrayOfInteger = new ArrayList<List<Long>>();
private List<List<Long>> arrayArrayOfInteger = null;
@SerializedName("array_array_of_model")
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
@ -41,6 +41,9 @@ public class ArrayTest {
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
@ -64,6 +67,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
@ -87,6 +93,9 @@ public class ArrayTest {
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}

View File

@ -73,7 +73,7 @@ public class EnumArrays {
}
@SerializedName("array_enum")
private List<ArrayEnumEnum> arrayEnum = new ArrayList<ArrayEnumEnum>();
private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
@ -99,6 +99,9 @@ public class EnumArrays {
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}

View File

@ -27,7 +27,7 @@ import java.util.Map;
public class MapTest {
@SerializedName("map_map_of_string")
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
private Map<String, Map<String, String>> mapMapOfString = null;
/**
* Gets or Sets inner
@ -52,7 +52,7 @@ public class MapTest {
}
@SerializedName("map_of_enum_string")
private Map<String, InnerEnum> mapOfEnumString = new HashMap<String, InnerEnum>();
private Map<String, InnerEnum> mapOfEnumString = null;
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
@ -60,6 +60,9 @@ public class MapTest {
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
@ -83,6 +86,9 @@ public class MapTest {
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}

View File

@ -36,7 +36,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
private DateTime dateTime = null;
@SerializedName("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
@ -80,6 +80,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}

Some files were not shown because too many files have changed in this diff Show More