From 010dad209a918a900fd640840d700e07ec3cdd7c Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Thu, 20 Feb 2020 16:13:53 +0100 Subject: [PATCH] [go-experimental] Add model constructors to initialize non-container vars with defaults (#5175) * [go-experimental] Add model constructors to initialize non-container vars with defaults * Add docstring and extend model_doc to include the constructor * Make variable names in constructor follow Go naming guidelines * Provide 2 different constructurs as suggested + couple fixes to generate constructors right under all circumstances * Fix defaults for enums * Properly escape vars that have reserved names --- .../GoClientExperimentalCodegen.java | 60 +++++++++++++++++-- .../resources/go-experimental/model.mustache | 38 ++++++++++++ .../go-experimental/model_doc.mustache | 17 ++++++ .../docs/AdditionalPropertiesAnyType.md | 17 ++++++ .../docs/AdditionalPropertiesArray.md | 17 ++++++ .../docs/AdditionalPropertiesBoolean.md | 17 ++++++ .../docs/AdditionalPropertiesClass.md | 17 ++++++ .../docs/AdditionalPropertiesInteger.md | 17 ++++++ .../docs/AdditionalPropertiesNumber.md | 17 ++++++ .../docs/AdditionalPropertiesObject.md | 17 ++++++ .../docs/AdditionalPropertiesString.md | 17 ++++++ .../go-petstore/docs/Animal.md | 19 +++++- .../go-petstore/docs/ApiResponse.md | 17 ++++++ .../docs/ArrayOfArrayOfNumberOnly.md | 17 ++++++ .../go-petstore/docs/ArrayOfNumberOnly.md | 17 ++++++ .../go-petstore/docs/ArrayTest.md | 17 ++++++ .../go-petstore/docs/BigCat.md | 17 ++++++ .../go-petstore/docs/BigCatAllOf.md | 17 ++++++ .../go-petstore/docs/Capitalization.md | 17 ++++++ .../go-experimental/go-petstore/docs/Cat.md | 17 ++++++ .../go-petstore/docs/CatAllOf.md | 17 ++++++ .../go-petstore/docs/Category.md | 19 +++++- .../go-petstore/docs/ClassModel.md | 17 ++++++ .../go-petstore/docs/Client.md | 17 ++++++ .../go-experimental/go-petstore/docs/Dog.md | 17 ++++++ .../go-petstore/docs/DogAllOf.md | 17 ++++++ .../go-petstore/docs/EnumArrays.md | 17 ++++++ .../go-petstore/docs/EnumTest.md | 17 ++++++ .../go-petstore/docs/FakeApi.md | 8 +-- .../go-experimental/go-petstore/docs/File.md | 17 ++++++ .../go-petstore/docs/FileSchemaTestClass.md | 17 ++++++ .../go-petstore/docs/FormatTest.md | 17 ++++++ .../go-petstore/docs/HasOnlyReadOnly.md | 17 ++++++ .../go-experimental/go-petstore/docs/List.md | 17 ++++++ .../go-petstore/docs/MapTest.md | 17 ++++++ ...dPropertiesAndAdditionalPropertiesClass.md | 17 ++++++ .../go-petstore/docs/Model200Response.md | 17 ++++++ .../go-experimental/go-petstore/docs/Name.md | 17 ++++++ .../go-petstore/docs/NumberOnly.md | 17 ++++++ .../go-experimental/go-petstore/docs/Order.md | 17 ++++++ .../go-petstore/docs/OuterComposite.md | 17 ++++++ .../go-experimental/go-petstore/docs/Pet.md | 17 ++++++ .../go-petstore/docs/ReadOnlyFirst.md | 17 ++++++ .../go-petstore/docs/Return.md | 17 ++++++ .../go-petstore/docs/SpecialModelName.md | 17 ++++++ .../go-experimental/go-petstore/docs/Tag.md | 17 ++++++ .../go-petstore/docs/TypeHolderDefault.md | 19 +++++- .../go-petstore/docs/TypeHolderExample.md | 17 ++++++ .../go-experimental/go-petstore/docs/User.md | 17 ++++++ .../go-petstore/docs/XmlItem.md | 17 ++++++ .../go-petstore/model_200_response.go | 17 ++++++ .../model_additional_properties_any_type.go | 17 ++++++ .../model_additional_properties_array.go | 17 ++++++ .../model_additional_properties_boolean.go | 17 ++++++ .../model_additional_properties_class.go | 17 ++++++ .../model_additional_properties_integer.go | 17 ++++++ .../model_additional_properties_number.go | 17 ++++++ .../model_additional_properties_object.go | 17 ++++++ .../model_additional_properties_string.go | 17 ++++++ .../go-petstore/model_animal.go | 22 +++++++ .../go-petstore/model_api_response.go | 17 ++++++ .../model_array_of_array_of_number_only.go | 17 ++++++ .../go-petstore/model_array_of_number_only.go | 17 ++++++ .../go-petstore/model_array_test_.go | 17 ++++++ .../go-petstore/model_big_cat.go | 17 ++++++ .../go-petstore/model_big_cat_all_of.go | 17 ++++++ .../go-petstore/model_capitalization.go | 17 ++++++ .../go-experimental/go-petstore/model_cat.go | 17 ++++++ .../go-petstore/model_cat_all_of.go | 17 ++++++ .../go-petstore/model_category.go | 20 +++++++ .../go-petstore/model_class_model.go | 17 ++++++ .../go-petstore/model_client.go | 17 ++++++ .../go-experimental/go-petstore/model_dog.go | 17 ++++++ .../go-petstore/model_dog_all_of.go | 17 ++++++ .../go-petstore/model_enum_arrays.go | 17 ++++++ .../go-petstore/model_enum_test_.go | 18 ++++++ .../go-experimental/go-petstore/model_file.go | 17 ++++++ .../model_file_schema_test_class.go | 17 ++++++ .../go-petstore/model_format_test_.go | 21 +++++++ .../go-petstore/model_has_only_read_only.go | 17 ++++++ .../go-experimental/go-petstore/model_list.go | 17 ++++++ .../go-petstore/model_map_test_.go | 17 ++++++ ...perties_and_additional_properties_class.go | 17 ++++++ .../go-experimental/go-petstore/model_name.go | 18 ++++++ .../go-petstore/model_number_only.go | 17 ++++++ .../go-petstore/model_order.go | 21 +++++++ .../go-petstore/model_outer_composite.go | 17 ++++++ .../go-experimental/go-petstore/model_pet.go | 19 ++++++ .../go-petstore/model_read_only_first.go | 17 ++++++ .../go-petstore/model_return.go | 17 ++++++ .../go-petstore/model_special_model_name.go | 17 ++++++ .../go-experimental/go-petstore/model_tag.go | 17 ++++++ .../go-petstore/model_type_holder_default.go | 26 ++++++++ .../go-petstore/model_type_holder_example.go | 23 +++++++ .../go-experimental/go-petstore/model_user.go | 17 ++++++ .../go-petstore/model_xml_item.go | 17 ++++++ .../docs/AdditionalPropertiesClass.md | 17 ++++++ .../go-petstore/docs/Animal.md | 19 +++++- .../go-petstore/docs/ApiResponse.md | 17 ++++++ .../docs/ArrayOfArrayOfNumberOnly.md | 17 ++++++ .../go-petstore/docs/ArrayOfNumberOnly.md | 17 ++++++ .../go-petstore/docs/ArrayTest.md | 17 ++++++ .../go-petstore/docs/Capitalization.md | 17 ++++++ .../go-experimental/go-petstore/docs/Cat.md | 17 ++++++ .../go-petstore/docs/CatAllOf.md | 17 ++++++ .../go-petstore/docs/Category.md | 19 +++++- .../go-petstore/docs/ClassModel.md | 17 ++++++ .../go-petstore/docs/Client.md | 17 ++++++ .../go-experimental/go-petstore/docs/Dog.md | 17 ++++++ .../go-petstore/docs/DogAllOf.md | 17 ++++++ .../go-petstore/docs/EnumArrays.md | 17 ++++++ .../go-petstore/docs/EnumTest.md | 21 ++++++- .../go-petstore/docs/FakeApi.md | 8 +-- .../go-experimental/go-petstore/docs/File.md | 17 ++++++ .../go-petstore/docs/FileSchemaTestClass.md | 17 ++++++ .../go-experimental/go-petstore/docs/Foo.md | 19 +++++- .../go-petstore/docs/FormatTest.md | 17 ++++++ .../go-petstore/docs/HasOnlyReadOnly.md | 17 ++++++ .../go-petstore/docs/HealthCheckResult.md | 17 ++++++ .../go-petstore/docs/InlineObject.md | 17 ++++++ .../go-petstore/docs/InlineObject1.md | 17 ++++++ .../go-petstore/docs/InlineObject2.md | 19 +++++- .../go-petstore/docs/InlineObject3.md | 17 ++++++ .../go-petstore/docs/InlineObject4.md | 17 ++++++ .../go-petstore/docs/InlineObject5.md | 17 ++++++ .../go-petstore/docs/InlineResponseDefault.md | 17 ++++++ .../go-experimental/go-petstore/docs/List.md | 17 ++++++ .../go-petstore/docs/MapTest.md | 17 ++++++ ...dPropertiesAndAdditionalPropertiesClass.md | 17 ++++++ .../go-petstore/docs/Model200Response.md | 17 ++++++ .../go-experimental/go-petstore/docs/Name.md | 17 ++++++ .../go-petstore/docs/NullableClass.md | 17 ++++++ .../go-petstore/docs/NumberOnly.md | 17 ++++++ .../go-experimental/go-petstore/docs/Order.md | 17 ++++++ .../go-petstore/docs/OuterComposite.md | 17 ++++++ .../go-experimental/go-petstore/docs/Pet.md | 17 ++++++ .../go-petstore/docs/ReadOnlyFirst.md | 17 ++++++ .../go-petstore/docs/Return.md | 17 ++++++ .../go-petstore/docs/SpecialModelName.md | 17 ++++++ .../go-experimental/go-petstore/docs/Tag.md | 17 ++++++ .../go-experimental/go-petstore/docs/User.md | 17 ++++++ .../go-petstore/model_200_response.go | 17 ++++++ .../go-petstore/model__special_model_name_.go | 17 ++++++ .../model_additional_properties_class.go | 17 ++++++ .../go-petstore/model_animal.go | 22 +++++++ .../go-petstore/model_api_response.go | 17 ++++++ .../model_array_of_array_of_number_only.go | 17 ++++++ .../go-petstore/model_array_of_number_only.go | 17 ++++++ .../go-petstore/model_array_test_.go | 17 ++++++ .../go-petstore/model_capitalization.go | 17 ++++++ .../go-experimental/go-petstore/model_cat.go | 17 ++++++ .../go-petstore/model_cat_all_of.go | 17 ++++++ .../go-petstore/model_category.go | 20 +++++++ .../go-petstore/model_class_model.go | 17 ++++++ .../go-petstore/model_client.go | 17 ++++++ .../go-experimental/go-petstore/model_dog.go | 17 ++++++ .../go-petstore/model_dog_all_of.go | 17 ++++++ .../go-petstore/model_enum_arrays.go | 17 ++++++ .../go-petstore/model_enum_test_.go | 26 ++++++++ .../go-experimental/go-petstore/model_file.go | 17 ++++++ .../model_file_schema_test_class.go | 17 ++++++ .../go-experimental/go-petstore/model_foo.go | 21 +++++++ .../go-petstore/model_format_test_.go | 21 +++++++ .../go-petstore/model_has_only_read_only.go | 17 ++++++ .../go-petstore/model_health_check_result.go | 17 ++++++ .../go-petstore/model_inline_object.go | 17 ++++++ .../go-petstore/model_inline_object_1.go | 17 ++++++ .../go-petstore/model_inline_object_2.go | 21 +++++++ .../go-petstore/model_inline_object_3.go | 21 +++++++ .../go-petstore/model_inline_object_4.go | 19 ++++++ .../go-petstore/model_inline_object_5.go | 18 ++++++ .../model_inline_response_default.go | 17 ++++++ .../go-experimental/go-petstore/model_list.go | 17 ++++++ .../go-petstore/model_map_test_.go | 17 ++++++ ...perties_and_additional_properties_class.go | 17 ++++++ .../go-experimental/go-petstore/model_name.go | 18 ++++++ .../go-petstore/model_nullable_class.go | 17 ++++++ .../go-petstore/model_number_only.go | 17 ++++++ .../go-petstore/model_order.go | 21 +++++++ .../go-petstore/model_outer_composite.go | 17 ++++++ .../go-experimental/go-petstore/model_pet.go | 19 ++++++ .../go-petstore/model_read_only_first.go | 17 ++++++ .../go-petstore/model_return.go | 17 ++++++ .../go-experimental/go-petstore/model_tag.go | 17 ++++++ .../go-experimental/go-petstore/model_user.go | 17 ++++++ 185 files changed, 3266 insertions(+), 21 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java index 64801956c08..25cab60eba2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java @@ -16,6 +16,7 @@ package org.openapitools.codegen.languages; +import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.security.SecurityScheme; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; @@ -23,14 +24,12 @@ import org.openapitools.codegen.CodegenSecurity; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -97,6 +96,59 @@ public class GoClientExperimentalCodegen extends GoClientCodegen { return camelize(toModel(name, false)); } + public String escapeReservedWord(String name) { + if (this.reservedWordsMappings().containsKey(name)) { + return this.reservedWordsMappings().get(name); + } + return name + '_'; + } + + @Override + public String toEnumDefaultValue(String value, String datatype) { + String prefix = ""; + if (enumClassPrefix) { + prefix = datatype.toUpperCase(Locale.ROOT) + "_"; + } + return prefix + value; + } + + @Override + public void updateCodegenPropertyEnum(CodegenProperty var) { + // make sure the inline enums have plain defaults (e.g. string, int, float) + String enumDefault = null; + if (var.isEnum && var.defaultValue != null) { + enumDefault = var.defaultValue; + } + super.updateCodegenPropertyEnum(var); + if (var.isEnum && enumDefault != null) { + var.defaultValue = enumDefault; + } + } + + @Override + public String toDefaultValue(Schema p) { + p = ModelUtils.getReferencedSchema(this.openAPI, p); + if (ModelUtils.isStringSchema(p)) { + if (p.getDefault() != null) { + return "\"" + escapeText((String) p.getDefault()) + "\""; + } + return null; + } + + return super.toDefaultValue(p); + } + + @Override + public CodegenProperty fromProperty(String name, Schema p) { + CodegenProperty prop = super.fromProperty(name, p); + String cc = camelize(prop.name, true); + if (isReservedWord(cc)) { + cc = escapeReservedWord(cc); + } + prop.nameInCamelCase = cc; + return prop; + } + @Override public Map postProcessModels(Map objs) { diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache index bdb0cc433f2..d7737fc33fb 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache @@ -52,6 +52,44 @@ type {{classname}} struct { {{^isEnum}} {{^vendorExtensions.x-is-one-of-interface}} +// New{{classname}} instantiates a new {{classname}} object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}} { + this := {{classname}}{} +{{#vars}} +{{#required}} + this.{{name}} = {{nameInCamelCase}} +{{/required}} +{{^required}} +{{#defaultValue}} +{{^isContainer}} + var {{nameInCamelCase}} {{{dataType}}} = {{#isNullable}}{{{dataType}}}{Value: {{/isNullable}}{{{.}}}{{#isNullable}} }{{/isNullable}} + this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}} +{{/isContainer}} +{{/defaultValue}} +{{/required}} +{{/vars}} + return &this +} + +// New{{classname}}WithDefaults instantiates a new {{classname}} object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func New{{classname}}WithDefaults() *{{classname}} { + this := {{classname}}{} +{{#vars}} +{{#defaultValue}} +{{^isContainer}} + var {{nameInCamelCase}} {{{dataType}}} = {{#isNullable}}{{{dataType}}}{Value: {{/isNullable}}{{{.}}}{{#isNullable}} }{{/isNullable}} + this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}} +{{/isContainer}} +{{/defaultValue}} +{{/vars}} + return &this +} + {{#vars}} {{#required}} // Get{{name}} returns the {{name}} field value diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache index 8b7683a8b26..d65510b0e74 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache @@ -16,6 +16,23 @@ Name | Type | Description | Notes ## Methods {{^vendorExtensions.x-is-one-of-interface}} +### New{{classname}} + +`func New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}}` + +New{{classname}} instantiates a new {{classname}} object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### New{{classname}}WithDefaults + +`func New{{classname}}WithDefaults() *{{classname}}` + +New{{classname}}WithDefaults instantiates a new {{classname}} object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + {{#vars}} ### Get{{name}} diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md index d6a64a17629..d8844341836 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesAnyType + +`func NewAdditionalPropertiesAnyType() *AdditionalPropertiesAnyType` + +NewAdditionalPropertiesAnyType instantiates a new AdditionalPropertiesAnyType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesAnyTypeWithDefaults + +`func NewAdditionalPropertiesAnyTypeWithDefaults() *AdditionalPropertiesAnyType` + +NewAdditionalPropertiesAnyTypeWithDefaults instantiates a new AdditionalPropertiesAnyType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *AdditionalPropertiesAnyType) GetName() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md index 8fa3956c6cb..abf35273f07 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesArray + +`func NewAdditionalPropertiesArray() *AdditionalPropertiesArray` + +NewAdditionalPropertiesArray instantiates a new AdditionalPropertiesArray object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesArrayWithDefaults + +`func NewAdditionalPropertiesArrayWithDefaults() *AdditionalPropertiesArray` + +NewAdditionalPropertiesArrayWithDefaults instantiates a new AdditionalPropertiesArray object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *AdditionalPropertiesArray) GetName() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md index dab05846a08..96c7719026b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesBoolean + +`func NewAdditionalPropertiesBoolean() *AdditionalPropertiesBoolean` + +NewAdditionalPropertiesBoolean instantiates a new AdditionalPropertiesBoolean object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesBooleanWithDefaults + +`func NewAdditionalPropertiesBooleanWithDefaults() *AdditionalPropertiesBoolean` + +NewAdditionalPropertiesBooleanWithDefaults instantiates a new AdditionalPropertiesBoolean object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *AdditionalPropertiesBoolean) GetName() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index 8b22e0ef339..e682a1bcff7 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -18,6 +18,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesClass + +`func NewAdditionalPropertiesClass() *AdditionalPropertiesClass` + +NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesClassWithDefaults + +`func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass` + +NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetMapString `func (o *AdditionalPropertiesClass) GetMapString() map[string]string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md index 9bed1f72584..8ce65eab96b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesInteger + +`func NewAdditionalPropertiesInteger() *AdditionalPropertiesInteger` + +NewAdditionalPropertiesInteger instantiates a new AdditionalPropertiesInteger object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesIntegerWithDefaults + +`func NewAdditionalPropertiesIntegerWithDefaults() *AdditionalPropertiesInteger` + +NewAdditionalPropertiesIntegerWithDefaults instantiates a new AdditionalPropertiesInteger object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *AdditionalPropertiesInteger) GetName() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md index efc3cc156c1..18f9a942e99 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesNumber + +`func NewAdditionalPropertiesNumber() *AdditionalPropertiesNumber` + +NewAdditionalPropertiesNumber instantiates a new AdditionalPropertiesNumber object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesNumberWithDefaults + +`func NewAdditionalPropertiesNumberWithDefaults() *AdditionalPropertiesNumber` + +NewAdditionalPropertiesNumberWithDefaults instantiates a new AdditionalPropertiesNumber object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *AdditionalPropertiesNumber) GetName() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md index af396344684..0d511d3bf0e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesObject + +`func NewAdditionalPropertiesObject() *AdditionalPropertiesObject` + +NewAdditionalPropertiesObject instantiates a new AdditionalPropertiesObject object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesObjectWithDefaults + +`func NewAdditionalPropertiesObjectWithDefaults() *AdditionalPropertiesObject` + +NewAdditionalPropertiesObjectWithDefaults instantiates a new AdditionalPropertiesObject object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *AdditionalPropertiesObject) GetName() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md index 0934f9bf504..6533cd5f734 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesString + +`func NewAdditionalPropertiesString() *AdditionalPropertiesString` + +NewAdditionalPropertiesString instantiates a new AdditionalPropertiesString object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesStringWithDefaults + +`func NewAdditionalPropertiesStringWithDefaults() *AdditionalPropertiesString` + +NewAdditionalPropertiesStringWithDefaults instantiates a new AdditionalPropertiesString object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *AdditionalPropertiesString) GetName() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md b/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md index 55133b29745..8bccff5eb4d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md @@ -5,10 +5,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | Pointer to **string** | | -**Color** | Pointer to **string** | | [optional] [default to red] +**Color** | Pointer to **string** | | [optional] [default to "red"] ## Methods +### NewAnimal + +`func NewAnimal(className string, ) *Animal` + +NewAnimal instantiates a new Animal object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnimalWithDefaults + +`func NewAnimalWithDefaults() *Animal` + +NewAnimalWithDefaults instantiates a new Animal object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetClassName `func (o *Animal) GetClassName() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md b/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md index b0c891bbc96..aeb34407fa4 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md @@ -10,6 +10,23 @@ Name | Type | Description | Notes ## Methods +### NewApiResponse + +`func NewApiResponse() *ApiResponse` + +NewApiResponse instantiates a new ApiResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApiResponseWithDefaults + +`func NewApiResponseWithDefaults() *ApiResponse` + +NewApiResponseWithDefaults instantiates a new ApiResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetCode `func (o *ApiResponse) GetCode() int32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md index 64ad908ea3b..882bdf15eab 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewArrayOfArrayOfNumberOnly + +`func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly` + +NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArrayOfArrayOfNumberOnlyWithDefaults + +`func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly` + +NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetArrayArrayNumber `func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md index 0ce95922a5e..7355a0ce13e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewArrayOfNumberOnly + +`func NewArrayOfNumberOnly() *ArrayOfNumberOnly` + +NewArrayOfNumberOnly instantiates a new ArrayOfNumberOnly object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArrayOfNumberOnlyWithDefaults + +`func NewArrayOfNumberOnlyWithDefaults() *ArrayOfNumberOnly` + +NewArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfNumberOnly object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetArrayNumber `func (o *ArrayOfNumberOnly) GetArrayNumber() []float32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md index f7020fadea3..e2b623a2412 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md @@ -10,6 +10,23 @@ Name | Type | Description | Notes ## Methods +### NewArrayTest + +`func NewArrayTest() *ArrayTest` + +NewArrayTest instantiates a new ArrayTest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArrayTestWithDefaults + +`func NewArrayTestWithDefaults() *ArrayTest` + +NewArrayTestWithDefaults instantiates a new ArrayTest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetArrayOfString `func (o *ArrayTest) GetArrayOfString() []string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md b/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md index 1f1f446d027..86ca5fd22b6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewBigCat + +`func NewBigCat() *BigCat` + +NewBigCat instantiates a new BigCat object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBigCatWithDefaults + +`func NewBigCatWithDefaults() *BigCat` + +NewBigCatWithDefaults instantiates a new BigCat object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetKind `func (o *BigCat) GetKind() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/BigCatAllOf.md b/samples/client/petstore/go-experimental/go-petstore/docs/BigCatAllOf.md index c886448d38d..bc15e3fc18f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/BigCatAllOf.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/BigCatAllOf.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewBigCatAllOf + +`func NewBigCatAllOf() *BigCatAllOf` + +NewBigCatAllOf instantiates a new BigCatAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBigCatAllOfWithDefaults + +`func NewBigCatAllOfWithDefaults() *BigCatAllOf` + +NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetKind `func (o *BigCatAllOf) GetKind() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md b/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md index a4772d74006..45c74e97903 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md @@ -13,6 +13,23 @@ Name | Type | Description | Notes ## Methods +### NewCapitalization + +`func NewCapitalization() *Capitalization` + +NewCapitalization instantiates a new Capitalization object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCapitalizationWithDefaults + +`func NewCapitalizationWithDefaults() *Capitalization` + +NewCapitalizationWithDefaults instantiates a new Capitalization object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetSmallCamel `func (o *Capitalization) GetSmallCamel() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md b/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md index c7ea3b3adfb..415cabfdce7 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewCat + +`func NewCat() *Cat` + +NewCat instantiates a new Cat object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCatWithDefaults + +`func NewCatWithDefaults() *Cat` + +NewCatWithDefaults instantiates a new Cat object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetDeclawed `func (o *Cat) GetDeclawed() bool` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md b/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md index 85f40d251d9..62d0919f473 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewCatAllOf + +`func NewCatAllOf() *CatAllOf` + +NewCatAllOf instantiates a new CatAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCatAllOfWithDefaults + +`func NewCatAllOfWithDefaults() *CatAllOf` + +NewCatAllOfWithDefaults instantiates a new CatAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetDeclawed `func (o *CatAllOf) GetDeclawed() bool` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Category.md b/samples/client/petstore/go-experimental/go-petstore/docs/Category.md index 88b525bade1..7f77b6cc7a2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Category.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Category.md @@ -5,10 +5,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | Pointer to **int64** | | [optional] -**Name** | Pointer to **string** | | [default to default-name] +**Name** | Pointer to **string** | | [default to "default-name"] ## Methods +### NewCategory + +`func NewCategory(name string, ) *Category` + +NewCategory instantiates a new Category object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCategoryWithDefaults + +`func NewCategoryWithDefaults() *Category` + +NewCategoryWithDefaults instantiates a new Category object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *Category) GetId() int64` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md b/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md index d9c4f41e98b..11a115ee706 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewClassModel + +`func NewClassModel() *ClassModel` + +NewClassModel instantiates a new ClassModel object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewClassModelWithDefaults + +`func NewClassModelWithDefaults() *ClassModel` + +NewClassModelWithDefaults instantiates a new ClassModel object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetClass `func (o *ClassModel) GetClass() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Client.md b/samples/client/petstore/go-experimental/go-petstore/docs/Client.md index 5ed3098fd49..187225fe5ad 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Client.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Client.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewClient + +`func NewClient() *Client` + +NewClient instantiates a new Client object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewClientWithDefaults + +`func NewClientWithDefaults() *Client` + +NewClientWithDefaults instantiates a new Client object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetClient `func (o *Client) GetClient() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md b/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md index ddc5be776dc..1251c1b134f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewDog + +`func NewDog() *Dog` + +NewDog instantiates a new Dog object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDogWithDefaults + +`func NewDogWithDefaults() *Dog` + +NewDogWithDefaults instantiates a new Dog object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBreed `func (o *Dog) GetBreed() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md b/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md index a3169521cec..177637eeaa8 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewDogAllOf + +`func NewDogAllOf() *DogAllOf` + +NewDogAllOf instantiates a new DogAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDogAllOfWithDefaults + +`func NewDogAllOfWithDefaults() *DogAllOf` + +NewDogAllOfWithDefaults instantiates a new DogAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBreed `func (o *DogAllOf) GetBreed() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md b/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md index 31d7b2b9faa..684a0f982b5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewEnumArrays + +`func NewEnumArrays() *EnumArrays` + +NewEnumArrays instantiates a new EnumArrays object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEnumArraysWithDefaults + +`func NewEnumArraysWithDefaults() *EnumArrays` + +NewEnumArraysWithDefaults instantiates a new EnumArrays object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetJustSymbol `func (o *EnumArrays) GetJustSymbol() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md index d0e7aebc42d..8eabc13126c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md @@ -12,6 +12,23 @@ Name | Type | Description | Notes ## Methods +### NewEnumTest + +`func NewEnumTest(enumStringRequired string, ) *EnumTest` + +NewEnumTest instantiates a new EnumTest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEnumTestWithDefaults + +`func NewEnumTestWithDefaults() *EnumTest` + +NewEnumTestWithDefaults instantiates a new EnumTest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetEnumString `func (o *EnumTest) GetEnumString() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md index c81d4523824..c9d3b6cd625 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -404,13 +404,13 @@ Other parameters are passed through a pointer to a apiTestEnumParametersRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**[]string**](string.md) | Header parameter enum test (string array) | - **enumHeaderString** | **string** | Header parameter enum test (string) | [default to -efg] + **enumHeaderString** | **string** | Header parameter enum test (string) | [default to "-efg"] **enumQueryStringArray** | [**[]string**](string.md) | Query parameter enum test (string array) | - **enumQueryString** | **string** | Query parameter enum test (string) | [default to -efg] + **enumQueryString** | **string** | Query parameter enum test (string) | [default to "-efg"] **enumQueryInteger** | **int32** | Query parameter enum test (double) | **enumQueryDouble** | **float64** | Query parameter enum test (double) | - **enumFormStringArray** | [**[]string**](string.md) | Form parameter enum test (string array) | [default to $] - **enumFormString** | **string** | Form parameter enum test (string) | [default to -efg] + **enumFormStringArray** | [**[]string**](string.md) | Form parameter enum test (string array) | [default to "$"] + **enumFormString** | **string** | Form parameter enum test (string) | [default to "-efg"] ### Return type diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/File.md b/samples/client/petstore/go-experimental/go-petstore/docs/File.md index 454b159609c..507191f19b6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/File.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/File.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewFile + +`func NewFile() *File` + +NewFile instantiates a new File object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFileWithDefaults + +`func NewFileWithDefaults() *File` + +NewFileWithDefaults instantiates a new File object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetSourceURI `func (o *File) GetSourceURI() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md index d4a4da7206c..37f671ef8f8 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewFileSchemaTestClass + +`func NewFileSchemaTestClass() *FileSchemaTestClass` + +NewFileSchemaTestClass instantiates a new FileSchemaTestClass object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFileSchemaTestClassWithDefaults + +`func NewFileSchemaTestClassWithDefaults() *FileSchemaTestClass` + +NewFileSchemaTestClassWithDefaults instantiates a new FileSchemaTestClass object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetFile `func (o *FileSchemaTestClass) GetFile() File` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md index c1633f9cae2..f7226cc51eb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md @@ -21,6 +21,23 @@ Name | Type | Description | Notes ## Methods +### NewFormatTest + +`func NewFormatTest(number float32, byte_ string, date string, password string, ) *FormatTest` + +NewFormatTest instantiates a new FormatTest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFormatTestWithDefaults + +`func NewFormatTestWithDefaults() *FormatTest` + +NewFormatTestWithDefaults instantiates a new FormatTest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetInteger `func (o *FormatTest) GetInteger() int32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md index b5502272ce3..84d8266d59f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewHasOnlyReadOnly + +`func NewHasOnlyReadOnly() *HasOnlyReadOnly` + +NewHasOnlyReadOnly instantiates a new HasOnlyReadOnly object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHasOnlyReadOnlyWithDefaults + +`func NewHasOnlyReadOnlyWithDefaults() *HasOnlyReadOnly` + +NewHasOnlyReadOnlyWithDefaults instantiates a new HasOnlyReadOnly object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBar `func (o *HasOnlyReadOnly) GetBar() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/List.md b/samples/client/petstore/go-experimental/go-petstore/docs/List.md index ca8849936e7..4d914555e33 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/List.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/List.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewList + +`func NewList() *List` + +NewList instantiates a new List object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListWithDefaults + +`func NewListWithDefaults() *List` + +NewListWithDefaults instantiates a new List object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetVar123List `func (o *List) GetVar123List() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md index 6c84c2e89c2..c752f6e86b5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md @@ -11,6 +11,23 @@ Name | Type | Description | Notes ## Methods +### NewMapTest + +`func NewMapTest() *MapTest` + +NewMapTest instantiates a new MapTest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMapTestWithDefaults + +`func NewMapTestWithDefaults() *MapTest` + +NewMapTestWithDefaults instantiates a new MapTest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetMapMapOfString `func (o *MapTest) GetMapMapOfString() map[string]map[string]string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 49f7c8eb768..2a1eb5eaba3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -10,6 +10,23 @@ Name | Type | Description | Notes ## Methods +### NewMixedPropertiesAndAdditionalPropertiesClass + +`func NewMixedPropertiesAndAdditionalPropertiesClass() *MixedPropertiesAndAdditionalPropertiesClass` + +NewMixedPropertiesAndAdditionalPropertiesClass instantiates a new MixedPropertiesAndAdditionalPropertiesClass object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults + +`func NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults() *MixedPropertiesAndAdditionalPropertiesClass` + +NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults instantiates a new MixedPropertiesAndAdditionalPropertiesClass object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetUuid `func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md b/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md index d0bde7b7f7b..00bce3a9909 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewModel200Response + +`func NewModel200Response() *Model200Response` + +NewModel200Response instantiates a new Model200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewModel200ResponseWithDefaults + +`func NewModel200ResponseWithDefaults() *Model200Response` + +NewModel200ResponseWithDefaults instantiates a new Model200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *Model200Response) GetName() int32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Name.md b/samples/client/petstore/go-experimental/go-petstore/docs/Name.md index 6104c42bebd..cbcab366761 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Name.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Name.md @@ -11,6 +11,23 @@ Name | Type | Description | Notes ## Methods +### NewName + +`func NewName(name int32, ) *Name` + +NewName instantiates a new Name object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNameWithDefaults + +`func NewNameWithDefaults() *Name` + +NewNameWithDefaults instantiates a new Name object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *Name) GetName() int32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md index c8dcac264c2..2a30b0b1283 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewNumberOnly + +`func NewNumberOnly() *NumberOnly` + +NewNumberOnly instantiates a new NumberOnly object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNumberOnlyWithDefaults + +`func NewNumberOnlyWithDefaults() *NumberOnly` + +NewNumberOnlyWithDefaults instantiates a new NumberOnly object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetJustNumber `func (o *NumberOnly) GetJustNumber() float32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Order.md b/samples/client/petstore/go-experimental/go-petstore/docs/Order.md index 8aa8bbd1ee5..71bb824a6ca 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Order.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Order.md @@ -13,6 +13,23 @@ Name | Type | Description | Notes ## Methods +### NewOrder + +`func NewOrder() *Order` + +NewOrder instantiates a new Order object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderWithDefaults + +`func NewOrderWithDefaults() *Order` + +NewOrderWithDefaults instantiates a new Order object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *Order) GetId() int64` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md b/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md index f8908022282..e91d7b978ae 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md @@ -10,6 +10,23 @@ Name | Type | Description | Notes ## Methods +### NewOuterComposite + +`func NewOuterComposite() *OuterComposite` + +NewOuterComposite instantiates a new OuterComposite object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOuterCompositeWithDefaults + +`func NewOuterCompositeWithDefaults() *OuterComposite` + +NewOuterCompositeWithDefaults instantiates a new OuterComposite object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetMyNumber `func (o *OuterComposite) GetMyNumber() float32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md b/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md index dba9589f9d7..faa1e31e870 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md @@ -13,6 +13,23 @@ Name | Type | Description | Notes ## Methods +### NewPet + +`func NewPet(name string, photoUrls []string, ) *Pet` + +NewPet instantiates a new Pet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPetWithDefaults + +`func NewPetWithDefaults() *Pet` + +NewPetWithDefaults instantiates a new Pet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *Pet) GetId() int64` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md b/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md index ce2ff23bc61..c0ee88a7036 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewReadOnlyFirst + +`func NewReadOnlyFirst() *ReadOnlyFirst` + +NewReadOnlyFirst instantiates a new ReadOnlyFirst object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReadOnlyFirstWithDefaults + +`func NewReadOnlyFirstWithDefaults() *ReadOnlyFirst` + +NewReadOnlyFirstWithDefaults instantiates a new ReadOnlyFirst object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBar `func (o *ReadOnlyFirst) GetBar() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Return.md b/samples/client/petstore/go-experimental/go-petstore/docs/Return.md index 1facabb6bbf..1437ef84e52 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Return.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Return.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewReturn + +`func NewReturn() *Return` + +NewReturn instantiates a new Return object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReturnWithDefaults + +`func NewReturnWithDefaults() *Return` + +NewReturnWithDefaults instantiates a new Return object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetReturn `func (o *Return) GetReturn() int32` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md b/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md index 34d8d8d89c7..c273842c32b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewSpecialModelName + +`func NewSpecialModelName() *SpecialModelName` + +NewSpecialModelName instantiates a new SpecialModelName object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSpecialModelNameWithDefaults + +`func NewSpecialModelNameWithDefaults() *SpecialModelName` + +NewSpecialModelNameWithDefaults instantiates a new SpecialModelName object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetSpecialPropertyName `func (o *SpecialModelName) GetSpecialPropertyName() int64` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md b/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md index bf868298a5e..84b8770dac0 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewTag + +`func NewTag() *Tag` + +NewTag instantiates a new Tag object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTagWithDefaults + +`func NewTagWithDefaults() *Tag` + +NewTagWithDefaults instantiates a new Tag object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *Tag) GetId() int64` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md index 85097ef9fbe..e75e6b96ae6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**StringItem** | Pointer to **string** | | [default to what] +**StringItem** | Pointer to **string** | | [default to "what"] **NumberItem** | Pointer to **float32** | | **IntegerItem** | Pointer to **int32** | | **BoolItem** | Pointer to **bool** | | [default to true] @@ -12,6 +12,23 @@ Name | Type | Description | Notes ## Methods +### NewTypeHolderDefault + +`func NewTypeHolderDefault(stringItem string, numberItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderDefault` + +NewTypeHolderDefault instantiates a new TypeHolderDefault object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTypeHolderDefaultWithDefaults + +`func NewTypeHolderDefaultWithDefaults() *TypeHolderDefault` + +NewTypeHolderDefaultWithDefaults instantiates a new TypeHolderDefault object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetStringItem `func (o *TypeHolderDefault) GetStringItem() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md index 3f9349a9b9a..1c19f186fc7 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md @@ -13,6 +13,23 @@ Name | Type | Description | Notes ## Methods +### NewTypeHolderExample + +`func NewTypeHolderExample(stringItem string, numberItem float32, floatItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderExample` + +NewTypeHolderExample instantiates a new TypeHolderExample object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTypeHolderExampleWithDefaults + +`func NewTypeHolderExampleWithDefaults() *TypeHolderExample` + +NewTypeHolderExampleWithDefaults instantiates a new TypeHolderExample object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetStringItem `func (o *TypeHolderExample) GetStringItem() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/User.md b/samples/client/petstore/go-experimental/go-petstore/docs/User.md index 8b93a65d8ab..e9720af9fb7 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/User.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/User.md @@ -15,6 +15,23 @@ Name | Type | Description | Notes ## Methods +### NewUser + +`func NewUser() *User` + +NewUser instantiates a new User object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserWithDefaults + +`func NewUserWithDefaults() *User` + +NewUserWithDefaults instantiates a new User object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *User) GetId() int64` diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md b/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md index 99c95015d5f..6798de558fb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md @@ -36,6 +36,23 @@ Name | Type | Description | Notes ## Methods +### NewXmlItem + +`func NewXmlItem() *XmlItem` + +NewXmlItem instantiates a new XmlItem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewXmlItemWithDefaults + +`func NewXmlItemWithDefaults() *XmlItem` + +NewXmlItemWithDefaults instantiates a new XmlItem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetAttributeString `func (o *XmlItem) GetAttributeString() string` diff --git a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go index b4e9becc59c..8c2c0f493c0 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go @@ -20,6 +20,23 @@ type Model200Response struct { Class *string `json:"class,omitempty"` } +// NewModel200Response instantiates a new Model200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModel200Response() *Model200Response { + this := Model200Response{} + return &this +} + +// NewModel200ResponseWithDefaults instantiates a new Model200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModel200ResponseWithDefaults() *Model200Response { + this := Model200Response{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *Model200Response) GetName() int32 { if o == nil || o.Name == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go index 72a28831595..6c3d6a60e3b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go @@ -19,6 +19,23 @@ type AdditionalPropertiesAnyType struct { Name *string `json:"name,omitempty"` } +// NewAdditionalPropertiesAnyType instantiates a new AdditionalPropertiesAnyType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesAnyType() *AdditionalPropertiesAnyType { + this := AdditionalPropertiesAnyType{} + return &this +} + +// NewAdditionalPropertiesAnyTypeWithDefaults instantiates a new AdditionalPropertiesAnyType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesAnyTypeWithDefaults() *AdditionalPropertiesAnyType { + this := AdditionalPropertiesAnyType{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesAnyType) GetName() string { if o == nil || o.Name == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go index 1a20f680cb9..c6e4f9716c5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go @@ -19,6 +19,23 @@ type AdditionalPropertiesArray struct { Name *string `json:"name,omitempty"` } +// NewAdditionalPropertiesArray instantiates a new AdditionalPropertiesArray object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesArray() *AdditionalPropertiesArray { + this := AdditionalPropertiesArray{} + return &this +} + +// NewAdditionalPropertiesArrayWithDefaults instantiates a new AdditionalPropertiesArray object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesArrayWithDefaults() *AdditionalPropertiesArray { + this := AdditionalPropertiesArray{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesArray) GetName() string { if o == nil || o.Name == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go index 218547d406c..7115a99e8f6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go @@ -19,6 +19,23 @@ type AdditionalPropertiesBoolean struct { Name *string `json:"name,omitempty"` } +// NewAdditionalPropertiesBoolean instantiates a new AdditionalPropertiesBoolean object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesBoolean() *AdditionalPropertiesBoolean { + this := AdditionalPropertiesBoolean{} + return &this +} + +// NewAdditionalPropertiesBooleanWithDefaults instantiates a new AdditionalPropertiesBoolean object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesBooleanWithDefaults() *AdditionalPropertiesBoolean { + this := AdditionalPropertiesBoolean{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesBoolean) GetName() string { if o == nil || o.Name == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 1a9c27fbd66..21a01f1b92f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -29,6 +29,23 @@ type AdditionalPropertiesClass struct { Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"` } +// NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesClass() *AdditionalPropertiesClass { + this := AdditionalPropertiesClass{} + return &this +} + +// NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass { + this := AdditionalPropertiesClass{} + return &this +} + // GetMapString returns the MapString field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapString() map[string]string { if o == nil || o.MapString == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go index 40e13711d00..26323e4ff51 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go @@ -19,6 +19,23 @@ type AdditionalPropertiesInteger struct { Name *string `json:"name,omitempty"` } +// NewAdditionalPropertiesInteger instantiates a new AdditionalPropertiesInteger object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesInteger() *AdditionalPropertiesInteger { + this := AdditionalPropertiesInteger{} + return &this +} + +// NewAdditionalPropertiesIntegerWithDefaults instantiates a new AdditionalPropertiesInteger object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesIntegerWithDefaults() *AdditionalPropertiesInteger { + this := AdditionalPropertiesInteger{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesInteger) GetName() string { if o == nil || o.Name == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go index 36cd75cd687..3e25a072407 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go @@ -19,6 +19,23 @@ type AdditionalPropertiesNumber struct { Name *string `json:"name,omitempty"` } +// NewAdditionalPropertiesNumber instantiates a new AdditionalPropertiesNumber object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesNumber() *AdditionalPropertiesNumber { + this := AdditionalPropertiesNumber{} + return &this +} + +// NewAdditionalPropertiesNumberWithDefaults instantiates a new AdditionalPropertiesNumber object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesNumberWithDefaults() *AdditionalPropertiesNumber { + this := AdditionalPropertiesNumber{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesNumber) GetName() string { if o == nil || o.Name == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go index 3b284106f61..3b460ec5f3b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go @@ -19,6 +19,23 @@ type AdditionalPropertiesObject struct { Name *string `json:"name,omitempty"` } +// NewAdditionalPropertiesObject instantiates a new AdditionalPropertiesObject object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesObject() *AdditionalPropertiesObject { + this := AdditionalPropertiesObject{} + return &this +} + +// NewAdditionalPropertiesObjectWithDefaults instantiates a new AdditionalPropertiesObject object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesObjectWithDefaults() *AdditionalPropertiesObject { + this := AdditionalPropertiesObject{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesObject) GetName() string { if o == nil || o.Name == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go index c0e754757bd..5165cb2e1b3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go @@ -19,6 +19,23 @@ type AdditionalPropertiesString struct { Name *string `json:"name,omitempty"` } +// NewAdditionalPropertiesString instantiates a new AdditionalPropertiesString object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesString() *AdditionalPropertiesString { + this := AdditionalPropertiesString{} + return &this +} + +// NewAdditionalPropertiesStringWithDefaults instantiates a new AdditionalPropertiesString object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesStringWithDefaults() *AdditionalPropertiesString { + this := AdditionalPropertiesString{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *AdditionalPropertiesString) GetName() string { if o == nil || o.Name == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/client/petstore/go-experimental/go-petstore/model_animal.go index b54f59dbe61..47a4ba3a23a 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_animal.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_animal.go @@ -20,6 +20,28 @@ type Animal struct { Color *string `json:"color,omitempty"` } +// NewAnimal instantiates a new Animal object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnimal(className string, ) *Animal { + this := Animal{} + this.ClassName = className + var color string = "red" + this.Color = &color + return &this +} + +// NewAnimalWithDefaults instantiates a new Animal object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnimalWithDefaults() *Animal { + this := Animal{} + var color string = "red" + this.Color = &color + return &this +} + // GetClassName returns the ClassName field value func (o *Animal) GetClassName() string { if o == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go index 0b9eab9f759..f150cfafa43 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -21,6 +21,23 @@ type ApiResponse struct { Message *string `json:"message,omitempty"` } +// NewApiResponse instantiates a new ApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiResponse() *ApiResponse { + this := ApiResponse{} + return &this +} + +// NewApiResponseWithDefaults instantiates a new ApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiResponseWithDefaults() *ApiResponse { + this := ApiResponse{} + return &this +} + // GetCode returns the Code field value if set, zero value otherwise. func (o *ApiResponse) GetCode() int32 { if o == nil || o.Code == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go index f2dbbb1f21e..cc9815c9873 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go @@ -19,6 +19,23 @@ type ArrayOfArrayOfNumberOnly struct { ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` } +// NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly { + this := ArrayOfArrayOfNumberOnly{} + return &this +} + +// NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly { + this := ArrayOfArrayOfNumberOnly{} + return &this +} + // GetArrayArrayNumber returns the ArrayArrayNumber field value if set, zero value otherwise. func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { if o == nil || o.ArrayArrayNumber == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go index 9268a2ae608..49c1292100d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go @@ -19,6 +19,23 @@ type ArrayOfNumberOnly struct { ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` } +// NewArrayOfNumberOnly instantiates a new ArrayOfNumberOnly object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArrayOfNumberOnly() *ArrayOfNumberOnly { + this := ArrayOfNumberOnly{} + return &this +} + +// NewArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfNumberOnly object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArrayOfNumberOnlyWithDefaults() *ArrayOfNumberOnly { + this := ArrayOfNumberOnly{} + return &this +} + // GetArrayNumber returns the ArrayNumber field value if set, zero value otherwise. func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { if o == nil || o.ArrayNumber == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go index 84123ef137b..545d8338e88 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go @@ -21,6 +21,23 @@ type ArrayTest struct { ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` } +// NewArrayTest instantiates a new ArrayTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArrayTest() *ArrayTest { + this := ArrayTest{} + return &this +} + +// NewArrayTestWithDefaults instantiates a new ArrayTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArrayTestWithDefaults() *ArrayTest { + this := ArrayTest{} + return &this +} + // GetArrayOfString returns the ArrayOfString field value if set, zero value otherwise. func (o *ArrayTest) GetArrayOfString() []string { if o == nil || o.ArrayOfString == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go index 1960c5f32f6..28ba49d4af1 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go @@ -20,6 +20,23 @@ type BigCat struct { Kind *string `json:"kind,omitempty"` } +// NewBigCat instantiates a new BigCat object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBigCat() *BigCat { + this := BigCat{} + return &this +} + +// NewBigCatWithDefaults instantiates a new BigCat object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBigCatWithDefaults() *BigCat { + this := BigCat{} + return &this +} + // GetKind returns the Kind field value if set, zero value otherwise. func (o *BigCat) GetKind() string { if o == nil || o.Kind == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go index 2b1c83d7739..eccdf4fb4a2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go @@ -19,6 +19,23 @@ type BigCatAllOf struct { Kind *string `json:"kind,omitempty"` } +// NewBigCatAllOf instantiates a new BigCatAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBigCatAllOf() *BigCatAllOf { + this := BigCatAllOf{} + return &this +} + +// NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBigCatAllOfWithDefaults() *BigCatAllOf { + this := BigCatAllOf{} + return &this +} + // GetKind returns the Kind field value if set, zero value otherwise. func (o *BigCatAllOf) GetKind() string { if o == nil || o.Kind == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go index 8288d903b7b..d1198ae8602 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go @@ -25,6 +25,23 @@ type Capitalization struct { ATT_NAME *string `json:"ATT_NAME,omitempty"` } +// NewCapitalization instantiates a new Capitalization object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCapitalization() *Capitalization { + this := Capitalization{} + return &this +} + +// NewCapitalizationWithDefaults instantiates a new Capitalization object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCapitalizationWithDefaults() *Capitalization { + this := Capitalization{} + return &this +} + // GetSmallCamel returns the SmallCamel field value if set, zero value otherwise. func (o *Capitalization) GetSmallCamel() string { if o == nil || o.SmallCamel == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_cat.go index 0303bc0826a..4660d0cca09 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat.go @@ -20,6 +20,23 @@ type Cat struct { Declawed *bool `json:"declawed,omitempty"` } +// NewCat instantiates a new Cat object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCat() *Cat { + this := Cat{} + return &this +} + +// NewCatWithDefaults instantiates a new Cat object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCatWithDefaults() *Cat { + this := Cat{} + return &this +} + // GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *Cat) GetDeclawed() bool { if o == nil || o.Declawed == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go index 60ba5b0259f..27e6189a1e6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go @@ -19,6 +19,23 @@ type CatAllOf struct { Declawed *bool `json:"declawed,omitempty"` } +// NewCatAllOf instantiates a new CatAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCatAllOf() *CatAllOf { + this := CatAllOf{} + return &this +} + +// NewCatAllOfWithDefaults instantiates a new CatAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCatAllOfWithDefaults() *CatAllOf { + this := CatAllOf{} + return &this +} + // GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *CatAllOf) GetDeclawed() bool { if o == nil || o.Declawed == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_category.go b/samples/client/petstore/go-experimental/go-petstore/model_category.go index 0bf8c0a2fd2..f3a22034c48 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_category.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_category.go @@ -20,6 +20,26 @@ type Category struct { Name string `json:"name"` } +// NewCategory instantiates a new Category object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCategory(name string, ) *Category { + this := Category{} + this.Name = name + return &this +} + +// NewCategoryWithDefaults instantiates a new Category object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCategoryWithDefaults() *Category { + this := Category{} + var name string = "default-name" + this.Name = name + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Category) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go index 1621fc4acbd..cdc48b1bd9d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go @@ -19,6 +19,23 @@ type ClassModel struct { Class *string `json:"_class,omitempty"` } +// NewClassModel instantiates a new ClassModel object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewClassModel() *ClassModel { + this := ClassModel{} + return &this +} + +// NewClassModelWithDefaults instantiates a new ClassModel object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewClassModelWithDefaults() *ClassModel { + this := ClassModel{} + return &this +} + // GetClass returns the Class field value if set, zero value otherwise. func (o *ClassModel) GetClass() string { if o == nil || o.Class == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_client.go b/samples/client/petstore/go-experimental/go-petstore/model_client.go index 45f3fce18b4..447c7e2da53 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_client.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_client.go @@ -19,6 +19,23 @@ type Client struct { Client *string `json:"client,omitempty"` } +// NewClient instantiates a new Client object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewClient() *Client { + this := Client{} + return &this +} + +// NewClientWithDefaults instantiates a new Client object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewClientWithDefaults() *Client { + this := Client{} + return &this +} + // GetClient returns the Client field value if set, zero value otherwise. func (o *Client) GetClient() string { if o == nil || o.Client == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/client/petstore/go-experimental/go-petstore/model_dog.go index 17682057389..4bbfbc208de 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog.go @@ -20,6 +20,23 @@ type Dog struct { Breed *string `json:"breed,omitempty"` } +// NewDog instantiates a new Dog object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDog() *Dog { + this := Dog{} + return &this +} + +// NewDogWithDefaults instantiates a new Dog object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDogWithDefaults() *Dog { + this := Dog{} + return &this +} + // GetBreed returns the Breed field value if set, zero value otherwise. func (o *Dog) GetBreed() string { if o == nil || o.Breed == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go index c88dfaca2e0..27cc1210b4b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go @@ -19,6 +19,23 @@ type DogAllOf struct { Breed *string `json:"breed,omitempty"` } +// NewDogAllOf instantiates a new DogAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDogAllOf() *DogAllOf { + this := DogAllOf{} + return &this +} + +// NewDogAllOfWithDefaults instantiates a new DogAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDogAllOfWithDefaults() *DogAllOf { + this := DogAllOf{} + return &this +} + // GetBreed returns the Breed field value if set, zero value otherwise. func (o *DogAllOf) GetBreed() string { if o == nil || o.Breed == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go index 181a9287220..fe411a091b5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go @@ -20,6 +20,23 @@ type EnumArrays struct { ArrayEnum *[]string `json:"array_enum,omitempty"` } +// NewEnumArrays instantiates a new EnumArrays object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnumArrays() *EnumArrays { + this := EnumArrays{} + return &this +} + +// NewEnumArraysWithDefaults instantiates a new EnumArrays object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnumArraysWithDefaults() *EnumArrays { + this := EnumArrays{} + return &this +} + // GetJustSymbol returns the JustSymbol field value if set, zero value otherwise. func (o *EnumArrays) GetJustSymbol() string { if o == nil || o.JustSymbol == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go index c774c9b8f4f..322b3cc7599 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go @@ -23,6 +23,24 @@ type EnumTest struct { OuterEnum *OuterEnum `json:"outerEnum,omitempty"` } +// NewEnumTest instantiates a new EnumTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnumTest(enumStringRequired string, ) *EnumTest { + this := EnumTest{} + this.EnumStringRequired = enumStringRequired + return &this +} + +// NewEnumTestWithDefaults instantiates a new EnumTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnumTestWithDefaults() *EnumTest { + this := EnumTest{} + return &this +} + // GetEnumString returns the EnumString field value if set, zero value otherwise. func (o *EnumTest) GetEnumString() string { if o == nil || o.EnumString == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file.go b/samples/client/petstore/go-experimental/go-petstore/model_file.go index 23da628abcc..82e4bc173f8 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_file.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_file.go @@ -20,6 +20,23 @@ type File struct { SourceURI *string `json:"sourceURI,omitempty"` } +// NewFile instantiates a new File object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFile() *File { + this := File{} + return &this +} + +// NewFileWithDefaults instantiates a new File object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileWithDefaults() *File { + this := File{} + return &this +} + // GetSourceURI returns the SourceURI field value if set, zero value otherwise. func (o *File) GetSourceURI() string { if o == nil || o.SourceURI == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go index 50145af1223..74fbd77e22d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go @@ -20,6 +20,23 @@ type FileSchemaTestClass struct { Files *[]File `json:"files,omitempty"` } +// NewFileSchemaTestClass instantiates a new FileSchemaTestClass object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileSchemaTestClass() *FileSchemaTestClass { + this := FileSchemaTestClass{} + return &this +} + +// NewFileSchemaTestClassWithDefaults instantiates a new FileSchemaTestClass object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileSchemaTestClassWithDefaults() *FileSchemaTestClass { + this := FileSchemaTestClass{} + return &this +} + // GetFile returns the File field value if set, zero value otherwise. func (o *FileSchemaTestClass) GetFile() File { if o == nil || o.File == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go index 608a083d7eb..18255609dc9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -34,6 +34,27 @@ type FormatTest struct { BigDecimal *float64 `json:"BigDecimal,omitempty"` } +// NewFormatTest instantiates a new FormatTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFormatTest(number float32, byte_ string, date string, password string, ) *FormatTest { + this := FormatTest{} + this.Number = number + this.Byte = byte_ + this.Date = date + this.Password = password + return &this +} + +// NewFormatTestWithDefaults instantiates a new FormatTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFormatTestWithDefaults() *FormatTest { + this := FormatTest{} + return &this +} + // GetInteger returns the Integer field value if set, zero value otherwise. func (o *FormatTest) GetInteger() int32 { if o == nil || o.Integer == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go index 5394aa4007d..b6d1dd64eee 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go @@ -20,6 +20,23 @@ type HasOnlyReadOnly struct { Foo *string `json:"foo,omitempty"` } +// NewHasOnlyReadOnly instantiates a new HasOnlyReadOnly object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHasOnlyReadOnly() *HasOnlyReadOnly { + this := HasOnlyReadOnly{} + return &this +} + +// NewHasOnlyReadOnlyWithDefaults instantiates a new HasOnlyReadOnly object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHasOnlyReadOnlyWithDefaults() *HasOnlyReadOnly { + this := HasOnlyReadOnly{} + return &this +} + // GetBar returns the Bar field value if set, zero value otherwise. func (o *HasOnlyReadOnly) GetBar() string { if o == nil || o.Bar == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_list.go b/samples/client/petstore/go-experimental/go-petstore/model_list.go index 6259d7507a3..228c9d61fba 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_list.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_list.go @@ -19,6 +19,23 @@ type List struct { Var123List *string `json:"123-list,omitempty"` } +// NewList instantiates a new List object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewList() *List { + this := List{} + return &this +} + +// NewListWithDefaults instantiates a new List object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListWithDefaults() *List { + this := List{} + return &this +} + // GetVar123List returns the Var123List field value if set, zero value otherwise. func (o *List) GetVar123List() string { if o == nil || o.Var123List == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go index 820f2641347..e78ae4bf9b8 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go @@ -22,6 +22,23 @@ type MapTest struct { IndirectMap *map[string]bool `json:"indirect_map,omitempty"` } +// NewMapTest instantiates a new MapTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMapTest() *MapTest { + this := MapTest{} + return &this +} + +// NewMapTestWithDefaults instantiates a new MapTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMapTestWithDefaults() *MapTest { + this := MapTest{} + return &this +} + // GetMapMapOfString returns the MapMapOfString field value if set, zero value otherwise. func (o *MapTest) GetMapMapOfString() map[string]map[string]string { if o == nil || o.MapMapOfString == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go index c4a7dba8182..95a311b6543 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -22,6 +22,23 @@ type MixedPropertiesAndAdditionalPropertiesClass struct { Map *map[string]Animal `json:"map,omitempty"` } +// NewMixedPropertiesAndAdditionalPropertiesClass instantiates a new MixedPropertiesAndAdditionalPropertiesClass object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMixedPropertiesAndAdditionalPropertiesClass() *MixedPropertiesAndAdditionalPropertiesClass { + this := MixedPropertiesAndAdditionalPropertiesClass{} + return &this +} + +// NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults instantiates a new MixedPropertiesAndAdditionalPropertiesClass object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults() *MixedPropertiesAndAdditionalPropertiesClass { + this := MixedPropertiesAndAdditionalPropertiesClass{} + return &this +} + // GetUuid returns the Uuid field value if set, zero value otherwise. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { if o == nil || o.Uuid == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_name.go index 2f3716aad24..c205987518c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_name.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_name.go @@ -22,6 +22,24 @@ type Name struct { Var123Number *int32 `json:"123Number,omitempty"` } +// NewName instantiates a new Name object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewName(name int32, ) *Name { + this := Name{} + this.Name = name + return &this +} + +// NewNameWithDefaults instantiates a new Name object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNameWithDefaults() *Name { + this := Name{} + return &this +} + // GetName returns the Name field value func (o *Name) GetName() int32 { if o == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go index afa9c1b403a..576dcff8040 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go @@ -19,6 +19,23 @@ type NumberOnly struct { JustNumber *float32 `json:"JustNumber,omitempty"` } +// NewNumberOnly instantiates a new NumberOnly object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNumberOnly() *NumberOnly { + this := NumberOnly{} + return &this +} + +// NewNumberOnlyWithDefaults instantiates a new NumberOnly object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNumberOnlyWithDefaults() *NumberOnly { + this := NumberOnly{} + return &this +} + // GetJustNumber returns the JustNumber field value if set, zero value otherwise. func (o *NumberOnly) GetJustNumber() float32 { if o == nil || o.JustNumber == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_order.go b/samples/client/petstore/go-experimental/go-petstore/model_order.go index 448d6a975a4..aa4da6cf1b7 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_order.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_order.go @@ -26,6 +26,27 @@ type Order struct { Complete *bool `json:"complete,omitempty"` } +// NewOrder instantiates a new Order object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrder() *Order { + this := Order{} + var complete bool = false + this.Complete = &complete + return &this +} + +// NewOrderWithDefaults instantiates a new Order object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderWithDefaults() *Order { + this := Order{} + var complete bool = false + this.Complete = &complete + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Order) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go index 423d3e5ad37..a9a28d74233 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go @@ -21,6 +21,23 @@ type OuterComposite struct { MyBoolean *bool `json:"my_boolean,omitempty"` } +// NewOuterComposite instantiates a new OuterComposite object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOuterComposite() *OuterComposite { + this := OuterComposite{} + return &this +} + +// NewOuterCompositeWithDefaults instantiates a new OuterComposite object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOuterCompositeWithDefaults() *OuterComposite { + this := OuterComposite{} + return &this +} + // GetMyNumber returns the MyNumber field value if set, zero value otherwise. func (o *OuterComposite) GetMyNumber() float32 { if o == nil || o.MyNumber == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/client/petstore/go-experimental/go-petstore/model_pet.go index 7c1228c8b61..be788718449 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_pet.go @@ -25,6 +25,25 @@ type Pet struct { Status *string `json:"status,omitempty"` } +// NewPet instantiates a new Pet object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPet(name string, photoUrls []string, ) *Pet { + this := Pet{} + this.Name = name + this.PhotoUrls = photoUrls + return &this +} + +// NewPetWithDefaults instantiates a new Pet object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPetWithDefaults() *Pet { + this := Pet{} + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Pet) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go index 424ef8b81f3..d2668d83041 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go @@ -20,6 +20,23 @@ type ReadOnlyFirst struct { Baz *string `json:"baz,omitempty"` } +// NewReadOnlyFirst instantiates a new ReadOnlyFirst object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReadOnlyFirst() *ReadOnlyFirst { + this := ReadOnlyFirst{} + return &this +} + +// NewReadOnlyFirstWithDefaults instantiates a new ReadOnlyFirst object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReadOnlyFirstWithDefaults() *ReadOnlyFirst { + this := ReadOnlyFirst{} + return &this +} + // GetBar returns the Bar field value if set, zero value otherwise. func (o *ReadOnlyFirst) GetBar() string { if o == nil || o.Bar == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_return.go b/samples/client/petstore/go-experimental/go-petstore/model_return.go index 785303c992d..304c5ffafee 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_return.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_return.go @@ -19,6 +19,23 @@ type Return struct { Return *int32 `json:"return,omitempty"` } +// NewReturn instantiates a new Return object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReturn() *Return { + this := Return{} + return &this +} + +// NewReturnWithDefaults instantiates a new Return object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReturnWithDefaults() *Return { + this := Return{} + return &this +} + // GetReturn returns the Return field value if set, zero value otherwise. func (o *Return) GetReturn() int32 { if o == nil || o.Return == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go index e1827cee896..90de43b900f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go @@ -19,6 +19,23 @@ type SpecialModelName struct { SpecialPropertyName *int64 `json:"$special[property.name],omitempty"` } +// NewSpecialModelName instantiates a new SpecialModelName object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSpecialModelName() *SpecialModelName { + this := SpecialModelName{} + return &this +} + +// NewSpecialModelNameWithDefaults instantiates a new SpecialModelName object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSpecialModelNameWithDefaults() *SpecialModelName { + this := SpecialModelName{} + return &this +} + // GetSpecialPropertyName returns the SpecialPropertyName field value if set, zero value otherwise. func (o *SpecialModelName) GetSpecialPropertyName() int64 { if o == nil || o.SpecialPropertyName == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/client/petstore/go-experimental/go-petstore/model_tag.go index bcb30265ab2..abfc6737323 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_tag.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_tag.go @@ -20,6 +20,23 @@ type Tag struct { Name *string `json:"name,omitempty"` } +// NewTag instantiates a new Tag object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTag() *Tag { + this := Tag{} + return &this +} + +// NewTagWithDefaults instantiates a new Tag object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagWithDefaults() *Tag { + this := Tag{} + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Tag) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go index e57edcc4aa6..5ee112c7218 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go @@ -23,6 +23,32 @@ type TypeHolderDefault struct { ArrayItem []int32 `json:"array_item"` } +// NewTypeHolderDefault instantiates a new TypeHolderDefault object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTypeHolderDefault(stringItem string, numberItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderDefault { + this := TypeHolderDefault{} + this.StringItem = stringItem + this.NumberItem = numberItem + this.IntegerItem = integerItem + this.BoolItem = boolItem + this.ArrayItem = arrayItem + return &this +} + +// NewTypeHolderDefaultWithDefaults instantiates a new TypeHolderDefault object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTypeHolderDefaultWithDefaults() *TypeHolderDefault { + this := TypeHolderDefault{} + var stringItem string = "what" + this.StringItem = stringItem + var boolItem bool = true + this.BoolItem = boolItem + return &this +} + // GetStringItem returns the StringItem field value func (o *TypeHolderDefault) GetStringItem() string { if o == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go index 3837bcdbb60..d5b4e3e5a28 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go @@ -24,6 +24,29 @@ type TypeHolderExample struct { ArrayItem []int32 `json:"array_item"` } +// NewTypeHolderExample instantiates a new TypeHolderExample object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTypeHolderExample(stringItem string, numberItem float32, floatItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderExample { + this := TypeHolderExample{} + this.StringItem = stringItem + this.NumberItem = numberItem + this.FloatItem = floatItem + this.IntegerItem = integerItem + this.BoolItem = boolItem + this.ArrayItem = arrayItem + return &this +} + +// NewTypeHolderExampleWithDefaults instantiates a new TypeHolderExample object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTypeHolderExampleWithDefaults() *TypeHolderExample { + this := TypeHolderExample{} + return &this +} + // GetStringItem returns the StringItem field value func (o *TypeHolderExample) GetStringItem() string { if o == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_user.go b/samples/client/petstore/go-experimental/go-petstore/model_user.go index a427f7f7c24..54ed39fb709 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_user.go @@ -27,6 +27,23 @@ type User struct { UserStatus *int32 `json:"userStatus,omitempty"` } +// NewUser instantiates a new User object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUser() *User { + this := User{} + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserWithDefaults() *User { + this := User{} + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *User) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go index 6f81fca2b94..26addf9c27e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go @@ -47,6 +47,23 @@ type XmlItem struct { PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty"` } +// NewXmlItem instantiates a new XmlItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewXmlItem() *XmlItem { + this := XmlItem{} + return &this +} + +// NewXmlItemWithDefaults instantiates a new XmlItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewXmlItemWithDefaults() *XmlItem { + this := XmlItem{} + return &this +} + // GetAttributeString returns the AttributeString field value if set, zero value otherwise. func (o *XmlItem) GetAttributeString() string { if o == nil || o.AttributeString == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index 264d926fced..484cf4c0edb 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewAdditionalPropertiesClass + +`func NewAdditionalPropertiesClass() *AdditionalPropertiesClass` + +NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAdditionalPropertiesClassWithDefaults + +`func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass` + +NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetMapProperty `func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md index 55133b29745..8bccff5eb4d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md @@ -5,10 +5,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | Pointer to **string** | | -**Color** | Pointer to **string** | | [optional] [default to red] +**Color** | Pointer to **string** | | [optional] [default to "red"] ## Methods +### NewAnimal + +`func NewAnimal(className string, ) *Animal` + +NewAnimal instantiates a new Animal object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAnimalWithDefaults + +`func NewAnimalWithDefaults() *Animal` + +NewAnimalWithDefaults instantiates a new Animal object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetClassName `func (o *Animal) GetClassName() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md index b0c891bbc96..aeb34407fa4 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md @@ -10,6 +10,23 @@ Name | Type | Description | Notes ## Methods +### NewApiResponse + +`func NewApiResponse() *ApiResponse` + +NewApiResponse instantiates a new ApiResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApiResponseWithDefaults + +`func NewApiResponseWithDefaults() *ApiResponse` + +NewApiResponseWithDefaults instantiates a new ApiResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetCode `func (o *ApiResponse) GetCode() int32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md index 64ad908ea3b..882bdf15eab 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewArrayOfArrayOfNumberOnly + +`func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly` + +NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArrayOfArrayOfNumberOnlyWithDefaults + +`func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly` + +NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetArrayArrayNumber `func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md index 0ce95922a5e..7355a0ce13e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewArrayOfNumberOnly + +`func NewArrayOfNumberOnly() *ArrayOfNumberOnly` + +NewArrayOfNumberOnly instantiates a new ArrayOfNumberOnly object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArrayOfNumberOnlyWithDefaults + +`func NewArrayOfNumberOnlyWithDefaults() *ArrayOfNumberOnly` + +NewArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfNumberOnly object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetArrayNumber `func (o *ArrayOfNumberOnly) GetArrayNumber() []float32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md index f7020fadea3..e2b623a2412 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md @@ -10,6 +10,23 @@ Name | Type | Description | Notes ## Methods +### NewArrayTest + +`func NewArrayTest() *ArrayTest` + +NewArrayTest instantiates a new ArrayTest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArrayTestWithDefaults + +`func NewArrayTestWithDefaults() *ArrayTest` + +NewArrayTestWithDefaults instantiates a new ArrayTest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetArrayOfString `func (o *ArrayTest) GetArrayOfString() []string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md index a4772d74006..45c74e97903 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md @@ -13,6 +13,23 @@ Name | Type | Description | Notes ## Methods +### NewCapitalization + +`func NewCapitalization() *Capitalization` + +NewCapitalization instantiates a new Capitalization object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCapitalizationWithDefaults + +`func NewCapitalizationWithDefaults() *Capitalization` + +NewCapitalizationWithDefaults instantiates a new Capitalization object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetSmallCamel `func (o *Capitalization) GetSmallCamel() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md index c7ea3b3adfb..415cabfdce7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewCat + +`func NewCat() *Cat` + +NewCat instantiates a new Cat object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCatWithDefaults + +`func NewCatWithDefaults() *Cat` + +NewCatWithDefaults instantiates a new Cat object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetDeclawed `func (o *Cat) GetDeclawed() bool` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md index 85f40d251d9..62d0919f473 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewCatAllOf + +`func NewCatAllOf() *CatAllOf` + +NewCatAllOf instantiates a new CatAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCatAllOfWithDefaults + +`func NewCatAllOfWithDefaults() *CatAllOf` + +NewCatAllOfWithDefaults instantiates a new CatAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetDeclawed `func (o *CatAllOf) GetDeclawed() bool` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md index 88b525bade1..7f77b6cc7a2 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md @@ -5,10 +5,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | Pointer to **int64** | | [optional] -**Name** | Pointer to **string** | | [default to default-name] +**Name** | Pointer to **string** | | [default to "default-name"] ## Methods +### NewCategory + +`func NewCategory(name string, ) *Category` + +NewCategory instantiates a new Category object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCategoryWithDefaults + +`func NewCategoryWithDefaults() *Category` + +NewCategoryWithDefaults instantiates a new Category object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *Category) GetId() int64` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md index d9c4f41e98b..11a115ee706 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewClassModel + +`func NewClassModel() *ClassModel` + +NewClassModel instantiates a new ClassModel object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewClassModelWithDefaults + +`func NewClassModelWithDefaults() *ClassModel` + +NewClassModelWithDefaults instantiates a new ClassModel object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetClass `func (o *ClassModel) GetClass() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md index 5ed3098fd49..187225fe5ad 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewClient + +`func NewClient() *Client` + +NewClient instantiates a new Client object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewClientWithDefaults + +`func NewClientWithDefaults() *Client` + +NewClientWithDefaults instantiates a new Client object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetClient `func (o *Client) GetClient() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md index ddc5be776dc..1251c1b134f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewDog + +`func NewDog() *Dog` + +NewDog instantiates a new Dog object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDogWithDefaults + +`func NewDogWithDefaults() *Dog` + +NewDogWithDefaults instantiates a new Dog object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBreed `func (o *Dog) GetBreed() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md index a3169521cec..177637eeaa8 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewDogAllOf + +`func NewDogAllOf() *DogAllOf` + +NewDogAllOf instantiates a new DogAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDogAllOfWithDefaults + +`func NewDogAllOfWithDefaults() *DogAllOf` + +NewDogAllOfWithDefaults instantiates a new DogAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBreed `func (o *DogAllOf) GetBreed() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md index 31d7b2b9faa..684a0f982b5 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewEnumArrays + +`func NewEnumArrays() *EnumArrays` + +NewEnumArrays instantiates a new EnumArrays object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEnumArraysWithDefaults + +`func NewEnumArraysWithDefaults() *EnumArrays` + +NewEnumArraysWithDefaults instantiates a new EnumArrays object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetJustSymbol `func (o *EnumArrays) GetJustSymbol() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md index ef2a67c39ff..5b9e283f079 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md @@ -10,11 +10,28 @@ Name | Type | Description | Notes **EnumNumber** | Pointer to **float64** | | [optional] **OuterEnum** | Pointer to [**NullableOuterEnum**](OuterEnum.md) | | [optional] **OuterEnumInteger** | Pointer to [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**OuterEnumDefaultValue** | Pointer to [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**OuterEnumIntegerDefaultValue** | Pointer to [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**OuterEnumDefaultValue** | Pointer to [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] [default to "placed"] +**OuterEnumIntegerDefaultValue** | Pointer to [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] [default to OUTERENUMINTEGERDEFAULTVALUE__0] ## Methods +### NewEnumTest + +`func NewEnumTest(enumStringRequired string, ) *EnumTest` + +NewEnumTest instantiates a new EnumTest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEnumTestWithDefaults + +`func NewEnumTestWithDefaults() *EnumTest` + +NewEnumTestWithDefaults instantiates a new EnumTest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetEnumString `func (o *EnumTest) GetEnumString() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md index ca236912338..e21a291e134 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -398,13 +398,13 @@ Other parameters are passed through a pointer to a apiTestEnumParametersRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enumHeaderStringArray** | [**[]string**](string.md) | Header parameter enum test (string array) | - **enumHeaderString** | **string** | Header parameter enum test (string) | [default to -efg] + **enumHeaderString** | **string** | Header parameter enum test (string) | [default to "-efg"] **enumQueryStringArray** | [**[]string**](string.md) | Query parameter enum test (string array) | - **enumQueryString** | **string** | Query parameter enum test (string) | [default to -efg] + **enumQueryString** | **string** | Query parameter enum test (string) | [default to "-efg"] **enumQueryInteger** | **int32** | Query parameter enum test (double) | **enumQueryDouble** | **float64** | Query parameter enum test (double) | - **enumFormStringArray** | [**[]string**](string.md) | Form parameter enum test (string array) | [default to $] - **enumFormString** | **string** | Form parameter enum test (string) | [default to -efg] + **enumFormStringArray** | [**[]string**](string.md) | Form parameter enum test (string array) | [default to "$"] + **enumFormString** | **string** | Form parameter enum test (string) | [default to "-efg"] ### Return type diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md index 454b159609c..507191f19b6 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewFile + +`func NewFile() *File` + +NewFile instantiates a new File object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFileWithDefaults + +`func NewFileWithDefaults() *File` + +NewFileWithDefaults instantiates a new File object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetSourceURI `func (o *File) GetSourceURI() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md index d4a4da7206c..37f671ef8f8 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewFileSchemaTestClass + +`func NewFileSchemaTestClass() *FileSchemaTestClass` + +NewFileSchemaTestClass instantiates a new FileSchemaTestClass object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFileSchemaTestClassWithDefaults + +`func NewFileSchemaTestClassWithDefaults() *FileSchemaTestClass` + +NewFileSchemaTestClassWithDefaults instantiates a new FileSchemaTestClass object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetFile `func (o *FileSchemaTestClass) GetFile() File` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md index 82e3c253f2e..cc5a7d167c1 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md @@ -4,10 +4,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | Pointer to **string** | | [optional] [default to bar] +**Bar** | Pointer to **string** | | [optional] [default to "bar"] ## Methods +### NewFoo + +`func NewFoo() *Foo` + +NewFoo instantiates a new Foo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFooWithDefaults + +`func NewFooWithDefaults() *Foo` + +NewFooWithDefaults instantiates a new Foo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBar `func (o *Foo) GetBar() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md index 861d7aa3eb1..39ddbd49dd0 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md @@ -22,6 +22,23 @@ Name | Type | Description | Notes ## Methods +### NewFormatTest + +`func NewFormatTest(number float32, byte_ string, date string, password string, ) *FormatTest` + +NewFormatTest instantiates a new FormatTest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFormatTestWithDefaults + +`func NewFormatTestWithDefaults() *FormatTest` + +NewFormatTestWithDefaults instantiates a new FormatTest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetInteger `func (o *FormatTest) GetInteger() int32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md index b5502272ce3..84d8266d59f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewHasOnlyReadOnly + +`func NewHasOnlyReadOnly() *HasOnlyReadOnly` + +NewHasOnlyReadOnly instantiates a new HasOnlyReadOnly object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHasOnlyReadOnlyWithDefaults + +`func NewHasOnlyReadOnlyWithDefaults() *HasOnlyReadOnly` + +NewHasOnlyReadOnlyWithDefaults instantiates a new HasOnlyReadOnly object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBar `func (o *HasOnlyReadOnly) GetBar() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md index 15ad0d68cc4..e6e68f1ee87 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewHealthCheckResult + +`func NewHealthCheckResult() *HealthCheckResult` + +NewHealthCheckResult instantiates a new HealthCheckResult object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckResultWithDefaults + +`func NewHealthCheckResultWithDefaults() *HealthCheckResult` + +NewHealthCheckResultWithDefaults instantiates a new HealthCheckResult object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetNullableMessage `func (o *HealthCheckResult) GetNullableMessage() NullableString` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md index 0c93a8999ad..c66650dd342 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewInlineObject + +`func NewInlineObject() *InlineObject` + +NewInlineObject instantiates a new InlineObject object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInlineObjectWithDefaults + +`func NewInlineObjectWithDefaults() *InlineObject` + +NewInlineObjectWithDefaults instantiates a new InlineObject object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *InlineObject) GetName() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md index f30ef94a837..1caf7147c74 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewInlineObject1 + +`func NewInlineObject1() *InlineObject1` + +NewInlineObject1 instantiates a new InlineObject1 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInlineObject1WithDefaults + +`func NewInlineObject1WithDefaults() *InlineObject1` + +NewInlineObject1WithDefaults instantiates a new InlineObject1 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetAdditionalMetadata `func (o *InlineObject1) GetAdditionalMetadata() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md index 62a7142a4d0..c2ce332c6dd 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md @@ -5,10 +5,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumFormStringArray** | Pointer to **[]string** | Form parameter enum test (string array) | [optional] -**EnumFormString** | Pointer to **string** | Form parameter enum test (string) | [optional] [default to ENUM_FORM_STRING_EFG] +**EnumFormString** | Pointer to **string** | Form parameter enum test (string) | [optional] [default to "-efg"] ## Methods +### NewInlineObject2 + +`func NewInlineObject2() *InlineObject2` + +NewInlineObject2 instantiates a new InlineObject2 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInlineObject2WithDefaults + +`func NewInlineObject2WithDefaults() *InlineObject2` + +NewInlineObject2WithDefaults instantiates a new InlineObject2 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetEnumFormStringArray `func (o *InlineObject2) GetEnumFormStringArray() []string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md index 911b0ffb918..4511d3c1640 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md @@ -21,6 +21,23 @@ Name | Type | Description | Notes ## Methods +### NewInlineObject3 + +`func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string, ) *InlineObject3` + +NewInlineObject3 instantiates a new InlineObject3 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInlineObject3WithDefaults + +`func NewInlineObject3WithDefaults() *InlineObject3` + +NewInlineObject3WithDefaults instantiates a new InlineObject3 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetInteger `func (o *InlineObject3) GetInteger() int32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md index 8316407b652..b555af12b9c 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewInlineObject4 + +`func NewInlineObject4(param string, param2 string, ) *InlineObject4` + +NewInlineObject4 instantiates a new InlineObject4 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInlineObject4WithDefaults + +`func NewInlineObject4WithDefaults() *InlineObject4` + +NewInlineObject4WithDefaults instantiates a new InlineObject4 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetParam `func (o *InlineObject4) GetParam() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md index 24aa799df39..874abaef97e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewInlineObject5 + +`func NewInlineObject5(requiredFile *os.File, ) *InlineObject5` + +NewInlineObject5 instantiates a new InlineObject5 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInlineObject5WithDefaults + +`func NewInlineObject5WithDefaults() *InlineObject5` + +NewInlineObject5WithDefaults instantiates a new InlineObject5 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetAdditionalMetadata `func (o *InlineObject5) GetAdditionalMetadata() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md index 714067d561b..14f1b0493b7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewInlineResponseDefault + +`func NewInlineResponseDefault() *InlineResponseDefault` + +NewInlineResponseDefault instantiates a new InlineResponseDefault object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInlineResponseDefaultWithDefaults + +`func NewInlineResponseDefaultWithDefaults() *InlineResponseDefault` + +NewInlineResponseDefaultWithDefaults instantiates a new InlineResponseDefault object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetString `func (o *InlineResponseDefault) GetString() Foo` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md index ca8849936e7..4d914555e33 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewList + +`func NewList() *List` + +NewList instantiates a new List object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListWithDefaults + +`func NewListWithDefaults() *List` + +NewListWithDefaults instantiates a new List object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetVar123List `func (o *List) GetVar123List() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md index 6c84c2e89c2..c752f6e86b5 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md @@ -11,6 +11,23 @@ Name | Type | Description | Notes ## Methods +### NewMapTest + +`func NewMapTest() *MapTest` + +NewMapTest instantiates a new MapTest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMapTestWithDefaults + +`func NewMapTestWithDefaults() *MapTest` + +NewMapTestWithDefaults instantiates a new MapTest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetMapMapOfString `func (o *MapTest) GetMapMapOfString() map[string]map[string]string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 49f7c8eb768..2a1eb5eaba3 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -10,6 +10,23 @@ Name | Type | Description | Notes ## Methods +### NewMixedPropertiesAndAdditionalPropertiesClass + +`func NewMixedPropertiesAndAdditionalPropertiesClass() *MixedPropertiesAndAdditionalPropertiesClass` + +NewMixedPropertiesAndAdditionalPropertiesClass instantiates a new MixedPropertiesAndAdditionalPropertiesClass object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults + +`func NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults() *MixedPropertiesAndAdditionalPropertiesClass` + +NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults instantiates a new MixedPropertiesAndAdditionalPropertiesClass object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetUuid `func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md index d0bde7b7f7b..00bce3a9909 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewModel200Response + +`func NewModel200Response() *Model200Response` + +NewModel200Response instantiates a new Model200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewModel200ResponseWithDefaults + +`func NewModel200ResponseWithDefaults() *Model200Response` + +NewModel200ResponseWithDefaults instantiates a new Model200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *Model200Response) GetName() int32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md index 6104c42bebd..cbcab366761 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md @@ -11,6 +11,23 @@ Name | Type | Description | Notes ## Methods +### NewName + +`func NewName(name int32, ) *Name` + +NewName instantiates a new Name object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNameWithDefaults + +`func NewNameWithDefaults() *Name` + +NewNameWithDefaults instantiates a new Name object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetName `func (o *Name) GetName() int32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md index 0aed469d7c7..8c686e6955f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md @@ -19,6 +19,23 @@ Name | Type | Description | Notes ## Methods +### NewNullableClass + +`func NewNullableClass() *NullableClass` + +NewNullableClass instantiates a new NullableClass object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNullableClassWithDefaults + +`func NewNullableClassWithDefaults() *NullableClass` + +NewNullableClassWithDefaults instantiates a new NullableClass object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetIntegerProp `func (o *NullableClass) GetIntegerProp() NullableInt32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md index c8dcac264c2..2a30b0b1283 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewNumberOnly + +`func NewNumberOnly() *NumberOnly` + +NewNumberOnly instantiates a new NumberOnly object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNumberOnlyWithDefaults + +`func NewNumberOnlyWithDefaults() *NumberOnly` + +NewNumberOnlyWithDefaults instantiates a new NumberOnly object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetJustNumber `func (o *NumberOnly) GetJustNumber() float32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md index 8aa8bbd1ee5..71bb824a6ca 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md @@ -13,6 +13,23 @@ Name | Type | Description | Notes ## Methods +### NewOrder + +`func NewOrder() *Order` + +NewOrder instantiates a new Order object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderWithDefaults + +`func NewOrderWithDefaults() *Order` + +NewOrderWithDefaults instantiates a new Order object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *Order) GetId() int64` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md index f8908022282..e91d7b978ae 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md @@ -10,6 +10,23 @@ Name | Type | Description | Notes ## Methods +### NewOuterComposite + +`func NewOuterComposite() *OuterComposite` + +NewOuterComposite instantiates a new OuterComposite object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOuterCompositeWithDefaults + +`func NewOuterCompositeWithDefaults() *OuterComposite` + +NewOuterCompositeWithDefaults instantiates a new OuterComposite object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetMyNumber `func (o *OuterComposite) GetMyNumber() float32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md index dba9589f9d7..faa1e31e870 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md @@ -13,6 +13,23 @@ Name | Type | Description | Notes ## Methods +### NewPet + +`func NewPet(name string, photoUrls []string, ) *Pet` + +NewPet instantiates a new Pet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPetWithDefaults + +`func NewPetWithDefaults() *Pet` + +NewPetWithDefaults instantiates a new Pet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *Pet) GetId() int64` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md index ce2ff23bc61..c0ee88a7036 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewReadOnlyFirst + +`func NewReadOnlyFirst() *ReadOnlyFirst` + +NewReadOnlyFirst instantiates a new ReadOnlyFirst object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReadOnlyFirstWithDefaults + +`func NewReadOnlyFirstWithDefaults() *ReadOnlyFirst` + +NewReadOnlyFirstWithDefaults instantiates a new ReadOnlyFirst object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetBar `func (o *ReadOnlyFirst) GetBar() string` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md index 1facabb6bbf..1437ef84e52 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewReturn + +`func NewReturn() *Return` + +NewReturn instantiates a new Return object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReturnWithDefaults + +`func NewReturnWithDefaults() *Return` + +NewReturnWithDefaults instantiates a new Return object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetReturn `func (o *Return) GetReturn() int32` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md index 34d8d8d89c7..c273842c32b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md @@ -8,6 +8,23 @@ Name | Type | Description | Notes ## Methods +### NewSpecialModelName + +`func NewSpecialModelName() *SpecialModelName` + +NewSpecialModelName instantiates a new SpecialModelName object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSpecialModelNameWithDefaults + +`func NewSpecialModelNameWithDefaults() *SpecialModelName` + +NewSpecialModelNameWithDefaults instantiates a new SpecialModelName object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetSpecialPropertyName `func (o *SpecialModelName) GetSpecialPropertyName() int64` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md index bf868298a5e..84b8770dac0 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md @@ -9,6 +9,23 @@ Name | Type | Description | Notes ## Methods +### NewTag + +`func NewTag() *Tag` + +NewTag instantiates a new Tag object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTagWithDefaults + +`func NewTagWithDefaults() *Tag` + +NewTagWithDefaults instantiates a new Tag object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *Tag) GetId() int64` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md index 8b93a65d8ab..e9720af9fb7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md @@ -15,6 +15,23 @@ Name | Type | Description | Notes ## Methods +### NewUser + +`func NewUser() *User` + +NewUser instantiates a new User object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserWithDefaults + +`func NewUserWithDefaults() *User` + +NewUserWithDefaults instantiates a new User object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + ### GetId `func (o *User) GetId() int64` diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go index b4e9becc59c..8c2c0f493c0 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go @@ -20,6 +20,23 @@ type Model200Response struct { Class *string `json:"class,omitempty"` } +// NewModel200Response instantiates a new Model200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModel200Response() *Model200Response { + this := Model200Response{} + return &this +} + +// NewModel200ResponseWithDefaults instantiates a new Model200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModel200ResponseWithDefaults() *Model200Response { + this := Model200Response{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *Model200Response) GetName() int32 { if o == nil || o.Name == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go index e1827cee896..90de43b900f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go @@ -19,6 +19,23 @@ type SpecialModelName struct { SpecialPropertyName *int64 `json:"$special[property.name],omitempty"` } +// NewSpecialModelName instantiates a new SpecialModelName object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSpecialModelName() *SpecialModelName { + this := SpecialModelName{} + return &this +} + +// NewSpecialModelNameWithDefaults instantiates a new SpecialModelName object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSpecialModelNameWithDefaults() *SpecialModelName { + this := SpecialModelName{} + return &this +} + // GetSpecialPropertyName returns the SpecialPropertyName field value if set, zero value otherwise. func (o *SpecialModelName) GetSpecialPropertyName() int64 { if o == nil || o.SpecialPropertyName == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index d224074b290..55234aacb77 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -20,6 +20,23 @@ type AdditionalPropertiesClass struct { MapOfMapProperty *map[string]map[string]string `json:"map_of_map_property,omitempty"` } +// NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAdditionalPropertiesClass() *AdditionalPropertiesClass { + this := AdditionalPropertiesClass{} + return &this +} + +// NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass { + this := AdditionalPropertiesClass{} + return &this +} + // GetMapProperty returns the MapProperty field value if set, zero value otherwise. func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string { if o == nil || o.MapProperty == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go index b54f59dbe61..47a4ba3a23a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go @@ -20,6 +20,28 @@ type Animal struct { Color *string `json:"color,omitempty"` } +// NewAnimal instantiates a new Animal object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnimal(className string, ) *Animal { + this := Animal{} + this.ClassName = className + var color string = "red" + this.Color = &color + return &this +} + +// NewAnimalWithDefaults instantiates a new Animal object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnimalWithDefaults() *Animal { + this := Animal{} + var color string = "red" + this.Color = &color + return &this +} + // GetClassName returns the ClassName field value func (o *Animal) GetClassName() string { if o == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go index 0b9eab9f759..f150cfafa43 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -21,6 +21,23 @@ type ApiResponse struct { Message *string `json:"message,omitempty"` } +// NewApiResponse instantiates a new ApiResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApiResponse() *ApiResponse { + this := ApiResponse{} + return &this +} + +// NewApiResponseWithDefaults instantiates a new ApiResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApiResponseWithDefaults() *ApiResponse { + this := ApiResponse{} + return &this +} + // GetCode returns the Code field value if set, zero value otherwise. func (o *ApiResponse) GetCode() int32 { if o == nil || o.Code == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go index f2dbbb1f21e..cc9815c9873 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go @@ -19,6 +19,23 @@ type ArrayOfArrayOfNumberOnly struct { ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` } +// NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly { + this := ArrayOfArrayOfNumberOnly{} + return &this +} + +// NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly { + this := ArrayOfArrayOfNumberOnly{} + return &this +} + // GetArrayArrayNumber returns the ArrayArrayNumber field value if set, zero value otherwise. func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { if o == nil || o.ArrayArrayNumber == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go index 9268a2ae608..49c1292100d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go @@ -19,6 +19,23 @@ type ArrayOfNumberOnly struct { ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` } +// NewArrayOfNumberOnly instantiates a new ArrayOfNumberOnly object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArrayOfNumberOnly() *ArrayOfNumberOnly { + this := ArrayOfNumberOnly{} + return &this +} + +// NewArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfNumberOnly object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArrayOfNumberOnlyWithDefaults() *ArrayOfNumberOnly { + this := ArrayOfNumberOnly{} + return &this +} + // GetArrayNumber returns the ArrayNumber field value if set, zero value otherwise. func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { if o == nil || o.ArrayNumber == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go index 84123ef137b..545d8338e88 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go @@ -21,6 +21,23 @@ type ArrayTest struct { ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` } +// NewArrayTest instantiates a new ArrayTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArrayTest() *ArrayTest { + this := ArrayTest{} + return &this +} + +// NewArrayTestWithDefaults instantiates a new ArrayTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArrayTestWithDefaults() *ArrayTest { + this := ArrayTest{} + return &this +} + // GetArrayOfString returns the ArrayOfString field value if set, zero value otherwise. func (o *ArrayTest) GetArrayOfString() []string { if o == nil || o.ArrayOfString == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go index 8288d903b7b..d1198ae8602 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go @@ -25,6 +25,23 @@ type Capitalization struct { ATT_NAME *string `json:"ATT_NAME,omitempty"` } +// NewCapitalization instantiates a new Capitalization object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCapitalization() *Capitalization { + this := Capitalization{} + return &this +} + +// NewCapitalizationWithDefaults instantiates a new Capitalization object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCapitalizationWithDefaults() *Capitalization { + this := Capitalization{} + return &this +} + // GetSmallCamel returns the SmallCamel field value if set, zero value otherwise. func (o *Capitalization) GetSmallCamel() string { if o == nil || o.SmallCamel == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go index 0303bc0826a..4660d0cca09 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go @@ -20,6 +20,23 @@ type Cat struct { Declawed *bool `json:"declawed,omitempty"` } +// NewCat instantiates a new Cat object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCat() *Cat { + this := Cat{} + return &this +} + +// NewCatWithDefaults instantiates a new Cat object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCatWithDefaults() *Cat { + this := Cat{} + return &this +} + // GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *Cat) GetDeclawed() bool { if o == nil || o.Declawed == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go index 60ba5b0259f..27e6189a1e6 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go @@ -19,6 +19,23 @@ type CatAllOf struct { Declawed *bool `json:"declawed,omitempty"` } +// NewCatAllOf instantiates a new CatAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCatAllOf() *CatAllOf { + this := CatAllOf{} + return &this +} + +// NewCatAllOfWithDefaults instantiates a new CatAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCatAllOfWithDefaults() *CatAllOf { + this := CatAllOf{} + return &this +} + // GetDeclawed returns the Declawed field value if set, zero value otherwise. func (o *CatAllOf) GetDeclawed() bool { if o == nil || o.Declawed == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go index 0bf8c0a2fd2..f3a22034c48 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go @@ -20,6 +20,26 @@ type Category struct { Name string `json:"name"` } +// NewCategory instantiates a new Category object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCategory(name string, ) *Category { + this := Category{} + this.Name = name + return &this +} + +// NewCategoryWithDefaults instantiates a new Category object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCategoryWithDefaults() *Category { + this := Category{} + var name string = "default-name" + this.Name = name + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Category) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go index 1621fc4acbd..cdc48b1bd9d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go @@ -19,6 +19,23 @@ type ClassModel struct { Class *string `json:"_class,omitempty"` } +// NewClassModel instantiates a new ClassModel object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewClassModel() *ClassModel { + this := ClassModel{} + return &this +} + +// NewClassModelWithDefaults instantiates a new ClassModel object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewClassModelWithDefaults() *ClassModel { + this := ClassModel{} + return &this +} + // GetClass returns the Class field value if set, zero value otherwise. func (o *ClassModel) GetClass() string { if o == nil || o.Class == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go index 45f3fce18b4..447c7e2da53 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go @@ -19,6 +19,23 @@ type Client struct { Client *string `json:"client,omitempty"` } +// NewClient instantiates a new Client object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewClient() *Client { + this := Client{} + return &this +} + +// NewClientWithDefaults instantiates a new Client object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewClientWithDefaults() *Client { + this := Client{} + return &this +} + // GetClient returns the Client field value if set, zero value otherwise. func (o *Client) GetClient() string { if o == nil || o.Client == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go index 17682057389..4bbfbc208de 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go @@ -20,6 +20,23 @@ type Dog struct { Breed *string `json:"breed,omitempty"` } +// NewDog instantiates a new Dog object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDog() *Dog { + this := Dog{} + return &this +} + +// NewDogWithDefaults instantiates a new Dog object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDogWithDefaults() *Dog { + this := Dog{} + return &this +} + // GetBreed returns the Breed field value if set, zero value otherwise. func (o *Dog) GetBreed() string { if o == nil || o.Breed == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go index c88dfaca2e0..27cc1210b4b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go @@ -19,6 +19,23 @@ type DogAllOf struct { Breed *string `json:"breed,omitempty"` } +// NewDogAllOf instantiates a new DogAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDogAllOf() *DogAllOf { + this := DogAllOf{} + return &this +} + +// NewDogAllOfWithDefaults instantiates a new DogAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDogAllOfWithDefaults() *DogAllOf { + this := DogAllOf{} + return &this +} + // GetBreed returns the Breed field value if set, zero value otherwise. func (o *DogAllOf) GetBreed() string { if o == nil || o.Breed == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go index 181a9287220..fe411a091b5 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go @@ -20,6 +20,23 @@ type EnumArrays struct { ArrayEnum *[]string `json:"array_enum,omitempty"` } +// NewEnumArrays instantiates a new EnumArrays object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnumArrays() *EnumArrays { + this := EnumArrays{} + return &this +} + +// NewEnumArraysWithDefaults instantiates a new EnumArrays object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnumArraysWithDefaults() *EnumArrays { + this := EnumArrays{} + return &this +} + // GetJustSymbol returns the JustSymbol field value if set, zero value otherwise. func (o *EnumArrays) GetJustSymbol() string { if o == nil || o.JustSymbol == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go index e17990e0e8a..fd2e22d9b4e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go @@ -26,6 +26,32 @@ type EnumTest struct { OuterEnumIntegerDefaultValue *OuterEnumIntegerDefaultValue `json:"outerEnumIntegerDefaultValue,omitempty"` } +// NewEnumTest instantiates a new EnumTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEnumTest(enumStringRequired string, ) *EnumTest { + this := EnumTest{} + this.EnumStringRequired = enumStringRequired + var outerEnumDefaultValue OuterEnumDefaultValue = "placed" + this.OuterEnumDefaultValue = &outerEnumDefaultValue + var outerEnumIntegerDefaultValue OuterEnumIntegerDefaultValue = OUTERENUMINTEGERDEFAULTVALUE__0 + this.OuterEnumIntegerDefaultValue = &outerEnumIntegerDefaultValue + return &this +} + +// NewEnumTestWithDefaults instantiates a new EnumTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEnumTestWithDefaults() *EnumTest { + this := EnumTest{} + var outerEnumDefaultValue OuterEnumDefaultValue = "placed" + this.OuterEnumDefaultValue = &outerEnumDefaultValue + var outerEnumIntegerDefaultValue OuterEnumIntegerDefaultValue = OUTERENUMINTEGERDEFAULTVALUE__0 + this.OuterEnumIntegerDefaultValue = &outerEnumIntegerDefaultValue + return &this +} + // GetEnumString returns the EnumString field value if set, zero value otherwise. func (o *EnumTest) GetEnumString() string { if o == nil || o.EnumString == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go index 23da628abcc..82e4bc173f8 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go @@ -20,6 +20,23 @@ type File struct { SourceURI *string `json:"sourceURI,omitempty"` } +// NewFile instantiates a new File object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFile() *File { + this := File{} + return &this +} + +// NewFileWithDefaults instantiates a new File object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileWithDefaults() *File { + this := File{} + return &this +} + // GetSourceURI returns the SourceURI field value if set, zero value otherwise. func (o *File) GetSourceURI() string { if o == nil || o.SourceURI == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go index 50145af1223..74fbd77e22d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go @@ -20,6 +20,23 @@ type FileSchemaTestClass struct { Files *[]File `json:"files,omitempty"` } +// NewFileSchemaTestClass instantiates a new FileSchemaTestClass object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileSchemaTestClass() *FileSchemaTestClass { + this := FileSchemaTestClass{} + return &this +} + +// NewFileSchemaTestClassWithDefaults instantiates a new FileSchemaTestClass object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileSchemaTestClassWithDefaults() *FileSchemaTestClass { + this := FileSchemaTestClass{} + return &this +} + // GetFile returns the File field value if set, zero value otherwise. func (o *FileSchemaTestClass) GetFile() File { if o == nil || o.File == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go index 4d62649a7fc..fc7b85e49f6 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go @@ -19,6 +19,27 @@ type Foo struct { Bar *string `json:"bar,omitempty"` } +// NewFoo instantiates a new Foo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFoo() *Foo { + this := Foo{} + var bar string = "bar" + this.Bar = &bar + return &this +} + +// NewFooWithDefaults instantiates a new Foo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFooWithDefaults() *Foo { + this := Foo{} + var bar string = "bar" + this.Bar = &bar + return &this +} + // GetBar returns the Bar field value if set, zero value otherwise. func (o *Foo) GetBar() string { if o == nil || o.Bar == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go index 9bf313a01f6..13ff4514909 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -37,6 +37,27 @@ type FormatTest struct { PatternWithDigitsAndDelimiter *string `json:"pattern_with_digits_and_delimiter,omitempty"` } +// NewFormatTest instantiates a new FormatTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFormatTest(number float32, byte_ string, date string, password string, ) *FormatTest { + this := FormatTest{} + this.Number = number + this.Byte = byte_ + this.Date = date + this.Password = password + return &this +} + +// NewFormatTestWithDefaults instantiates a new FormatTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFormatTestWithDefaults() *FormatTest { + this := FormatTest{} + return &this +} + // GetInteger returns the Integer field value if set, zero value otherwise. func (o *FormatTest) GetInteger() int32 { if o == nil || o.Integer == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go index 5394aa4007d..b6d1dd64eee 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go @@ -20,6 +20,23 @@ type HasOnlyReadOnly struct { Foo *string `json:"foo,omitempty"` } +// NewHasOnlyReadOnly instantiates a new HasOnlyReadOnly object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHasOnlyReadOnly() *HasOnlyReadOnly { + this := HasOnlyReadOnly{} + return &this +} + +// NewHasOnlyReadOnlyWithDefaults instantiates a new HasOnlyReadOnly object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHasOnlyReadOnlyWithDefaults() *HasOnlyReadOnly { + this := HasOnlyReadOnly{} + return &this +} + // GetBar returns the Bar field value if set, zero value otherwise. func (o *HasOnlyReadOnly) GetBar() string { if o == nil || o.Bar == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go index ad87c93a74c..ec2f9376053 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go @@ -19,6 +19,23 @@ type HealthCheckResult struct { NullableMessage *NullableString `json:"NullableMessage,omitempty"` } +// NewHealthCheckResult instantiates a new HealthCheckResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHealthCheckResult() *HealthCheckResult { + this := HealthCheckResult{} + return &this +} + +// NewHealthCheckResultWithDefaults instantiates a new HealthCheckResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHealthCheckResultWithDefaults() *HealthCheckResult { + this := HealthCheckResult{} + return &this +} + // GetNullableMessage returns the NullableMessage field value if set, zero value otherwise. func (o *HealthCheckResult) GetNullableMessage() NullableString { if o == nil || o.NullableMessage == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go index c789be40281..5606db36cc5 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go @@ -22,6 +22,23 @@ type InlineObject struct { Status *string `json:"status,omitempty"` } +// NewInlineObject instantiates a new InlineObject object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInlineObject() *InlineObject { + this := InlineObject{} + return &this +} + +// NewInlineObjectWithDefaults instantiates a new InlineObject object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInlineObjectWithDefaults() *InlineObject { + this := InlineObject{} + return &this +} + // GetName returns the Name field value if set, zero value otherwise. func (o *InlineObject) GetName() string { if o == nil || o.Name == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go index f4ad400f832..e7651a59b7b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go @@ -23,6 +23,23 @@ type InlineObject1 struct { File **os.File `json:"file,omitempty"` } +// NewInlineObject1 instantiates a new InlineObject1 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInlineObject1() *InlineObject1 { + this := InlineObject1{} + return &this +} + +// NewInlineObject1WithDefaults instantiates a new InlineObject1 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInlineObject1WithDefaults() *InlineObject1 { + this := InlineObject1{} + return &this +} + // GetAdditionalMetadata returns the AdditionalMetadata field value if set, zero value otherwise. func (o *InlineObject1) GetAdditionalMetadata() string { if o == nil || o.AdditionalMetadata == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go index 2734be44f5d..3e667da5f07 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go @@ -22,6 +22,27 @@ type InlineObject2 struct { EnumFormString *string `json:"enum_form_string,omitempty"` } +// NewInlineObject2 instantiates a new InlineObject2 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInlineObject2() *InlineObject2 { + this := InlineObject2{} + var enumFormString string = "-efg" + this.EnumFormString = &enumFormString + return &this +} + +// NewInlineObject2WithDefaults instantiates a new InlineObject2 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInlineObject2WithDefaults() *InlineObject2 { + this := InlineObject2{} + var enumFormString string = "-efg" + this.EnumFormString = &enumFormString + return &this +} + // GetEnumFormStringArray returns the EnumFormStringArray field value if set, zero value otherwise. func (o *InlineObject2) GetEnumFormStringArray() []string { if o == nil || o.EnumFormStringArray == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go index dece4ad604b..fef3dacc852 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go @@ -48,6 +48,27 @@ type InlineObject3 struct { Callback *string `json:"callback,omitempty"` } +// NewInlineObject3 instantiates a new InlineObject3 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string, ) *InlineObject3 { + this := InlineObject3{} + this.Number = number + this.Double = double + this.PatternWithoutDelimiter = patternWithoutDelimiter + this.Byte = byte_ + return &this +} + +// NewInlineObject3WithDefaults instantiates a new InlineObject3 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInlineObject3WithDefaults() *InlineObject3 { + this := InlineObject3{} + return &this +} + // GetInteger returns the Integer field value if set, zero value otherwise. func (o *InlineObject3) GetInteger() int32 { if o == nil || o.Integer == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go index 837e8f423bf..0f98842c8fb 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go @@ -22,6 +22,25 @@ type InlineObject4 struct { Param2 string `json:"param2"` } +// NewInlineObject4 instantiates a new InlineObject4 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInlineObject4(param string, param2 string, ) *InlineObject4 { + this := InlineObject4{} + this.Param = param + this.Param2 = param2 + return &this +} + +// NewInlineObject4WithDefaults instantiates a new InlineObject4 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInlineObject4WithDefaults() *InlineObject4 { + this := InlineObject4{} + return &this +} + // GetParam returns the Param field value func (o *InlineObject4) GetParam() string { if o == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go index 6673d413276..b623f4cda9e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go @@ -23,6 +23,24 @@ type InlineObject5 struct { RequiredFile *os.File `json:"requiredFile"` } +// NewInlineObject5 instantiates a new InlineObject5 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInlineObject5(requiredFile *os.File, ) *InlineObject5 { + this := InlineObject5{} + this.RequiredFile = requiredFile + return &this +} + +// NewInlineObject5WithDefaults instantiates a new InlineObject5 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInlineObject5WithDefaults() *InlineObject5 { + this := InlineObject5{} + return &this +} + // GetAdditionalMetadata returns the AdditionalMetadata field value if set, zero value otherwise. func (o *InlineObject5) GetAdditionalMetadata() string { if o == nil || o.AdditionalMetadata == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go index 3d8d72130c5..9134406f6cf 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go @@ -19,6 +19,23 @@ type InlineResponseDefault struct { String *Foo `json:"string,omitempty"` } +// NewInlineResponseDefault instantiates a new InlineResponseDefault object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInlineResponseDefault() *InlineResponseDefault { + this := InlineResponseDefault{} + return &this +} + +// NewInlineResponseDefaultWithDefaults instantiates a new InlineResponseDefault object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInlineResponseDefaultWithDefaults() *InlineResponseDefault { + this := InlineResponseDefault{} + return &this +} + // GetString returns the String field value if set, zero value otherwise. func (o *InlineResponseDefault) GetString() Foo { if o == nil || o.String == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go index 6259d7507a3..228c9d61fba 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go @@ -19,6 +19,23 @@ type List struct { Var123List *string `json:"123-list,omitempty"` } +// NewList instantiates a new List object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewList() *List { + this := List{} + return &this +} + +// NewListWithDefaults instantiates a new List object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListWithDefaults() *List { + this := List{} + return &this +} + // GetVar123List returns the Var123List field value if set, zero value otherwise. func (o *List) GetVar123List() string { if o == nil || o.Var123List == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go index 820f2641347..e78ae4bf9b8 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go @@ -22,6 +22,23 @@ type MapTest struct { IndirectMap *map[string]bool `json:"indirect_map,omitempty"` } +// NewMapTest instantiates a new MapTest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMapTest() *MapTest { + this := MapTest{} + return &this +} + +// NewMapTestWithDefaults instantiates a new MapTest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMapTestWithDefaults() *MapTest { + this := MapTest{} + return &this +} + // GetMapMapOfString returns the MapMapOfString field value if set, zero value otherwise. func (o *MapTest) GetMapMapOfString() map[string]map[string]string { if o == nil || o.MapMapOfString == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go index c4a7dba8182..95a311b6543 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -22,6 +22,23 @@ type MixedPropertiesAndAdditionalPropertiesClass struct { Map *map[string]Animal `json:"map,omitempty"` } +// NewMixedPropertiesAndAdditionalPropertiesClass instantiates a new MixedPropertiesAndAdditionalPropertiesClass object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMixedPropertiesAndAdditionalPropertiesClass() *MixedPropertiesAndAdditionalPropertiesClass { + this := MixedPropertiesAndAdditionalPropertiesClass{} + return &this +} + +// NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults instantiates a new MixedPropertiesAndAdditionalPropertiesClass object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults() *MixedPropertiesAndAdditionalPropertiesClass { + this := MixedPropertiesAndAdditionalPropertiesClass{} + return &this +} + // GetUuid returns the Uuid field value if set, zero value otherwise. func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { if o == nil || o.Uuid == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go index 2f3716aad24..c205987518c 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go @@ -22,6 +22,24 @@ type Name struct { Var123Number *int32 `json:"123Number,omitempty"` } +// NewName instantiates a new Name object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewName(name int32, ) *Name { + this := Name{} + this.Name = name + return &this +} + +// NewNameWithDefaults instantiates a new Name object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNameWithDefaults() *Name { + this := Name{} + return &this +} + // GetName returns the Name field value func (o *Name) GetName() int32 { if o == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go index 2a51bd6a123..41501edeb5e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go @@ -30,6 +30,23 @@ type NullableClass struct { ObjectItemsNullable *map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` } +// NewNullableClass instantiates a new NullableClass object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNullableClass() *NullableClass { + this := NullableClass{} + return &this +} + +// NewNullableClassWithDefaults instantiates a new NullableClass object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNullableClassWithDefaults() *NullableClass { + this := NullableClass{} + return &this +} + // GetIntegerProp returns the IntegerProp field value if set, zero value otherwise. func (o *NullableClass) GetIntegerProp() NullableInt32 { if o == nil || o.IntegerProp == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go index afa9c1b403a..576dcff8040 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go @@ -19,6 +19,23 @@ type NumberOnly struct { JustNumber *float32 `json:"JustNumber,omitempty"` } +// NewNumberOnly instantiates a new NumberOnly object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNumberOnly() *NumberOnly { + this := NumberOnly{} + return &this +} + +// NewNumberOnlyWithDefaults instantiates a new NumberOnly object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNumberOnlyWithDefaults() *NumberOnly { + this := NumberOnly{} + return &this +} + // GetJustNumber returns the JustNumber field value if set, zero value otherwise. func (o *NumberOnly) GetJustNumber() float32 { if o == nil || o.JustNumber == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go index 448d6a975a4..aa4da6cf1b7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go @@ -26,6 +26,27 @@ type Order struct { Complete *bool `json:"complete,omitempty"` } +// NewOrder instantiates a new Order object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrder() *Order { + this := Order{} + var complete bool = false + this.Complete = &complete + return &this +} + +// NewOrderWithDefaults instantiates a new Order object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderWithDefaults() *Order { + this := Order{} + var complete bool = false + this.Complete = &complete + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Order) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go index 423d3e5ad37..a9a28d74233 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go @@ -21,6 +21,23 @@ type OuterComposite struct { MyBoolean *bool `json:"my_boolean,omitempty"` } +// NewOuterComposite instantiates a new OuterComposite object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOuterComposite() *OuterComposite { + this := OuterComposite{} + return &this +} + +// NewOuterCompositeWithDefaults instantiates a new OuterComposite object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOuterCompositeWithDefaults() *OuterComposite { + this := OuterComposite{} + return &this +} + // GetMyNumber returns the MyNumber field value if set, zero value otherwise. func (o *OuterComposite) GetMyNumber() float32 { if o == nil || o.MyNumber == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go index 7c1228c8b61..be788718449 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go @@ -25,6 +25,25 @@ type Pet struct { Status *string `json:"status,omitempty"` } +// NewPet instantiates a new Pet object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPet(name string, photoUrls []string, ) *Pet { + this := Pet{} + this.Name = name + this.PhotoUrls = photoUrls + return &this +} + +// NewPetWithDefaults instantiates a new Pet object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPetWithDefaults() *Pet { + this := Pet{} + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Pet) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go index 424ef8b81f3..d2668d83041 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go @@ -20,6 +20,23 @@ type ReadOnlyFirst struct { Baz *string `json:"baz,omitempty"` } +// NewReadOnlyFirst instantiates a new ReadOnlyFirst object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReadOnlyFirst() *ReadOnlyFirst { + this := ReadOnlyFirst{} + return &this +} + +// NewReadOnlyFirstWithDefaults instantiates a new ReadOnlyFirst object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReadOnlyFirstWithDefaults() *ReadOnlyFirst { + this := ReadOnlyFirst{} + return &this +} + // GetBar returns the Bar field value if set, zero value otherwise. func (o *ReadOnlyFirst) GetBar() string { if o == nil || o.Bar == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go index 785303c992d..304c5ffafee 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go @@ -19,6 +19,23 @@ type Return struct { Return *int32 `json:"return,omitempty"` } +// NewReturn instantiates a new Return object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReturn() *Return { + this := Return{} + return &this +} + +// NewReturnWithDefaults instantiates a new Return object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReturnWithDefaults() *Return { + this := Return{} + return &this +} + // GetReturn returns the Return field value if set, zero value otherwise. func (o *Return) GetReturn() int32 { if o == nil || o.Return == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go index bcb30265ab2..abfc6737323 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go @@ -20,6 +20,23 @@ type Tag struct { Name *string `json:"name,omitempty"` } +// NewTag instantiates a new Tag object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTag() *Tag { + this := Tag{} + return &this +} + +// NewTagWithDefaults instantiates a new Tag object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagWithDefaults() *Tag { + this := Tag{} + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Tag) GetId() int64 { if o == nil || o.Id == nil { diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go index a427f7f7c24..54ed39fb709 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go @@ -27,6 +27,23 @@ type User struct { UserStatus *int32 `json:"userStatus,omitempty"` } +// NewUser instantiates a new User object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUser() *User { + this := User{} + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserWithDefaults() *User { + this := User{} + return &this +} + // GetId returns the Id field value if set, zero value otherwise. func (o *User) GetId() int64 { if o == nil || o.Id == nil {