From d1b7dab6f326999ff879e52b5307a2525254d308 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Thu, 6 Jun 2019 11:43:14 +0200 Subject: [PATCH] [Go][client] make structure members pointers, provide custom marshalling. Fixes #522 --- .../codegen/languages/GoClientCodegen.java | 31 + .../src/main/resources/go/model.mustache | 88 +- .../src/main/resources/go/model_doc.mustache | 43 +- .../src/main/resources/go/utils.mustache | 31 + samples/client/petstore/go/auth_test.go | 30 +- samples/client/petstore/go/fake_api_test.go | 4 +- .../docs/AdditionalPropertiesAnyType.md | 30 +- .../docs/AdditionalPropertiesArray.md | 30 +- .../docs/AdditionalPropertiesBoolean.md | 30 +- .../docs/AdditionalPropertiesClass.md | 300 ++++- .../docs/AdditionalPropertiesInteger.md | 30 +- .../docs/AdditionalPropertiesNumber.md | 30 +- .../docs/AdditionalPropertiesObject.md | 30 +- .../docs/AdditionalPropertiesString.md | 30 +- .../go/go-petstore-withXml/docs/Animal.md | 57 +- .../go-petstore-withXml/docs/ApiResponse.md | 84 +- .../docs/ArrayOfArrayOfNumberOnly.md | 30 +- .../docs/ArrayOfNumberOnly.md | 30 +- .../go/go-petstore-withXml/docs/ArrayTest.md | 84 +- .../docs/Capitalization.md | 165 ++- .../go/go-petstore-withXml/docs/Cat.md | 84 +- .../go/go-petstore-withXml/docs/CatAllOf.md | 30 +- .../go/go-petstore-withXml/docs/Category.md | 57 +- .../go/go-petstore-withXml/docs/ClassModel.md | 30 +- .../go/go-petstore-withXml/docs/Client.md | 30 +- .../go/go-petstore-withXml/docs/Dog.md | 84 +- .../go/go-petstore-withXml/docs/DogAllOf.md | 30 +- .../go/go-petstore-withXml/docs/EnumArrays.md | 57 +- .../go/go-petstore-withXml/docs/EnumClass.md | 1 + .../go/go-petstore-withXml/docs/EnumTest.md | 138 +- .../go/go-petstore-withXml/docs/File.md | 30 +- .../docs/FileSchemaTestClass.md | 57 +- .../go/go-petstore-withXml/docs/FormatTest.md | 354 ++++- .../docs/HasOnlyReadOnly.md | 57 +- .../go/go-petstore-withXml/docs/List.md | 30 +- .../go/go-petstore-withXml/docs/MapTest.md | 111 +- ...dPropertiesAndAdditionalPropertiesClass.md | 84 +- .../docs/Model200Response.md | 57 +- .../go/go-petstore-withXml/docs/Name.md | 111 +- .../go/go-petstore-withXml/docs/NumberOnly.md | 30 +- .../go/go-petstore-withXml/docs/Order.md | 165 ++- .../docs/OuterComposite.md | 84 +- .../go/go-petstore-withXml/docs/OuterEnum.md | 1 + .../go/go-petstore-withXml/docs/Pet.md | 165 ++- .../go-petstore-withXml/docs/ReadOnlyFirst.md | 57 +- .../go/go-petstore-withXml/docs/Return.md | 30 +- .../docs/SpecialModelName.md | 30 +- .../go/go-petstore-withXml/docs/Tag.md | 57 +- .../docs/TypeHolderDefault.md | 138 +- .../docs/TypeHolderExample.md | 138 +- .../go/go-petstore-withXml/docs/User.md | 219 +++- .../go/go-petstore-withXml/docs/XmlItem.md | 786 +++++++++++- .../go-petstore-withXml/model_200_response.go | 89 +- .../model_additional_properties_any_type.go | 50 +- .../model_additional_properties_array.go | 50 +- .../model_additional_properties_boolean.go | 50 +- .../model_additional_properties_class.go | 440 ++++++- .../model_additional_properties_integer.go | 50 +- .../model_additional_properties_number.go | 50 +- .../model_additional_properties_object.go | 50 +- .../model_additional_properties_string.go | 50 +- .../go/go-petstore-withXml/model_animal.go | 93 +- .../go-petstore-withXml/model_api_response.go | 128 +- .../model_array_of_array_of_number_only.go | 50 +- .../model_array_of_number_only.go | 50 +- .../go-petstore-withXml/model_array_test_.go | 128 +- .../model_capitalization.go | 245 +++- .../go/go-petstore-withXml/model_cat.go | 132 +- .../go-petstore-withXml/model_cat_all_of.go | 50 +- .../go/go-petstore-withXml/model_category.go | 93 +- .../go-petstore-withXml/model_class_model.go | 50 +- .../go/go-petstore-withXml/model_client.go | 50 +- .../go/go-petstore-withXml/model_dog.go | 132 +- .../go-petstore-withXml/model_dog_all_of.go | 50 +- .../go-petstore-withXml/model_enum_arrays.go | 89 +- .../go-petstore-withXml/model_enum_class.go | 3 +- .../go-petstore-withXml/model_enum_test_.go | 210 ++- .../go/go-petstore-withXml/model_file.go | 50 +- .../model_file_schema_test_class.go | 89 +- .../go-petstore-withXml/model_format_test_.go | 529 +++++++- .../model_has_only_read_only.go | 89 +- .../go/go-petstore-withXml/model_list.go | 50 +- .../go/go-petstore-withXml/model_map_test_.go | 167 ++- ...perties_and_additional_properties_class.go | 126 +- .../go/go-petstore-withXml/model_name.go | 171 ++- .../go-petstore-withXml/model_number_only.go | 50 +- .../go/go-petstore-withXml/model_order.go | 243 +++- .../model_outer_composite.go | 128 +- .../go-petstore-withXml/model_outer_enum.go | 3 +- .../go/go-petstore-withXml/model_pet.go | 252 +++- .../model_read_only_first.go | 89 +- .../go/go-petstore-withXml/model_return.go | 50 +- .../model_special_model_name.go | 50 +- .../go/go-petstore-withXml/model_tag.go | 89 +- .../model_type_holder_default.go | 222 +++- .../model_type_holder_example.go | 222 +++- .../go/go-petstore-withXml/model_user.go | 323 ++++- .../go/go-petstore-withXml/model_xml_item.go | 1142 ++++++++++++++++- .../petstore/go/go-petstore-withXml/utils.go | 40 + .../docs/AdditionalPropertiesAnyType.md | 30 +- .../docs/AdditionalPropertiesArray.md | 30 +- .../docs/AdditionalPropertiesBoolean.md | 30 +- .../docs/AdditionalPropertiesClass.md | 300 ++++- .../docs/AdditionalPropertiesInteger.md | 30 +- .../docs/AdditionalPropertiesNumber.md | 30 +- .../docs/AdditionalPropertiesObject.md | 30 +- .../docs/AdditionalPropertiesString.md | 30 +- .../petstore/go/go-petstore/docs/Animal.md | 57 +- .../go/go-petstore/docs/ApiResponse.md | 84 +- .../docs/ArrayOfArrayOfNumberOnly.md | 30 +- .../go/go-petstore/docs/ArrayOfNumberOnly.md | 30 +- .../petstore/go/go-petstore/docs/ArrayTest.md | 84 +- .../go/go-petstore/docs/Capitalization.md | 165 ++- .../petstore/go/go-petstore/docs/Cat.md | 84 +- .../petstore/go/go-petstore/docs/CatAllOf.md | 30 +- .../petstore/go/go-petstore/docs/Category.md | 57 +- .../go/go-petstore/docs/ClassModel.md | 30 +- .../petstore/go/go-petstore/docs/Client.md | 30 +- .../petstore/go/go-petstore/docs/Dog.md | 84 +- .../petstore/go/go-petstore/docs/DogAllOf.md | 30 +- .../go/go-petstore/docs/EnumArrays.md | 57 +- .../petstore/go/go-petstore/docs/EnumClass.md | 1 + .../petstore/go/go-petstore/docs/EnumTest.md | 138 +- .../petstore/go/go-petstore/docs/File.md | 30 +- .../go-petstore/docs/FileSchemaTestClass.md | 57 +- .../go/go-petstore/docs/FormatTest.md | 354 ++++- .../go/go-petstore/docs/HasOnlyReadOnly.md | 57 +- .../petstore/go/go-petstore/docs/List.md | 30 +- .../petstore/go/go-petstore/docs/MapTest.md | 111 +- ...dPropertiesAndAdditionalPropertiesClass.md | 84 +- .../go/go-petstore/docs/Model200Response.md | 57 +- .../petstore/go/go-petstore/docs/Name.md | 111 +- .../go/go-petstore/docs/NumberOnly.md | 30 +- .../petstore/go/go-petstore/docs/Order.md | 165 ++- .../go/go-petstore/docs/OuterComposite.md | 84 +- .../petstore/go/go-petstore/docs/OuterEnum.md | 1 + .../petstore/go/go-petstore/docs/Pet.md | 165 ++- .../go/go-petstore/docs/ReadOnlyFirst.md | 57 +- .../petstore/go/go-petstore/docs/Return.md | 30 +- .../go/go-petstore/docs/SpecialModelName.md | 30 +- .../petstore/go/go-petstore/docs/Tag.md | 57 +- .../go/go-petstore/docs/TypeHolderDefault.md | 138 +- .../go/go-petstore/docs/TypeHolderExample.md | 138 +- .../petstore/go/go-petstore/docs/User.md | 219 +++- .../petstore/go/go-petstore/docs/XmlItem.md | 786 +++++++++++- .../go/go-petstore/model_200_response.go | 89 +- .../model_additional_properties_any_type.go | 50 +- .../model_additional_properties_array.go | 50 +- .../model_additional_properties_boolean.go | 50 +- .../model_additional_properties_class.go | 440 ++++++- .../model_additional_properties_integer.go | 50 +- .../model_additional_properties_number.go | 50 +- .../model_additional_properties_object.go | 50 +- .../model_additional_properties_string.go | 50 +- .../petstore/go/go-petstore/model_animal.go | 93 +- .../go/go-petstore/model_api_response.go | 128 +- .../model_array_of_array_of_number_only.go | 50 +- .../go-petstore/model_array_of_number_only.go | 50 +- .../go/go-petstore/model_array_test_.go | 128 +- .../go/go-petstore/model_capitalization.go | 245 +++- .../petstore/go/go-petstore/model_cat.go | 132 +- .../go/go-petstore/model_cat_all_of.go | 50 +- .../petstore/go/go-petstore/model_category.go | 93 +- .../go/go-petstore/model_class_model.go | 50 +- .../petstore/go/go-petstore/model_client.go | 50 +- .../petstore/go/go-petstore/model_dog.go | 132 +- .../go/go-petstore/model_dog_all_of.go | 50 +- .../go/go-petstore/model_enum_arrays.go | 89 +- .../go/go-petstore/model_enum_class.go | 3 +- .../go/go-petstore/model_enum_test_.go | 210 ++- .../petstore/go/go-petstore/model_file.go | 50 +- .../model_file_schema_test_class.go | 89 +- .../go/go-petstore/model_format_test_.go | 529 +++++++- .../go-petstore/model_has_only_read_only.go | 89 +- .../petstore/go/go-petstore/model_list.go | 50 +- .../go/go-petstore/model_map_test_.go | 167 ++- ...perties_and_additional_properties_class.go | 126 +- .../petstore/go/go-petstore/model_name.go | 171 ++- .../go/go-petstore/model_number_only.go | 50 +- .../petstore/go/go-petstore/model_order.go | 243 +++- .../go/go-petstore/model_outer_composite.go | 128 +- .../go/go-petstore/model_outer_enum.go | 3 +- .../petstore/go/go-petstore/model_pet.go | 252 +++- .../go/go-petstore/model_read_only_first.go | 89 +- .../petstore/go/go-petstore/model_return.go | 50 +- .../go-petstore/model_special_model_name.go | 50 +- .../petstore/go/go-petstore/model_tag.go | 89 +- .../go-petstore/model_type_holder_default.go | 222 +++- .../go-petstore/model_type_holder_example.go | 222 +++- .../petstore/go/go-petstore/model_user.go | 323 ++++- .../petstore/go/go-petstore/model_xml_item.go | 1142 ++++++++++++++++- .../client/petstore/go/go-petstore/utils.go | 39 + samples/client/petstore/go/pet_api_test.go | 22 +- samples/client/petstore/go/store_api_test.go | 12 +- samples/client/petstore/go/user_api_test.go | 76 +- 195 files changed, 21441 insertions(+), 691 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/go/utils.mustache create mode 100644 samples/client/petstore/go/go-petstore-withXml/utils.go create mode 100644 samples/client/petstore/go/go-petstore/utils.go diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index 749ae845c8e4..d7771c60a94e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -19,12 +19,16 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.List; +import java.util.Map; public class GoClientCodegen extends AbstractGoCodegen { @@ -99,6 +103,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("go.mod.mustache", "", "go.mod")); supportingFiles.add(new SupportingFile("go.sum", "", "go.sum")); supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml")); + supportingFiles.add(new SupportingFile("utils.mustache", "", "utils.go")); if (additionalProperties.containsKey(WITH_GO_CODEGEN_COMMENT)) { setWithGoCodegenComment(Boolean.parseBoolean(additionalProperties.get(WITH_GO_CODEGEN_COMMENT).toString())); @@ -122,6 +127,32 @@ public void processOpts() { } } + @Override + public Map postProcessModels(Map objs) { + objs = super.postProcessModels(objs); + List> imports = (List>) objs.get("imports"); + + boolean addedErrorsImport = false; + List> models = (List>) objs.get("models"); + for (Map m : models) { + Object v = m.get("model"); + if (v instanceof CodegenModel) { + CodegenModel model = (CodegenModel) v; + if (!model.isEnum) { + imports.add(createMapping("import", "encoding/json")); + } + for (CodegenProperty param : model.vars) { + if (!addedErrorsImport && param.required) { + imports.add(createMapping("import", "errors")); + addedErrorsImport = true; + } + } + } + } + + return objs; + } + /** * Configures the type of generator. * diff --git a/modules/openapi-generator/src/main/resources/go/model.mustache b/modules/openapi-generator/src/main/resources/go/model.mustache index 1a9f8d1c5aaf..17833f918b59 100644 --- a/modules/openapi-generator/src/main/resources/go/model.mustache +++ b/modules/openapi-generator/src/main/resources/go/model.mustache @@ -35,9 +35,95 @@ type {{classname}} struct { {{#description}} // {{{description}}} {{/description}} - {{name}} {{#isNullable}}*{{/isNullable}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` + {{name}} *{{{dataType}}} `json:"{{baseName}},omitempty"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` +{{#isNullable}} isExplicitNull{{name}} bool `json:"-"{{#withXml}} xml:"-"{{/withXml}}`{{/isNullable}} {{/vars}} } {{/isEnum}} + +{{^isEnum}} +{{#vars}} +// Get{{name}} returns the {{name}} field if non-nil, zero value otherwise. +func (o *{{classname}}) Get{{name}}() {{dataType}} { + if o == nil || o.{{name}} == nil { + var ret {{dataType}} + return ret + } + return *o.{{name}} +} + +// Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *{{classname}}) Get{{name}}Ok() ({{dataType}}, bool) { + if o == nil || o.{{name}} == nil { + var ret {{dataType}} + return ret, false + } + return *o.{{name}}, true +} + +// Has{{name}} returns a boolean if a field has been set. +func (o *{{classname}}) Has{{name}}() bool { + if o != nil && o.{{name}} != nil { + return true + } + + return false +} + +// Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field. +func (o *{{classname}}) Set{{name}}(v {{dataType}}) { + o.{{name}} = &v +} + +{{#isNullable}} +// Set{{name}}ExplicitNull (un)sets {{name}} to be considered as explicit "null" value +// when serializing to JSON (pass true as argument to set this, false to unset) +// The {{name}} value is set to nil even if false is passed +func (o *{{classname}}) Set{{name}}ExplicitNull(b bool) { + o.{{name}} = nil + o.isExplicitNull{{name}} = b +} +{{/isNullable}} +{{/vars}} + +func (o {{classname}}) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + {{#vars}} + {{#required}} + {{! if argument is required and not nullable, it can't be nil}} + {{^isNullable}} + if o.{{name}} == nil { + return nil, errors.New("{{name}} is required and not nullable, but was not set on {{classname}}") + }{{/isNullable}} + {{! if argument is required and nullable, it *must* have isExplicitNull set to true when it's nil}} + {{#isNullable}} + if o.{{name}} == nil && !o.isExplicitNull{{name}} { + return nil, errors.New("{{name}} is required and nullable, but it wasn't set to be explicit null") + } + {{/isNullable}} + {{/required}} + {{! if argument is nullable, only serialize it if it is nil *and* was explicitly set to nil}} + {{#isNullable}} + if o.{{name}} == nil { + if o.isExplicitNull{{name}} { + toSerialize["{{baseName}}"] = o.{{name}} + } + } else { + toSerialize["{{baseName}}"] = o.{{name}} + } + {{/isNullable}} + {{! if argument is not nullable, don't set it if it is nil}} + {{^isNullable}} + if o.{{name}} != nil { + toSerialize["{{baseName}}"] = o.{{name}} + } + {{/isNullable}} + {{/vars}} + return json.Marshal(toSerialize) +} + +{{/isEnum}} + {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/go/model_doc.mustache b/modules/openapi-generator/src/main/resources/go/model_doc.mustache index 546238243b10..98040dcb2501 100644 --- a/modules/openapi-generator/src/main/resources/go/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_doc.mustache @@ -4,9 +4,50 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isNullable}}Pointer to {{/isNullable}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | Pointer to {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/vars}} +{{^isEnum}} +## Methods + +{{#vars}} +### Get{{name}} + +`func (o *{{classname}}) Get{{name}}() {{dataType}}` + +Get{{name}} returns the {{name}} field if non-nil, zero value otherwise. + +### Get{{name}}Ok + +`func (o *{{classname}}) Get{{name}}Ok() ({{dataType}}, bool)` + +Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### Has{{name}} + +`func (o *{{classname}}) Has{{name}}() bool` + +Has{{name}} returns a boolean if a field has been set. + +### Set{{name}} + +`func (o *{{classname}}) Set{{name}}(v {{dataType}})` + +Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field. + +{{#isNullable}} +### Set{{name}}ExplicitNull + +`func (o *{{classname}}) Set{{name}}ExplicitNull(b bool)` + +Set{{name}}ExplicitNull (un)sets {{name}} to be considered as explicit "null" value +when serializing to JSON (pass true as argument to set this, false to unset) +The {{name}} value is set to nil even if false is passed +{{/isNullable}} +{{/vars}} +{{/isEnum}} + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) {{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/go/utils.mustache b/modules/openapi-generator/src/main/resources/go/utils.mustache new file mode 100644 index 000000000000..b3191f92a047 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/go/utils.mustache @@ -0,0 +1,31 @@ +{{>partial_header}} +package {{packageName}} + +import "time" + +// Bool is a helper routine that returns a pointer to given integer value. +func Bool(v bool) *bool { return &v } + +// Int is a helper routine that returns a pointer to given integer value. +func Int(v int) *int { return &v } + +// Int32 is a helper routine that returns a pointer to given integer value. +func Int32(v int32) *int32 { return &v } + +// Int64 is a helper routine that returns a pointer to given integer value. +func Int64(v int64) *int64 { return &v } + +// Float is a helper routine that returns a pointer to given float value. +func Float(v float32) *float32 { return &v } + +// Float32 is a helper routine that returns a pointer to given float value. +func Float32(v float32) *float32 { return &v } + +// Float64 is a helper routine that returns a pointer to given float value. +func Float64(v float64) *float64 { return &v } + +// String is a helper routine that returns a pointer to given string value. +func String(v string) *string { return &v } + +// Time is helper routine that returns a pointer to given Time value. +func Time(v time.Time) *time.Time { return &v } \ No newline at end of file diff --git a/samples/client/petstore/go/auth_test.go b/samples/client/petstore/go/auth_test.go index 5f817703a886..6bfba6d160fd 100644 --- a/samples/client/petstore/go/auth_test.go +++ b/samples/client/petstore/go/auth_test.go @@ -37,8 +37,9 @@ func TestOAuth2(t *testing.T) { tokenSource := cfg.TokenSource(createContext(nil), &tok) auth := context.WithValue(context.Background(), sw.ContextOAuth2, tokenSource) - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{Id: sw.Int64(12992), Name: sw.String("gopher"), + PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.String("pending"), + Tags: &[]sw.Tag{sw.Tag{Id: sw.Int64(1), Name: sw.String("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -71,8 +72,9 @@ func TestBasicAuth(t *testing.T) { Password: "f4k3p455", }) - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{Id: sw.Int64(12992), Name: sw.String("gopher"), + PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.String("pending"), + Tags: &[]sw.Tag{sw.Tag{Id: sw.Int64(1), Name: sw.String("tag2")}}}) r, err := client.PetApi.AddPet(auth, newPet) @@ -100,8 +102,9 @@ func TestBasicAuth(t *testing.T) { func TestAccessToken(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAccessToken, "TESTFAKEACCESSTOKENISFAKE") - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{Id: sw.Int64(12992), Name: sw.String("gopher"), + PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.String("pending"), + Tags: &[]sw.Tag{sw.Tag{Id: sw.Int64(1), Name: sw.String("tag2")}}}) r, err := client.PetApi.AddPet(nil, newPet) @@ -129,8 +132,9 @@ func TestAccessToken(t *testing.T) { func TestAPIKeyNoPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{Key: "TEST123"}) - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{Id: sw.Int64(12992), Name: sw.String("gopher"), + PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.String("pending"), + Tags: &[]sw.Tag{sw.Tag{Id: sw.Int64(1), Name: sw.String("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -163,8 +167,9 @@ func TestAPIKeyNoPrefix(t *testing.T) { func TestAPIKeyWithPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{Key: "TEST123", Prefix: "Bearer"}) - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{Id: sw.Int64(12992), Name: sw.String("gopher"), + PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.String("pending"), + Tags: &[]sw.Tag{sw.Tag{Id: sw.Int64(1), Name: sw.String("tag2")}}}) r, err := client.PetApi.AddPet(nil, newPet) @@ -196,8 +201,9 @@ func TestAPIKeyWithPrefix(t *testing.T) { func TestDefaultHeader(t *testing.T) { - newPet := (sw.Pet{Id: 12992, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{Id: sw.Int64(12992), Name: sw.String("gopher"), + PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.String("pending"), + Tags: &[]sw.Tag{sw.Tag{Id: sw.Int64(1), Name: sw.String("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) diff --git a/samples/client/petstore/go/fake_api_test.go b/samples/client/petstore/go/fake_api_test.go index f4242b5048c0..3367826bbd96 100644 --- a/samples/client/petstore/go/fake_api_test.go +++ b/samples/client/petstore/go/fake_api_test.go @@ -14,8 +14,8 @@ func TestPutBodyWithFileSchema(t *testing.T) { return // early return to test compilation schema := sw.FileSchemaTestClass{ - File: sw.File{SourceURI: "https://example.com/image.png"}, - Files: []sw.File{{SourceURI: "https://example.com/image.png"}}} + File: &sw.File{SourceURI: sw.String("https://example.com/image.png")}, + Files: &[]sw.File{{SourceURI: sw.String("https://example.com/image.png")}}} r, err := client.FakeApi.TestBodyWithFileSchema(context.Background(), schema) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md index eadec3142ce8..d6a64a17629c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesAnyType.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesAnyType) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesAnyType) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesAnyType) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md index 0c37598aeb2c..8fa3956c6cbf 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesArray.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesArray) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesArray) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesArray) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesArray) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md index 7190fe8429b8..dab05846a08e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesBoolean.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesBoolean) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesBoolean) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesBoolean) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md index 877a5d45a316..8b22e0ef339a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md @@ -4,17 +4,295 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapString** | **map[string]string** | | [optional] -**MapNumber** | **map[string]float32** | | [optional] -**MapInteger** | **map[string]int32** | | [optional] -**MapBoolean** | **map[string]bool** | | [optional] -**MapArrayInteger** | [**map[string][]int32**](array.md) | | [optional] -**MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] -**MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] -**MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] -**Anytype1** | [**map[string]interface{}**](.md) | | [optional] -**Anytype2** | [**map[string]interface{}**](.md) | | [optional] -**Anytype3** | [**map[string]interface{}**](.md) | | [optional] +**MapString** | Pointer to **map[string]string** | | [optional] +**MapNumber** | Pointer to **map[string]float32** | | [optional] +**MapInteger** | Pointer to **map[string]int32** | | [optional] +**MapBoolean** | Pointer to **map[string]bool** | | [optional] +**MapArrayInteger** | Pointer to [**map[string][]int32**](array.md) | | [optional] +**MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional] +**MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] +**MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] +**Anytype1** | Pointer to [**map[string]interface{}**](.md) | | [optional] +**Anytype2** | Pointer to [**map[string]interface{}**](.md) | | [optional] +**Anytype3** | Pointer to [**map[string]interface{}**](.md) | | [optional] + +## Methods + +### GetMapString + +`func (o *AdditionalPropertiesClass) GetMapString() map[string]string` + +GetMapString returns the MapString field if non-nil, zero value otherwise. + +### GetMapStringOk + +`func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool)` + +GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapString + +`func (o *AdditionalPropertiesClass) HasMapString() bool` + +HasMapString returns a boolean if a field has been set. + +### SetMapString + +`func (o *AdditionalPropertiesClass) SetMapString(v map[string]string)` + +SetMapString gets a reference to the given map[string]string and assigns it to the MapString field. + +### GetMapNumber + +`func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32` + +GetMapNumber returns the MapNumber field if non-nil, zero value otherwise. + +### GetMapNumberOk + +`func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool)` + +GetMapNumberOk returns a tuple with the MapNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapNumber + +`func (o *AdditionalPropertiesClass) HasMapNumber() bool` + +HasMapNumber returns a boolean if a field has been set. + +### SetMapNumber + +`func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32)` + +SetMapNumber gets a reference to the given map[string]float32 and assigns it to the MapNumber field. + +### GetMapInteger + +`func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32` + +GetMapInteger returns the MapInteger field if non-nil, zero value otherwise. + +### GetMapIntegerOk + +`func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool)` + +GetMapIntegerOk returns a tuple with the MapInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapInteger + +`func (o *AdditionalPropertiesClass) HasMapInteger() bool` + +HasMapInteger returns a boolean if a field has been set. + +### SetMapInteger + +`func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32)` + +SetMapInteger gets a reference to the given map[string]int32 and assigns it to the MapInteger field. + +### GetMapBoolean + +`func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool` + +GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise. + +### GetMapBooleanOk + +`func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool)` + +GetMapBooleanOk returns a tuple with the MapBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapBoolean + +`func (o *AdditionalPropertiesClass) HasMapBoolean() bool` + +HasMapBoolean returns a boolean if a field has been set. + +### SetMapBoolean + +`func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool)` + +SetMapBoolean gets a reference to the given map[string]bool and assigns it to the MapBoolean field. + +### GetMapArrayInteger + +`func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32` + +GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value otherwise. + +### GetMapArrayIntegerOk + +`func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool)` + +GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapArrayInteger + +`func (o *AdditionalPropertiesClass) HasMapArrayInteger() bool` + +HasMapArrayInteger returns a boolean if a field has been set. + +### SetMapArrayInteger + +`func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32)` + +SetMapArrayInteger gets a reference to the given map[string][]int32 and assigns it to the MapArrayInteger field. + +### GetMapArrayAnytype + +`func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{}` + +GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise. + +### GetMapArrayAnytypeOk + +`func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool)` + +GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapArrayAnytype + +`func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool` + +HasMapArrayAnytype returns a boolean if a field has been set. + +### SetMapArrayAnytype + +`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{})` + +SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field. + +### GetMapMapString + +`func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]string` + +GetMapMapString returns the MapMapString field if non-nil, zero value otherwise. + +### GetMapMapStringOk + +`func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool)` + +GetMapMapStringOk returns a tuple with the MapMapString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapMapString + +`func (o *AdditionalPropertiesClass) HasMapMapString() bool` + +HasMapMapString returns a boolean if a field has been set. + +### SetMapMapString + +`func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]string)` + +SetMapMapString gets a reference to the given map[string]map[string]string and assigns it to the MapMapString field. + +### GetMapMapAnytype + +`func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{}` + +GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise. + +### GetMapMapAnytypeOk + +`func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool)` + +GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapMapAnytype + +`func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool` + +HasMapMapAnytype returns a boolean if a field has been set. + +### SetMapMapAnytype + +`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{})` + +SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field. + +### GetAnytype1 + +`func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{}` + +GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. + +### GetAnytype1Ok + +`func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool)` + +GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAnytype1 + +`func (o *AdditionalPropertiesClass) HasAnytype1() bool` + +HasAnytype1 returns a boolean if a field has been set. + +### SetAnytype1 + +`func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{})` + +SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field. + +### GetAnytype2 + +`func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{}` + +GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. + +### GetAnytype2Ok + +`func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool)` + +GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAnytype2 + +`func (o *AdditionalPropertiesClass) HasAnytype2() bool` + +HasAnytype2 returns a boolean if a field has been set. + +### SetAnytype2 + +`func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{})` + +SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field. + +### GetAnytype3 + +`func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{}` + +GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. + +### GetAnytype3Ok + +`func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool)` + +GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAnytype3 + +`func (o *AdditionalPropertiesClass) HasAnytype3() bool` + +HasAnytype3 returns a boolean if a field has been set. + +### SetAnytype3 + +`func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{})` + +SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md index 34e6fca8fb00..9bed1f72584a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesInteger.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesInteger) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesInteger) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesInteger) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md index 6d41fd2315c7..efc3cc156c1e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesNumber.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesNumber) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesNumber) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesNumber) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md index b856de693b16..af3963446840 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesObject.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesObject) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesObject) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesObject) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesObject) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md index 69ad20656858..0934f9bf5042 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesString.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesString) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesString) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesString) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesString) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md b/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md index 02d23377da6d..55133b29745a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Animal.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to red] +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] + +## Methods + +### GetClassName + +`func (o *Animal) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Animal) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Animal) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Animal) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Animal) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Animal) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Animal) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Animal) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md b/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md index 41d28fb578c1..b0c891bbc960 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ApiResponse.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Code** | **int32** | | [optional] -**Type** | **string** | | [optional] -**Message** | **string** | | [optional] +**Code** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### GetCode + +`func (o *ApiResponse) GetCode() int32` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *ApiResponse) GetCodeOk() (int32, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCode + +`func (o *ApiResponse) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### SetCode + +`func (o *ApiResponse) SetCode(v int32)` + +SetCode gets a reference to the given int32 and assigns it to the Code field. + +### GetType + +`func (o *ApiResponse) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ApiResponse) GetTypeOk() (string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasType + +`func (o *ApiResponse) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetType + +`func (o *ApiResponse) SetType(v string)` + +SetType gets a reference to the given string and assigns it to the Type field. + +### GetMessage + +`func (o *ApiResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ApiResponse) GetMessageOk() (string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMessage + +`func (o *ApiResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessage + +`func (o *ApiResponse) SetMessage(v string)` + +SetMessage gets a reference to the given string and assigns it to the Message field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md index 555213013b20..64ad908ea3bf 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfArrayOfNumberOnly.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional] +**ArrayArrayNumber** | Pointer to [**[][]float32**](array.md) | | [optional] + +## Methods + +### GetArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32` + +GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. + +### GetArrayArrayNumberOk + +`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool)` + +GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool` + +HasArrayArrayNumber returns a boolean if a field has been set. + +### SetArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)` + +SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md index 56618756dd77..0ce95922a5ed 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayOfNumberOnly.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayNumber** | **[]float32** | | [optional] +**ArrayNumber** | Pointer to **[]float32** | | [optional] + +## Methods + +### GetArrayNumber + +`func (o *ArrayOfNumberOnly) GetArrayNumber() []float32` + +GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. + +### GetArrayNumberOk + +`func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool)` + +GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayNumber + +`func (o *ArrayOfNumberOnly) HasArrayNumber() bool` + +HasArrayNumber returns a boolean if a field has been set. + +### SetArrayNumber + +`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)` + +SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md index 0da0bc52d2d3..f7020fadea38 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ArrayTest.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayOfString** | **[]string** | | [optional] -**ArrayArrayOfInteger** | [**[][]int64**](array.md) | | [optional] -**ArrayArrayOfModel** | [**[][]ReadOnlyFirst**](array.md) | | [optional] +**ArrayOfString** | Pointer to **[]string** | | [optional] +**ArrayArrayOfInteger** | Pointer to [**[][]int64**](array.md) | | [optional] +**ArrayArrayOfModel** | Pointer to [**[][]ReadOnlyFirst**](array.md) | | [optional] + +## Methods + +### GetArrayOfString + +`func (o *ArrayTest) GetArrayOfString() []string` + +GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. + +### GetArrayOfStringOk + +`func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool)` + +GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayOfString + +`func (o *ArrayTest) HasArrayOfString() bool` + +HasArrayOfString returns a boolean if a field has been set. + +### SetArrayOfString + +`func (o *ArrayTest) SetArrayOfString(v []string)` + +SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. + +### GetArrayArrayOfInteger + +`func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64` + +GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. + +### GetArrayArrayOfIntegerOk + +`func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool)` + +GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayOfInteger + +`func (o *ArrayTest) HasArrayArrayOfInteger() bool` + +HasArrayArrayOfInteger returns a boolean if a field has been set. + +### SetArrayArrayOfInteger + +`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)` + +SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. + +### GetArrayArrayOfModel + +`func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst` + +GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. + +### GetArrayArrayOfModelOk + +`func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool)` + +GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayOfModel + +`func (o *ArrayTest) HasArrayArrayOfModel() bool` + +HasArrayArrayOfModel returns a boolean if a field has been set. + +### SetArrayArrayOfModel + +`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)` + +SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md b/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md index 426b8eabd9bd..a4772d740066 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Capitalization.md @@ -4,12 +4,165 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] -**CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] -**CapitalSnake** | **string** | | [optional] -**SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name of the pet | [optional] +**SmallCamel** | Pointer to **string** | | [optional] +**CapitalCamel** | Pointer to **string** | | [optional] +**SmallSnake** | Pointer to **string** | | [optional] +**CapitalSnake** | Pointer to **string** | | [optional] +**SCAETHFlowPoints** | Pointer to **string** | | [optional] +**ATT_NAME** | Pointer to **string** | Name of the pet | [optional] + +## Methods + +### GetSmallCamel + +`func (o *Capitalization) GetSmallCamel() string` + +GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. + +### GetSmallCamelOk + +`func (o *Capitalization) GetSmallCamelOk() (string, bool)` + +GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSmallCamel + +`func (o *Capitalization) HasSmallCamel() bool` + +HasSmallCamel returns a boolean if a field has been set. + +### SetSmallCamel + +`func (o *Capitalization) SetSmallCamel(v string)` + +SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field. + +### GetCapitalCamel + +`func (o *Capitalization) GetCapitalCamel() string` + +GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. + +### GetCapitalCamelOk + +`func (o *Capitalization) GetCapitalCamelOk() (string, bool)` + +GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCapitalCamel + +`func (o *Capitalization) HasCapitalCamel() bool` + +HasCapitalCamel returns a boolean if a field has been set. + +### SetCapitalCamel + +`func (o *Capitalization) SetCapitalCamel(v string)` + +SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field. + +### GetSmallSnake + +`func (o *Capitalization) GetSmallSnake() string` + +GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. + +### GetSmallSnakeOk + +`func (o *Capitalization) GetSmallSnakeOk() (string, bool)` + +GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSmallSnake + +`func (o *Capitalization) HasSmallSnake() bool` + +HasSmallSnake returns a boolean if a field has been set. + +### SetSmallSnake + +`func (o *Capitalization) SetSmallSnake(v string)` + +SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field. + +### GetCapitalSnake + +`func (o *Capitalization) GetCapitalSnake() string` + +GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. + +### GetCapitalSnakeOk + +`func (o *Capitalization) GetCapitalSnakeOk() (string, bool)` + +GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCapitalSnake + +`func (o *Capitalization) HasCapitalSnake() bool` + +HasCapitalSnake returns a boolean if a field has been set. + +### SetCapitalSnake + +`func (o *Capitalization) SetCapitalSnake(v string)` + +SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field. + +### GetSCAETHFlowPoints + +`func (o *Capitalization) GetSCAETHFlowPoints() string` + +GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. + +### GetSCAETHFlowPointsOk + +`func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool)` + +GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSCAETHFlowPoints + +`func (o *Capitalization) HasSCAETHFlowPoints() bool` + +HasSCAETHFlowPoints returns a boolean if a field has been set. + +### SetSCAETHFlowPoints + +`func (o *Capitalization) SetSCAETHFlowPoints(v string)` + +SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field. + +### GetATT_NAME + +`func (o *Capitalization) GetATT_NAME() string` + +GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. + +### GetATT_NAMEOk + +`func (o *Capitalization) GetATT_NAMEOk() (string, bool)` + +GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasATT_NAME + +`func (o *Capitalization) HasATT_NAME() bool` + +HasATT_NAME returns a boolean if a field has been set. + +### SetATT_NAME + +`func (o *Capitalization) SetATT_NAME(v string)` + +SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md b/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md index 1ef1f095e947..0f2fe5a1f1f8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Cat.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to red] -**Declawed** | **bool** | | [optional] +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] +**Declawed** | Pointer to **bool** | | [optional] + +## Methods + +### GetClassName + +`func (o *Cat) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Cat) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Cat) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Cat) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Cat) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Cat) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Cat) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Cat) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + +### GetDeclawed + +`func (o *Cat) GetDeclawed() bool` + +GetDeclawed returns the Declawed field if non-nil, zero value otherwise. + +### GetDeclawedOk + +`func (o *Cat) GetDeclawedOk() (bool, bool)` + +GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDeclawed + +`func (o *Cat) HasDeclawed() bool` + +HasDeclawed returns a boolean if a field has been set. + +### SetDeclawed + +`func (o *Cat) SetDeclawed(v bool)` + +SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md b/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md index c978cee0417f..85f40d251d94 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/CatAllOf.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] +**Declawed** | Pointer to **bool** | | [optional] + +## Methods + +### GetDeclawed + +`func (o *CatAllOf) GetDeclawed() bool` + +GetDeclawed returns the Declawed field if non-nil, zero value otherwise. + +### GetDeclawedOk + +`func (o *CatAllOf) GetDeclawedOk() (bool, bool)` + +GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDeclawed + +`func (o *CatAllOf) HasDeclawed() bool` + +HasDeclawed returns a boolean if a field has been set. + +### SetDeclawed + +`func (o *CatAllOf) SetDeclawed(v bool)` + +SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Category.md b/samples/client/petstore/go/go-petstore-withXml/docs/Category.md index 01e8344bd06f..88b525bade15 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Category.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Category.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Name** | **string** | | [default to default-name] +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [default to default-name] + +## Methods + +### GetId + +`func (o *Category) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Category) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Category) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Category) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetName + +`func (o *Category) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Category) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Category) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Category) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md b/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md index 0b925cebb1f6..d9c4f41e98bc 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ClassModel.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Class** | **string** | | [optional] +**Class** | Pointer to **string** | | [optional] + +## Methods + +### GetClass + +`func (o *ClassModel) GetClass() string` + +GetClass returns the Class field if non-nil, zero value otherwise. + +### GetClassOk + +`func (o *ClassModel) GetClassOk() (string, bool)` + +GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClass + +`func (o *ClassModel) HasClass() bool` + +HasClass returns a boolean if a field has been set. + +### SetClass + +`func (o *ClassModel) SetClass(v string)` + +SetClass gets a reference to the given string and assigns it to the Class field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Client.md b/samples/client/petstore/go/go-petstore-withXml/docs/Client.md index 551da852eece..5ed3098fd491 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Client.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Client.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Client** | **string** | | [optional] +**Client** | Pointer to **string** | | [optional] + +## Methods + +### GetClient + +`func (o *Client) GetClient() string` + +GetClient returns the Client field if non-nil, zero value otherwise. + +### GetClientOk + +`func (o *Client) GetClientOk() (string, bool)` + +GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClient + +`func (o *Client) HasClient() bool` + +HasClient returns a boolean if a field has been set. + +### SetClient + +`func (o *Client) SetClient(v string)` + +SetClient gets a reference to the given string and assigns it to the Client field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md b/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md index ff35dd5cdca2..4b5c332d8e14 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Dog.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to red] -**Breed** | **string** | | [optional] +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] +**Breed** | Pointer to **string** | | [optional] + +## Methods + +### GetClassName + +`func (o *Dog) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Dog) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Dog) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Dog) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Dog) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Dog) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Dog) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Dog) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + +### GetBreed + +`func (o *Dog) GetBreed() string` + +GetBreed returns the Breed field if non-nil, zero value otherwise. + +### GetBreedOk + +`func (o *Dog) GetBreedOk() (string, bool)` + +GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBreed + +`func (o *Dog) HasBreed() bool` + +HasBreed returns a boolean if a field has been set. + +### SetBreed + +`func (o *Dog) SetBreed(v string)` + +SetBreed gets a reference to the given string and assigns it to the Breed field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md b/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md index b87153e92652..a3169521cecc 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/DogAllOf.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Breed** | **string** | | [optional] +**Breed** | Pointer to **string** | | [optional] + +## Methods + +### GetBreed + +`func (o *DogAllOf) GetBreed() string` + +GetBreed returns the Breed field if non-nil, zero value otherwise. + +### GetBreedOk + +`func (o *DogAllOf) GetBreedOk() (string, bool)` + +GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBreed + +`func (o *DogAllOf) HasBreed() bool` + +HasBreed returns a boolean if a field has been set. + +### SetBreed + +`func (o *DogAllOf) SetBreed(v string)` + +SetBreed gets a reference to the given string and assigns it to the Breed field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md index 3021f8818307..31d7b2b9faaa 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumArrays.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] -**ArrayEnum** | **[]string** | | [optional] +**JustSymbol** | Pointer to **string** | | [optional] +**ArrayEnum** | Pointer to **[]string** | | [optional] + +## Methods + +### GetJustSymbol + +`func (o *EnumArrays) GetJustSymbol() string` + +GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. + +### GetJustSymbolOk + +`func (o *EnumArrays) GetJustSymbolOk() (string, bool)` + +GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasJustSymbol + +`func (o *EnumArrays) HasJustSymbol() bool` + +HasJustSymbol returns a boolean if a field has been set. + +### SetJustSymbol + +`func (o *EnumArrays) SetJustSymbol(v string)` + +SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field. + +### GetArrayEnum + +`func (o *EnumArrays) GetArrayEnum() []string` + +GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. + +### GetArrayEnumOk + +`func (o *EnumArrays) GetArrayEnumOk() ([]string, bool)` + +GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayEnum + +`func (o *EnumArrays) HasArrayEnum() bool` + +HasArrayEnum returns a boolean if a field has been set. + +### SetArrayEnum + +`func (o *EnumArrays) SetArrayEnum(v []string)` + +SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md index c6932388c067..e231f94bd73c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumClass.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md index eeec09b66b4f..d0e7aebc42d0 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/EnumTest.md @@ -4,11 +4,139 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EnumString** | **string** | | [optional] -**EnumStringRequired** | **string** | | -**EnumInteger** | **int32** | | [optional] -**EnumNumber** | **float64** | | [optional] -**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**EnumString** | Pointer to **string** | | [optional] +**EnumStringRequired** | Pointer to **string** | | +**EnumInteger** | Pointer to **int32** | | [optional] +**EnumNumber** | Pointer to **float64** | | [optional] +**OuterEnum** | Pointer to [**OuterEnum**](OuterEnum.md) | | [optional] + +## Methods + +### GetEnumString + +`func (o *EnumTest) GetEnumString() string` + +GetEnumString returns the EnumString field if non-nil, zero value otherwise. + +### GetEnumStringOk + +`func (o *EnumTest) GetEnumStringOk() (string, bool)` + +GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumString + +`func (o *EnumTest) HasEnumString() bool` + +HasEnumString returns a boolean if a field has been set. + +### SetEnumString + +`func (o *EnumTest) SetEnumString(v string)` + +SetEnumString gets a reference to the given string and assigns it to the EnumString field. + +### GetEnumStringRequired + +`func (o *EnumTest) GetEnumStringRequired() string` + +GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. + +### GetEnumStringRequiredOk + +`func (o *EnumTest) GetEnumStringRequiredOk() (string, bool)` + +GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumStringRequired + +`func (o *EnumTest) HasEnumStringRequired() bool` + +HasEnumStringRequired returns a boolean if a field has been set. + +### SetEnumStringRequired + +`func (o *EnumTest) SetEnumStringRequired(v string)` + +SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field. + +### GetEnumInteger + +`func (o *EnumTest) GetEnumInteger() int32` + +GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. + +### GetEnumIntegerOk + +`func (o *EnumTest) GetEnumIntegerOk() (int32, bool)` + +GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumInteger + +`func (o *EnumTest) HasEnumInteger() bool` + +HasEnumInteger returns a boolean if a field has been set. + +### SetEnumInteger + +`func (o *EnumTest) SetEnumInteger(v int32)` + +SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field. + +### GetEnumNumber + +`func (o *EnumTest) GetEnumNumber() float64` + +GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. + +### GetEnumNumberOk + +`func (o *EnumTest) GetEnumNumberOk() (float64, bool)` + +GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumNumber + +`func (o *EnumTest) HasEnumNumber() bool` + +HasEnumNumber returns a boolean if a field has been set. + +### SetEnumNumber + +`func (o *EnumTest) SetEnumNumber(v float64)` + +SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field. + +### GetOuterEnum + +`func (o *EnumTest) GetOuterEnum() OuterEnum` + +GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. + +### GetOuterEnumOk + +`func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool)` + +GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasOuterEnum + +`func (o *EnumTest) HasOuterEnum() bool` + +HasOuterEnum returns a boolean if a field has been set. + +### SetOuterEnum + +`func (o *EnumTest) SetOuterEnum(v OuterEnum)` + +SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/File.md b/samples/client/petstore/go/go-petstore-withXml/docs/File.md index a113b0312cdf..454b159609c1 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/File.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/File.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SourceURI** | **string** | Test capitalization | [optional] +**SourceURI** | Pointer to **string** | Test capitalization | [optional] + +## Methods + +### GetSourceURI + +`func (o *File) GetSourceURI() string` + +GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. + +### GetSourceURIOk + +`func (o *File) GetSourceURIOk() (string, bool)` + +GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSourceURI + +`func (o *File) HasSourceURI() bool` + +HasSourceURI returns a boolean if a field has been set. + +### SetSourceURI + +`func (o *File) SetSourceURI(v string)` + +SetSourceURI gets a reference to the given string and assigns it to the SourceURI field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md index ae51414dd6cc..d4a4da7206c4 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FileSchemaTestClass.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**File** | [**File**](File.md) | | [optional] -**Files** | [**[]File**](File.md) | | [optional] +**File** | Pointer to [**File**](File.md) | | [optional] +**Files** | Pointer to [**[]File**](File.md) | | [optional] + +## Methods + +### GetFile + +`func (o *FileSchemaTestClass) GetFile() File` + +GetFile returns the File field if non-nil, zero value otherwise. + +### GetFileOk + +`func (o *FileSchemaTestClass) GetFileOk() (File, bool)` + +GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFile + +`func (o *FileSchemaTestClass) HasFile() bool` + +HasFile returns a boolean if a field has been set. + +### SetFile + +`func (o *FileSchemaTestClass) SetFile(v File)` + +SetFile gets a reference to the given File and assigns it to the File field. + +### GetFiles + +`func (o *FileSchemaTestClass) GetFiles() []File` + +GetFiles returns the Files field if non-nil, zero value otherwise. + +### GetFilesOk + +`func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool)` + +GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFiles + +`func (o *FileSchemaTestClass) HasFiles() bool` + +HasFiles returns a boolean if a field has been set. + +### SetFiles + +`func (o *FileSchemaTestClass) SetFiles(v []File)` + +SetFiles gets a reference to the given []File and assigns it to the Files field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md index ee089a03cd79..6711f4f4fcc7 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FormatTest.md @@ -4,19 +4,347 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Integer** | **int32** | | [optional] -**Int32** | **int32** | | [optional] -**Int64** | **int64** | | [optional] -**Number** | **float32** | | -**Float** | **float32** | | [optional] -**Double** | **float64** | | [optional] -**String** | **string** | | [optional] -**Byte** | **string** | | -**Binary** | [***os.File**](*os.File.md) | | [optional] -**Date** | **string** | | -**DateTime** | [**time.Time**](time.Time.md) | | [optional] -**Uuid** | **string** | | [optional] -**Password** | **string** | | +**Integer** | Pointer to **int32** | | [optional] +**Int32** | Pointer to **int32** | | [optional] +**Int64** | Pointer to **int64** | | [optional] +**Number** | Pointer to **float32** | | +**Float** | Pointer to **float32** | | [optional] +**Double** | Pointer to **float64** | | [optional] +**String** | Pointer to **string** | | [optional] +**Byte** | Pointer to **string** | | +**Binary** | Pointer to [***os.File**](*os.File.md) | | [optional] +**Date** | Pointer to **string** | | +**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Uuid** | Pointer to **string** | | [optional] +**Password** | Pointer to **string** | | + +## Methods + +### GetInteger + +`func (o *FormatTest) GetInteger() int32` + +GetInteger returns the Integer field if non-nil, zero value otherwise. + +### GetIntegerOk + +`func (o *FormatTest) GetIntegerOk() (int32, bool)` + +GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInteger + +`func (o *FormatTest) HasInteger() bool` + +HasInteger returns a boolean if a field has been set. + +### SetInteger + +`func (o *FormatTest) SetInteger(v int32)` + +SetInteger gets a reference to the given int32 and assigns it to the Integer field. + +### GetInt32 + +`func (o *FormatTest) GetInt32() int32` + +GetInt32 returns the Int32 field if non-nil, zero value otherwise. + +### GetInt32Ok + +`func (o *FormatTest) GetInt32Ok() (int32, bool)` + +GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInt32 + +`func (o *FormatTest) HasInt32() bool` + +HasInt32 returns a boolean if a field has been set. + +### SetInt32 + +`func (o *FormatTest) SetInt32(v int32)` + +SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. + +### GetInt64 + +`func (o *FormatTest) GetInt64() int64` + +GetInt64 returns the Int64 field if non-nil, zero value otherwise. + +### GetInt64Ok + +`func (o *FormatTest) GetInt64Ok() (int64, bool)` + +GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInt64 + +`func (o *FormatTest) HasInt64() bool` + +HasInt64 returns a boolean if a field has been set. + +### SetInt64 + +`func (o *FormatTest) SetInt64(v int64)` + +SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. + +### GetNumber + +`func (o *FormatTest) GetNumber() float32` + +GetNumber returns the Number field if non-nil, zero value otherwise. + +### GetNumberOk + +`func (o *FormatTest) GetNumberOk() (float32, bool)` + +GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumber + +`func (o *FormatTest) HasNumber() bool` + +HasNumber returns a boolean if a field has been set. + +### SetNumber + +`func (o *FormatTest) SetNumber(v float32)` + +SetNumber gets a reference to the given float32 and assigns it to the Number field. + +### GetFloat + +`func (o *FormatTest) GetFloat() float32` + +GetFloat returns the Float field if non-nil, zero value otherwise. + +### GetFloatOk + +`func (o *FormatTest) GetFloatOk() (float32, bool)` + +GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFloat + +`func (o *FormatTest) HasFloat() bool` + +HasFloat returns a boolean if a field has been set. + +### SetFloat + +`func (o *FormatTest) SetFloat(v float32)` + +SetFloat gets a reference to the given float32 and assigns it to the Float field. + +### GetDouble + +`func (o *FormatTest) GetDouble() float64` + +GetDouble returns the Double field if non-nil, zero value otherwise. + +### GetDoubleOk + +`func (o *FormatTest) GetDoubleOk() (float64, bool)` + +GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDouble + +`func (o *FormatTest) HasDouble() bool` + +HasDouble returns a boolean if a field has been set. + +### SetDouble + +`func (o *FormatTest) SetDouble(v float64)` + +SetDouble gets a reference to the given float64 and assigns it to the Double field. + +### GetString + +`func (o *FormatTest) GetString() string` + +GetString returns the String field if non-nil, zero value otherwise. + +### GetStringOk + +`func (o *FormatTest) GetStringOk() (string, bool)` + +GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasString + +`func (o *FormatTest) HasString() bool` + +HasString returns a boolean if a field has been set. + +### SetString + +`func (o *FormatTest) SetString(v string)` + +SetString gets a reference to the given string and assigns it to the String field. + +### GetByte + +`func (o *FormatTest) GetByte() string` + +GetByte returns the Byte field if non-nil, zero value otherwise. + +### GetByteOk + +`func (o *FormatTest) GetByteOk() (string, bool)` + +GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasByte + +`func (o *FormatTest) HasByte() bool` + +HasByte returns a boolean if a field has been set. + +### SetByte + +`func (o *FormatTest) SetByte(v string)` + +SetByte gets a reference to the given string and assigns it to the Byte field. + +### GetBinary + +`func (o *FormatTest) GetBinary() *os.File` + +GetBinary returns the Binary field if non-nil, zero value otherwise. + +### GetBinaryOk + +`func (o *FormatTest) GetBinaryOk() (*os.File, bool)` + +GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBinary + +`func (o *FormatTest) HasBinary() bool` + +HasBinary returns a boolean if a field has been set. + +### SetBinary + +`func (o *FormatTest) SetBinary(v *os.File)` + +SetBinary gets a reference to the given *os.File and assigns it to the Binary field. + +### GetDate + +`func (o *FormatTest) GetDate() string` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *FormatTest) GetDateOk() (string, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDate + +`func (o *FormatTest) HasDate() bool` + +HasDate returns a boolean if a field has been set. + +### SetDate + +`func (o *FormatTest) SetDate(v string)` + +SetDate gets a reference to the given string and assigns it to the Date field. + +### GetDateTime + +`func (o *FormatTest) GetDateTime() time.Time` + +GetDateTime returns the DateTime field if non-nil, zero value otherwise. + +### GetDateTimeOk + +`func (o *FormatTest) GetDateTimeOk() (time.Time, bool)` + +GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDateTime + +`func (o *FormatTest) HasDateTime() bool` + +HasDateTime returns a boolean if a field has been set. + +### SetDateTime + +`func (o *FormatTest) SetDateTime(v time.Time)` + +SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. + +### GetUuid + +`func (o *FormatTest) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *FormatTest) GetUuidOk() (string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUuid + +`func (o *FormatTest) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuid + +`func (o *FormatTest) SetUuid(v string)` + +SetUuid gets a reference to the given string and assigns it to the Uuid field. + +### GetPassword + +`func (o *FormatTest) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *FormatTest) GetPasswordOk() (string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPassword + +`func (o *FormatTest) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### SetPassword + +`func (o *FormatTest) SetPassword(v string)` + +SetPassword gets a reference to the given string and assigns it to the Password field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md index 9e2f49573597..78f67041d33a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/HasOnlyReadOnly.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | Pointer to **string** | | [optional] +**Foo** | Pointer to **string** | | [optional] + +## Methods + +### GetBar + +`func (o *HasOnlyReadOnly) GetBar() string` + +GetBar returns the Bar field if non-nil, zero value otherwise. + +### GetBarOk + +`func (o *HasOnlyReadOnly) GetBarOk() (string, bool)` + +GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBar + +`func (o *HasOnlyReadOnly) HasBar() bool` + +HasBar returns a boolean if a field has been set. + +### SetBar + +`func (o *HasOnlyReadOnly) SetBar(v string)` + +SetBar gets a reference to the given string and assigns it to the Bar field. + +### GetFoo + +`func (o *HasOnlyReadOnly) GetFoo() string` + +GetFoo returns the Foo field if non-nil, zero value otherwise. + +### GetFooOk + +`func (o *HasOnlyReadOnly) GetFooOk() (string, bool)` + +GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFoo + +`func (o *HasOnlyReadOnly) HasFoo() bool` + +HasFoo returns a boolean if a field has been set. + +### SetFoo + +`func (o *HasOnlyReadOnly) SetFoo(v string)` + +SetFoo gets a reference to the given string and assigns it to the Foo field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/List.md b/samples/client/petstore/go/go-petstore-withXml/docs/List.md index bba2e5299066..ca8849936e72 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/List.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/List.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Var123List** | **string** | | [optional] +**Var123List** | Pointer to **string** | | [optional] + +## Methods + +### GetVar123List + +`func (o *List) GetVar123List() string` + +GetVar123List returns the Var123List field if non-nil, zero value otherwise. + +### GetVar123ListOk + +`func (o *List) GetVar123ListOk() (string, bool)` + +GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasVar123List + +`func (o *List) HasVar123List() bool` + +HasVar123List returns a boolean if a field has been set. + +### SetVar123List + +`func (o *List) SetVar123List(v string)` + +SetVar123List gets a reference to the given string and assigns it to the Var123List field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md index 6645e044658d..6c84c2e89c2a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md @@ -4,10 +4,113 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional] -**MapOfEnumString** | **map[string]string** | | [optional] -**DirectMap** | **map[string]bool** | | [optional] -**IndirectMap** | **map[string]bool** | | [optional] +**MapMapOfString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] +**MapOfEnumString** | Pointer to **map[string]string** | | [optional] +**DirectMap** | Pointer to **map[string]bool** | | [optional] +**IndirectMap** | Pointer to **map[string]bool** | | [optional] + +## Methods + +### GetMapMapOfString + +`func (o *MapTest) GetMapMapOfString() map[string]map[string]string` + +GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. + +### GetMapMapOfStringOk + +`func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool)` + +GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapMapOfString + +`func (o *MapTest) HasMapMapOfString() bool` + +HasMapMapOfString returns a boolean if a field has been set. + +### SetMapMapOfString + +`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)` + +SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field. + +### GetMapOfEnumString + +`func (o *MapTest) GetMapOfEnumString() map[string]string` + +GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. + +### GetMapOfEnumStringOk + +`func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool)` + +GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapOfEnumString + +`func (o *MapTest) HasMapOfEnumString() bool` + +HasMapOfEnumString returns a boolean if a field has been set. + +### SetMapOfEnumString + +`func (o *MapTest) SetMapOfEnumString(v map[string]string)` + +SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field. + +### GetDirectMap + +`func (o *MapTest) GetDirectMap() map[string]bool` + +GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. + +### GetDirectMapOk + +`func (o *MapTest) GetDirectMapOk() (map[string]bool, bool)` + +GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDirectMap + +`func (o *MapTest) HasDirectMap() bool` + +HasDirectMap returns a boolean if a field has been set. + +### SetDirectMap + +`func (o *MapTest) SetDirectMap(v map[string]bool)` + +SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field. + +### GetIndirectMap + +`func (o *MapTest) GetIndirectMap() map[string]bool` + +GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. + +### GetIndirectMapOk + +`func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool)` + +GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIndirectMap + +`func (o *MapTest) HasIndirectMap() bool` + +HasIndirectMap returns a boolean if a field has been set. + +### SetIndirectMap + +`func (o *MapTest) SetIndirectMap(v map[string]bool)` + +SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md index a2ce1068b279..49f7c8eb7687 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] -**DateTime** | [**time.Time**](time.Time.md) | | [optional] -**Map** | [**map[string]Animal**](Animal.md) | | [optional] +**Uuid** | Pointer to **string** | | [optional] +**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional] + +## Methods + +### GetUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` + +SetUuid gets a reference to the given string and assigns it to the Uuid field. + +### GetDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time` + +GetDateTime returns the DateTime field if non-nil, zero value otherwise. + +### GetDateTimeOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool)` + +GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool` + +HasDateTime returns a boolean if a field has been set. + +### SetDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)` + +SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. + +### GetMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal` + +GetMap returns the Map field if non-nil, zero value otherwise. + +### GetMapOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool)` + +GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool` + +HasMap returns a boolean if a field has been set. + +### SetMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)` + +SetMap gets a reference to the given map[string]Animal and assigns it to the Map field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md b/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md index 27b93bd1549f..d0bde7b7f7b3 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Model200Response.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **int32** | | [optional] -**Class** | **string** | | [optional] +**Name** | Pointer to **int32** | | [optional] +**Class** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *Model200Response) GetName() int32` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Model200Response) GetNameOk() (int32, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Model200Response) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Model200Response) SetName(v int32)` + +SetName gets a reference to the given int32 and assigns it to the Name field. + +### GetClass + +`func (o *Model200Response) GetClass() string` + +GetClass returns the Class field if non-nil, zero value otherwise. + +### GetClassOk + +`func (o *Model200Response) GetClassOk() (string, bool)` + +GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClass + +`func (o *Model200Response) HasClass() bool` + +HasClass returns a boolean if a field has been set. + +### SetClass + +`func (o *Model200Response) SetClass(v string)` + +SetClass gets a reference to the given string and assigns it to the Class field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Name.md b/samples/client/petstore/go/go-petstore-withXml/docs/Name.md index 453e54d98516..7cc6fd6a3a43 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Name.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Name.md @@ -4,10 +4,113 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **int32** | | -**SnakeCase** | **int32** | | [optional] -**Property** | **string** | | [optional] -**Var123Number** | **int32** | | [optional] +**Name** | Pointer to **int32** | | +**SnakeCase** | Pointer to **int32** | | [optional] +**Property** | Pointer to **string** | | [optional] +**Var123Number** | Pointer to **int32** | | [optional] + +## Methods + +### GetName + +`func (o *Name) GetName() int32` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Name) GetNameOk() (int32, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Name) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Name) SetName(v int32)` + +SetName gets a reference to the given int32 and assigns it to the Name field. + +### GetSnakeCase + +`func (o *Name) GetSnakeCase() int32` + +GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. + +### GetSnakeCaseOk + +`func (o *Name) GetSnakeCaseOk() (int32, bool)` + +GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSnakeCase + +`func (o *Name) HasSnakeCase() bool` + +HasSnakeCase returns a boolean if a field has been set. + +### SetSnakeCase + +`func (o *Name) SetSnakeCase(v int32)` + +SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field. + +### GetProperty + +`func (o *Name) GetProperty() string` + +GetProperty returns the Property field if non-nil, zero value otherwise. + +### GetPropertyOk + +`func (o *Name) GetPropertyOk() (string, bool)` + +GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProperty + +`func (o *Name) HasProperty() bool` + +HasProperty returns a boolean if a field has been set. + +### SetProperty + +`func (o *Name) SetProperty(v string)` + +SetProperty gets a reference to the given string and assigns it to the Property field. + +### GetVar123Number + +`func (o *Name) GetVar123Number() int32` + +GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. + +### GetVar123NumberOk + +`func (o *Name) GetVar123NumberOk() (int32, bool)` + +GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasVar123Number + +`func (o *Name) HasVar123Number() bool` + +HasVar123Number returns a boolean if a field has been set. + +### SetVar123Number + +`func (o *Name) SetVar123Number(v int32)` + +SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md b/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md index 604cf37eeded..c8dcac264c2d 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/NumberOnly.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**JustNumber** | **float32** | | [optional] +**JustNumber** | Pointer to **float32** | | [optional] + +## Methods + +### GetJustNumber + +`func (o *NumberOnly) GetJustNumber() float32` + +GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. + +### GetJustNumberOk + +`func (o *NumberOnly) GetJustNumberOk() (float32, bool)` + +GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasJustNumber + +`func (o *NumberOnly) HasJustNumber() bool` + +HasJustNumber returns a boolean if a field has been set. + +### SetJustNumber + +`func (o *NumberOnly) SetJustNumber(v float32)` + +SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Order.md b/samples/client/petstore/go/go-petstore-withXml/docs/Order.md index eeef0971005e..8aa8bbd1ee54 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Order.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Order.md @@ -4,12 +4,165 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**PetId** | **int64** | | [optional] -**Quantity** | **int32** | | [optional] -**ShipDate** | [**time.Time**](time.Time.md) | | [optional] -**Status** | **string** | Order Status | [optional] -**Complete** | **bool** | | [optional] [default to false] +**Id** | Pointer to **int64** | | [optional] +**PetId** | Pointer to **int64** | | [optional] +**Quantity** | Pointer to **int32** | | [optional] +**ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Status** | Pointer to **string** | Order Status | [optional] +**Complete** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### GetId + +`func (o *Order) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Order) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Order) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Order) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetPetId + +`func (o *Order) GetPetId() int64` + +GetPetId returns the PetId field if non-nil, zero value otherwise. + +### GetPetIdOk + +`func (o *Order) GetPetIdOk() (int64, bool)` + +GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPetId + +`func (o *Order) HasPetId() bool` + +HasPetId returns a boolean if a field has been set. + +### SetPetId + +`func (o *Order) SetPetId(v int64)` + +SetPetId gets a reference to the given int64 and assigns it to the PetId field. + +### GetQuantity + +`func (o *Order) GetQuantity() int32` + +GetQuantity returns the Quantity field if non-nil, zero value otherwise. + +### GetQuantityOk + +`func (o *Order) GetQuantityOk() (int32, bool)` + +GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasQuantity + +`func (o *Order) HasQuantity() bool` + +HasQuantity returns a boolean if a field has been set. + +### SetQuantity + +`func (o *Order) SetQuantity(v int32)` + +SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. + +### GetShipDate + +`func (o *Order) GetShipDate() time.Time` + +GetShipDate returns the ShipDate field if non-nil, zero value otherwise. + +### GetShipDateOk + +`func (o *Order) GetShipDateOk() (time.Time, bool)` + +GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasShipDate + +`func (o *Order) HasShipDate() bool` + +HasShipDate returns a boolean if a field has been set. + +### SetShipDate + +`func (o *Order) SetShipDate(v time.Time)` + +SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field. + +### GetStatus + +`func (o *Order) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Order) GetStatusOk() (string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *Order) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *Order) SetStatus(v string)` + +SetStatus gets a reference to the given string and assigns it to the Status field. + +### GetComplete + +`func (o *Order) GetComplete() bool` + +GetComplete returns the Complete field if non-nil, zero value otherwise. + +### GetCompleteOk + +`func (o *Order) GetCompleteOk() (bool, bool)` + +GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasComplete + +`func (o *Order) HasComplete() bool` + +HasComplete returns a boolean if a field has been set. + +### SetComplete + +`func (o *Order) SetComplete(v bool)` + +SetComplete gets a reference to the given bool and assigns it to the Complete field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md b/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md index df9bce1bd904..f89080222827 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/OuterComposite.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MyNumber** | **float32** | | [optional] -**MyString** | **string** | | [optional] -**MyBoolean** | **bool** | | [optional] +**MyNumber** | Pointer to **float32** | | [optional] +**MyString** | Pointer to **string** | | [optional] +**MyBoolean** | Pointer to **bool** | | [optional] + +## Methods + +### GetMyNumber + +`func (o *OuterComposite) GetMyNumber() float32` + +GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. + +### GetMyNumberOk + +`func (o *OuterComposite) GetMyNumberOk() (float32, bool)` + +GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyNumber + +`func (o *OuterComposite) HasMyNumber() bool` + +HasMyNumber returns a boolean if a field has been set. + +### SetMyNumber + +`func (o *OuterComposite) SetMyNumber(v float32)` + +SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field. + +### GetMyString + +`func (o *OuterComposite) GetMyString() string` + +GetMyString returns the MyString field if non-nil, zero value otherwise. + +### GetMyStringOk + +`func (o *OuterComposite) GetMyStringOk() (string, bool)` + +GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyString + +`func (o *OuterComposite) HasMyString() bool` + +HasMyString returns a boolean if a field has been set. + +### SetMyString + +`func (o *OuterComposite) SetMyString(v string)` + +SetMyString gets a reference to the given string and assigns it to the MyString field. + +### GetMyBoolean + +`func (o *OuterComposite) GetMyBoolean() bool` + +GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. + +### GetMyBooleanOk + +`func (o *OuterComposite) GetMyBooleanOk() (bool, bool)` + +GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyBoolean + +`func (o *OuterComposite) HasMyBoolean() bool` + +HasMyBoolean returns a boolean if a field has been set. + +### SetMyBoolean + +`func (o *OuterComposite) SetMyBoolean(v bool)` + +SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md b/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md index c97466159c56..13bed2d17fd8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/OuterEnum.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md b/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md index c48104c63971..dba9589f9d77 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Pet.md @@ -4,12 +4,165 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Name** | **string** | | -**PhotoUrls** | **[]string** | | -**Tags** | [**[]Tag**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [optional] +**Id** | Pointer to **int64** | | [optional] +**Category** | Pointer to [**Category**](Category.md) | | [optional] +**Name** | Pointer to **string** | | +**PhotoUrls** | Pointer to **[]string** | | +**Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional] +**Status** | Pointer to **string** | pet status in the store | [optional] + +## Methods + +### GetId + +`func (o *Pet) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Pet) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Pet) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Pet) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetCategory + +`func (o *Pet) GetCategory() Category` + +GetCategory returns the Category field if non-nil, zero value otherwise. + +### GetCategoryOk + +`func (o *Pet) GetCategoryOk() (Category, bool)` + +GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCategory + +`func (o *Pet) HasCategory() bool` + +HasCategory returns a boolean if a field has been set. + +### SetCategory + +`func (o *Pet) SetCategory(v Category)` + +SetCategory gets a reference to the given Category and assigns it to the Category field. + +### GetName + +`func (o *Pet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Pet) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Pet) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Pet) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetPhotoUrls + +`func (o *Pet) GetPhotoUrls() []string` + +GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. + +### GetPhotoUrlsOk + +`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)` + +GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPhotoUrls + +`func (o *Pet) HasPhotoUrls() bool` + +HasPhotoUrls returns a boolean if a field has been set. + +### SetPhotoUrls + +`func (o *Pet) SetPhotoUrls(v []string)` + +SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. + +### GetTags + +`func (o *Pet) GetTags() []Tag` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Pet) GetTagsOk() ([]Tag, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTags + +`func (o *Pet) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### SetTags + +`func (o *Pet) SetTags(v []Tag)` + +SetTags gets a reference to the given []Tag and assigns it to the Tags field. + +### GetStatus + +`func (o *Pet) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Pet) GetStatusOk() (string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *Pet) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *Pet) SetStatus(v string)` + +SetStatus gets a reference to the given string and assigns it to the Status field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md b/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md index 3fee799f2951..552f0170bd85 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/ReadOnlyFirst.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Baz** | **string** | | [optional] +**Bar** | Pointer to **string** | | [optional] +**Baz** | Pointer to **string** | | [optional] + +## Methods + +### GetBar + +`func (o *ReadOnlyFirst) GetBar() string` + +GetBar returns the Bar field if non-nil, zero value otherwise. + +### GetBarOk + +`func (o *ReadOnlyFirst) GetBarOk() (string, bool)` + +GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBar + +`func (o *ReadOnlyFirst) HasBar() bool` + +HasBar returns a boolean if a field has been set. + +### SetBar + +`func (o *ReadOnlyFirst) SetBar(v string)` + +SetBar gets a reference to the given string and assigns it to the Bar field. + +### GetBaz + +`func (o *ReadOnlyFirst) GetBaz() string` + +GetBaz returns the Baz field if non-nil, zero value otherwise. + +### GetBazOk + +`func (o *ReadOnlyFirst) GetBazOk() (string, bool)` + +GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBaz + +`func (o *ReadOnlyFirst) HasBaz() bool` + +HasBaz returns a boolean if a field has been set. + +### SetBaz + +`func (o *ReadOnlyFirst) SetBaz(v string)` + +SetBaz gets a reference to the given string and assigns it to the Baz field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Return.md b/samples/client/petstore/go/go-petstore-withXml/docs/Return.md index 11be0b27c503..1facabb6bbf3 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Return.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Return.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Return** | **int32** | | [optional] +**Return** | Pointer to **int32** | | [optional] + +## Methods + +### GetReturn + +`func (o *Return) GetReturn() int32` + +GetReturn returns the Return field if non-nil, zero value otherwise. + +### GetReturnOk + +`func (o *Return) GetReturnOk() (int32, bool)` + +GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasReturn + +`func (o *Return) HasReturn() bool` + +HasReturn returns a boolean if a field has been set. + +### SetReturn + +`func (o *Return) SetReturn(v int32)` + +SetReturn gets a reference to the given int32 and assigns it to the Return field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md b/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md index 96d7a28a409a..34d8d8d89c72 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/SpecialModelName.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SpecialPropertyName** | **int64** | | [optional] +**SpecialPropertyName** | Pointer to **int64** | | [optional] + +## Methods + +### GetSpecialPropertyName + +`func (o *SpecialModelName) GetSpecialPropertyName() int64` + +GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. + +### GetSpecialPropertyNameOk + +`func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool)` + +GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSpecialPropertyName + +`func (o *SpecialModelName) HasSpecialPropertyName() bool` + +HasSpecialPropertyName returns a boolean if a field has been set. + +### SetSpecialPropertyName + +`func (o *SpecialModelName) SetSpecialPropertyName(v int64)` + +SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md b/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md index d6b3cc117b52..bf868298a5e7 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/Tag.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Name** | **string** | | [optional] +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetId + +`func (o *Tag) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Tag) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Tag) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Tag) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetName + +`func (o *Tag) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Tag) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Tag) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Tag) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md index 1b9f077c303b..85097ef9fbe5 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderDefault.md @@ -4,11 +4,139 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**StringItem** | **string** | | [default to what] -**NumberItem** | **float32** | | -**IntegerItem** | **int32** | | -**BoolItem** | **bool** | | [default to true] -**ArrayItem** | **[]int32** | | +**StringItem** | Pointer to **string** | | [default to what] +**NumberItem** | Pointer to **float32** | | +**IntegerItem** | Pointer to **int32** | | +**BoolItem** | Pointer to **bool** | | [default to true] +**ArrayItem** | Pointer to **[]int32** | | + +## Methods + +### GetStringItem + +`func (o *TypeHolderDefault) GetStringItem() string` + +GetStringItem returns the StringItem field if non-nil, zero value otherwise. + +### GetStringItemOk + +`func (o *TypeHolderDefault) GetStringItemOk() (string, bool)` + +GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStringItem + +`func (o *TypeHolderDefault) HasStringItem() bool` + +HasStringItem returns a boolean if a field has been set. + +### SetStringItem + +`func (o *TypeHolderDefault) SetStringItem(v string)` + +SetStringItem gets a reference to the given string and assigns it to the StringItem field. + +### GetNumberItem + +`func (o *TypeHolderDefault) GetNumberItem() float32` + +GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. + +### GetNumberItemOk + +`func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool)` + +GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumberItem + +`func (o *TypeHolderDefault) HasNumberItem() bool` + +HasNumberItem returns a boolean if a field has been set. + +### SetNumberItem + +`func (o *TypeHolderDefault) SetNumberItem(v float32)` + +SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. + +### GetIntegerItem + +`func (o *TypeHolderDefault) GetIntegerItem() int32` + +GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. + +### GetIntegerItemOk + +`func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool)` + +GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIntegerItem + +`func (o *TypeHolderDefault) HasIntegerItem() bool` + +HasIntegerItem returns a boolean if a field has been set. + +### SetIntegerItem + +`func (o *TypeHolderDefault) SetIntegerItem(v int32)` + +SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. + +### GetBoolItem + +`func (o *TypeHolderDefault) GetBoolItem() bool` + +GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. + +### GetBoolItemOk + +`func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool)` + +GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBoolItem + +`func (o *TypeHolderDefault) HasBoolItem() bool` + +HasBoolItem returns a boolean if a field has been set. + +### SetBoolItem + +`func (o *TypeHolderDefault) SetBoolItem(v bool)` + +SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. + +### GetArrayItem + +`func (o *TypeHolderDefault) GetArrayItem() []int32` + +GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. + +### GetArrayItemOk + +`func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool)` + +GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayItem + +`func (o *TypeHolderDefault) HasArrayItem() bool` + +HasArrayItem returns a boolean if a field has been set. + +### SetArrayItem + +`func (o *TypeHolderDefault) SetArrayItem(v []int32)` + +SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md index abe85f9799d1..f9a276c529f1 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/TypeHolderExample.md @@ -4,11 +4,139 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**StringItem** | **string** | | -**NumberItem** | **float32** | | -**IntegerItem** | **int32** | | -**BoolItem** | **bool** | | -**ArrayItem** | **[]int32** | | +**StringItem** | Pointer to **string** | | +**NumberItem** | Pointer to **float32** | | +**IntegerItem** | Pointer to **int32** | | +**BoolItem** | Pointer to **bool** | | +**ArrayItem** | Pointer to **[]int32** | | + +## Methods + +### GetStringItem + +`func (o *TypeHolderExample) GetStringItem() string` + +GetStringItem returns the StringItem field if non-nil, zero value otherwise. + +### GetStringItemOk + +`func (o *TypeHolderExample) GetStringItemOk() (string, bool)` + +GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStringItem + +`func (o *TypeHolderExample) HasStringItem() bool` + +HasStringItem returns a boolean if a field has been set. + +### SetStringItem + +`func (o *TypeHolderExample) SetStringItem(v string)` + +SetStringItem gets a reference to the given string and assigns it to the StringItem field. + +### GetNumberItem + +`func (o *TypeHolderExample) GetNumberItem() float32` + +GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. + +### GetNumberItemOk + +`func (o *TypeHolderExample) GetNumberItemOk() (float32, bool)` + +GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumberItem + +`func (o *TypeHolderExample) HasNumberItem() bool` + +HasNumberItem returns a boolean if a field has been set. + +### SetNumberItem + +`func (o *TypeHolderExample) SetNumberItem(v float32)` + +SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. + +### GetIntegerItem + +`func (o *TypeHolderExample) GetIntegerItem() int32` + +GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. + +### GetIntegerItemOk + +`func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool)` + +GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIntegerItem + +`func (o *TypeHolderExample) HasIntegerItem() bool` + +HasIntegerItem returns a boolean if a field has been set. + +### SetIntegerItem + +`func (o *TypeHolderExample) SetIntegerItem(v int32)` + +SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. + +### GetBoolItem + +`func (o *TypeHolderExample) GetBoolItem() bool` + +GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. + +### GetBoolItemOk + +`func (o *TypeHolderExample) GetBoolItemOk() (bool, bool)` + +GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBoolItem + +`func (o *TypeHolderExample) HasBoolItem() bool` + +HasBoolItem returns a boolean if a field has been set. + +### SetBoolItem + +`func (o *TypeHolderExample) SetBoolItem(v bool)` + +SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. + +### GetArrayItem + +`func (o *TypeHolderExample) GetArrayItem() []int32` + +GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. + +### GetArrayItemOk + +`func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool)` + +GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayItem + +`func (o *TypeHolderExample) HasArrayItem() bool` + +HasArrayItem returns a boolean if a field has been set. + +### SetArrayItem + +`func (o *TypeHolderExample) SetArrayItem(v []int32)` + +SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/User.md b/samples/client/petstore/go/go-petstore-withXml/docs/User.md index 7675d7ff701b..8b93a65d8ab7 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/User.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/User.md @@ -4,14 +4,217 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] -**Email** | **string** | | [optional] -**Password** | **string** | | [optional] -**Phone** | **string** | | [optional] -**UserStatus** | **int32** | User Status | [optional] +**Id** | Pointer to **int64** | | [optional] +**Username** | Pointer to **string** | | [optional] +**FirstName** | Pointer to **string** | | [optional] +**LastName** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**Password** | Pointer to **string** | | [optional] +**Phone** | Pointer to **string** | | [optional] +**UserStatus** | Pointer to **int32** | User Status | [optional] + +## Methods + +### GetId + +`func (o *User) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *User) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *User) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *User) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetUsername + +`func (o *User) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *User) GetUsernameOk() (string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUsername + +`func (o *User) HasUsername() bool` + +HasUsername returns a boolean if a field has been set. + +### SetUsername + +`func (o *User) SetUsername(v string)` + +SetUsername gets a reference to the given string and assigns it to the Username field. + +### GetFirstName + +`func (o *User) GetFirstName() string` + +GetFirstName returns the FirstName field if non-nil, zero value otherwise. + +### GetFirstNameOk + +`func (o *User) GetFirstNameOk() (string, bool)` + +GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFirstName + +`func (o *User) HasFirstName() bool` + +HasFirstName returns a boolean if a field has been set. + +### SetFirstName + +`func (o *User) SetFirstName(v string)` + +SetFirstName gets a reference to the given string and assigns it to the FirstName field. + +### GetLastName + +`func (o *User) GetLastName() string` + +GetLastName returns the LastName field if non-nil, zero value otherwise. + +### GetLastNameOk + +`func (o *User) GetLastNameOk() (string, bool)` + +GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasLastName + +`func (o *User) HasLastName() bool` + +HasLastName returns a boolean if a field has been set. + +### SetLastName + +`func (o *User) SetLastName(v string)` + +SetLastName gets a reference to the given string and assigns it to the LastName field. + +### GetEmail + +`func (o *User) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *User) GetEmailOk() (string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEmail + +`func (o *User) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmail + +`func (o *User) SetEmail(v string)` + +SetEmail gets a reference to the given string and assigns it to the Email field. + +### GetPassword + +`func (o *User) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *User) GetPasswordOk() (string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPassword + +`func (o *User) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### SetPassword + +`func (o *User) SetPassword(v string)` + +SetPassword gets a reference to the given string and assigns it to the Password field. + +### GetPhone + +`func (o *User) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *User) GetPhoneOk() (string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPhone + +`func (o *User) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### SetPhone + +`func (o *User) SetPhone(v string)` + +SetPhone gets a reference to the given string and assigns it to the Phone field. + +### GetUserStatus + +`func (o *User) GetUserStatus() int32` + +GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. + +### GetUserStatusOk + +`func (o *User) GetUserStatusOk() (int32, bool)` + +GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUserStatus + +`func (o *User) HasUserStatus() bool` + +HasUserStatus returns a boolean if a field has been set. + +### SetUserStatus + +`func (o *User) SetUserStatus(v int32)` + +SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md b/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md index 8a9c2dc0b504..99c95015d5ff 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/XmlItem.md @@ -4,35 +4,763 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AttributeString** | **string** | | [optional] -**AttributeNumber** | **float32** | | [optional] -**AttributeInteger** | **int32** | | [optional] -**AttributeBoolean** | **bool** | | [optional] -**WrappedArray** | **[]int32** | | [optional] -**NameString** | **string** | | [optional] -**NameNumber** | **float32** | | [optional] -**NameInteger** | **int32** | | [optional] -**NameBoolean** | **bool** | | [optional] -**NameArray** | **[]int32** | | [optional] -**NameWrappedArray** | **[]int32** | | [optional] -**PrefixString** | **string** | | [optional] -**PrefixNumber** | **float32** | | [optional] -**PrefixInteger** | **int32** | | [optional] -**PrefixBoolean** | **bool** | | [optional] -**PrefixArray** | **[]int32** | | [optional] -**PrefixWrappedArray** | **[]int32** | | [optional] -**NamespaceString** | **string** | | [optional] -**NamespaceNumber** | **float32** | | [optional] -**NamespaceInteger** | **int32** | | [optional] -**NamespaceBoolean** | **bool** | | [optional] -**NamespaceArray** | **[]int32** | | [optional] -**NamespaceWrappedArray** | **[]int32** | | [optional] -**PrefixNsString** | **string** | | [optional] -**PrefixNsNumber** | **float32** | | [optional] -**PrefixNsInteger** | **int32** | | [optional] -**PrefixNsBoolean** | **bool** | | [optional] -**PrefixNsArray** | **[]int32** | | [optional] -**PrefixNsWrappedArray** | **[]int32** | | [optional] +**AttributeString** | Pointer to **string** | | [optional] +**AttributeNumber** | Pointer to **float32** | | [optional] +**AttributeInteger** | Pointer to **int32** | | [optional] +**AttributeBoolean** | Pointer to **bool** | | [optional] +**WrappedArray** | Pointer to **[]int32** | | [optional] +**NameString** | Pointer to **string** | | [optional] +**NameNumber** | Pointer to **float32** | | [optional] +**NameInteger** | Pointer to **int32** | | [optional] +**NameBoolean** | Pointer to **bool** | | [optional] +**NameArray** | Pointer to **[]int32** | | [optional] +**NameWrappedArray** | Pointer to **[]int32** | | [optional] +**PrefixString** | Pointer to **string** | | [optional] +**PrefixNumber** | Pointer to **float32** | | [optional] +**PrefixInteger** | Pointer to **int32** | | [optional] +**PrefixBoolean** | Pointer to **bool** | | [optional] +**PrefixArray** | Pointer to **[]int32** | | [optional] +**PrefixWrappedArray** | Pointer to **[]int32** | | [optional] +**NamespaceString** | Pointer to **string** | | [optional] +**NamespaceNumber** | Pointer to **float32** | | [optional] +**NamespaceInteger** | Pointer to **int32** | | [optional] +**NamespaceBoolean** | Pointer to **bool** | | [optional] +**NamespaceArray** | Pointer to **[]int32** | | [optional] +**NamespaceWrappedArray** | Pointer to **[]int32** | | [optional] +**PrefixNsString** | Pointer to **string** | | [optional] +**PrefixNsNumber** | Pointer to **float32** | | [optional] +**PrefixNsInteger** | Pointer to **int32** | | [optional] +**PrefixNsBoolean** | Pointer to **bool** | | [optional] +**PrefixNsArray** | Pointer to **[]int32** | | [optional] +**PrefixNsWrappedArray** | Pointer to **[]int32** | | [optional] + +## Methods + +### GetAttributeString + +`func (o *XmlItem) GetAttributeString() string` + +GetAttributeString returns the AttributeString field if non-nil, zero value otherwise. + +### GetAttributeStringOk + +`func (o *XmlItem) GetAttributeStringOk() (string, bool)` + +GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAttributeString + +`func (o *XmlItem) HasAttributeString() bool` + +HasAttributeString returns a boolean if a field has been set. + +### SetAttributeString + +`func (o *XmlItem) SetAttributeString(v string)` + +SetAttributeString gets a reference to the given string and assigns it to the AttributeString field. + +### GetAttributeNumber + +`func (o *XmlItem) GetAttributeNumber() float32` + +GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise. + +### GetAttributeNumberOk + +`func (o *XmlItem) GetAttributeNumberOk() (float32, bool)` + +GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAttributeNumber + +`func (o *XmlItem) HasAttributeNumber() bool` + +HasAttributeNumber returns a boolean if a field has been set. + +### SetAttributeNumber + +`func (o *XmlItem) SetAttributeNumber(v float32)` + +SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field. + +### GetAttributeInteger + +`func (o *XmlItem) GetAttributeInteger() int32` + +GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise. + +### GetAttributeIntegerOk + +`func (o *XmlItem) GetAttributeIntegerOk() (int32, bool)` + +GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAttributeInteger + +`func (o *XmlItem) HasAttributeInteger() bool` + +HasAttributeInteger returns a boolean if a field has been set. + +### SetAttributeInteger + +`func (o *XmlItem) SetAttributeInteger(v int32)` + +SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field. + +### GetAttributeBoolean + +`func (o *XmlItem) GetAttributeBoolean() bool` + +GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise. + +### GetAttributeBooleanOk + +`func (o *XmlItem) GetAttributeBooleanOk() (bool, bool)` + +GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAttributeBoolean + +`func (o *XmlItem) HasAttributeBoolean() bool` + +HasAttributeBoolean returns a boolean if a field has been set. + +### SetAttributeBoolean + +`func (o *XmlItem) SetAttributeBoolean(v bool)` + +SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field. + +### GetWrappedArray + +`func (o *XmlItem) GetWrappedArray() []int32` + +GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise. + +### GetWrappedArrayOk + +`func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool)` + +GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasWrappedArray + +`func (o *XmlItem) HasWrappedArray() bool` + +HasWrappedArray returns a boolean if a field has been set. + +### SetWrappedArray + +`func (o *XmlItem) SetWrappedArray(v []int32)` + +SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field. + +### GetNameString + +`func (o *XmlItem) GetNameString() string` + +GetNameString returns the NameString field if non-nil, zero value otherwise. + +### GetNameStringOk + +`func (o *XmlItem) GetNameStringOk() (string, bool)` + +GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameString + +`func (o *XmlItem) HasNameString() bool` + +HasNameString returns a boolean if a field has been set. + +### SetNameString + +`func (o *XmlItem) SetNameString(v string)` + +SetNameString gets a reference to the given string and assigns it to the NameString field. + +### GetNameNumber + +`func (o *XmlItem) GetNameNumber() float32` + +GetNameNumber returns the NameNumber field if non-nil, zero value otherwise. + +### GetNameNumberOk + +`func (o *XmlItem) GetNameNumberOk() (float32, bool)` + +GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameNumber + +`func (o *XmlItem) HasNameNumber() bool` + +HasNameNumber returns a boolean if a field has been set. + +### SetNameNumber + +`func (o *XmlItem) SetNameNumber(v float32)` + +SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field. + +### GetNameInteger + +`func (o *XmlItem) GetNameInteger() int32` + +GetNameInteger returns the NameInteger field if non-nil, zero value otherwise. + +### GetNameIntegerOk + +`func (o *XmlItem) GetNameIntegerOk() (int32, bool)` + +GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameInteger + +`func (o *XmlItem) HasNameInteger() bool` + +HasNameInteger returns a boolean if a field has been set. + +### SetNameInteger + +`func (o *XmlItem) SetNameInteger(v int32)` + +SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field. + +### GetNameBoolean + +`func (o *XmlItem) GetNameBoolean() bool` + +GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise. + +### GetNameBooleanOk + +`func (o *XmlItem) GetNameBooleanOk() (bool, bool)` + +GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameBoolean + +`func (o *XmlItem) HasNameBoolean() bool` + +HasNameBoolean returns a boolean if a field has been set. + +### SetNameBoolean + +`func (o *XmlItem) SetNameBoolean(v bool)` + +SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field. + +### GetNameArray + +`func (o *XmlItem) GetNameArray() []int32` + +GetNameArray returns the NameArray field if non-nil, zero value otherwise. + +### GetNameArrayOk + +`func (o *XmlItem) GetNameArrayOk() ([]int32, bool)` + +GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameArray + +`func (o *XmlItem) HasNameArray() bool` + +HasNameArray returns a boolean if a field has been set. + +### SetNameArray + +`func (o *XmlItem) SetNameArray(v []int32)` + +SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field. + +### GetNameWrappedArray + +`func (o *XmlItem) GetNameWrappedArray() []int32` + +GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise. + +### GetNameWrappedArrayOk + +`func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool)` + +GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameWrappedArray + +`func (o *XmlItem) HasNameWrappedArray() bool` + +HasNameWrappedArray returns a boolean if a field has been set. + +### SetNameWrappedArray + +`func (o *XmlItem) SetNameWrappedArray(v []int32)` + +SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field. + +### GetPrefixString + +`func (o *XmlItem) GetPrefixString() string` + +GetPrefixString returns the PrefixString field if non-nil, zero value otherwise. + +### GetPrefixStringOk + +`func (o *XmlItem) GetPrefixStringOk() (string, bool)` + +GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixString + +`func (o *XmlItem) HasPrefixString() bool` + +HasPrefixString returns a boolean if a field has been set. + +### SetPrefixString + +`func (o *XmlItem) SetPrefixString(v string)` + +SetPrefixString gets a reference to the given string and assigns it to the PrefixString field. + +### GetPrefixNumber + +`func (o *XmlItem) GetPrefixNumber() float32` + +GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise. + +### GetPrefixNumberOk + +`func (o *XmlItem) GetPrefixNumberOk() (float32, bool)` + +GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNumber + +`func (o *XmlItem) HasPrefixNumber() bool` + +HasPrefixNumber returns a boolean if a field has been set. + +### SetPrefixNumber + +`func (o *XmlItem) SetPrefixNumber(v float32)` + +SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field. + +### GetPrefixInteger + +`func (o *XmlItem) GetPrefixInteger() int32` + +GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise. + +### GetPrefixIntegerOk + +`func (o *XmlItem) GetPrefixIntegerOk() (int32, bool)` + +GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixInteger + +`func (o *XmlItem) HasPrefixInteger() bool` + +HasPrefixInteger returns a boolean if a field has been set. + +### SetPrefixInteger + +`func (o *XmlItem) SetPrefixInteger(v int32)` + +SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field. + +### GetPrefixBoolean + +`func (o *XmlItem) GetPrefixBoolean() bool` + +GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise. + +### GetPrefixBooleanOk + +`func (o *XmlItem) GetPrefixBooleanOk() (bool, bool)` + +GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixBoolean + +`func (o *XmlItem) HasPrefixBoolean() bool` + +HasPrefixBoolean returns a boolean if a field has been set. + +### SetPrefixBoolean + +`func (o *XmlItem) SetPrefixBoolean(v bool)` + +SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field. + +### GetPrefixArray + +`func (o *XmlItem) GetPrefixArray() []int32` + +GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise. + +### GetPrefixArrayOk + +`func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool)` + +GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixArray + +`func (o *XmlItem) HasPrefixArray() bool` + +HasPrefixArray returns a boolean if a field has been set. + +### SetPrefixArray + +`func (o *XmlItem) SetPrefixArray(v []int32)` + +SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field. + +### GetPrefixWrappedArray + +`func (o *XmlItem) GetPrefixWrappedArray() []int32` + +GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise. + +### GetPrefixWrappedArrayOk + +`func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool)` + +GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixWrappedArray + +`func (o *XmlItem) HasPrefixWrappedArray() bool` + +HasPrefixWrappedArray returns a boolean if a field has been set. + +### SetPrefixWrappedArray + +`func (o *XmlItem) SetPrefixWrappedArray(v []int32)` + +SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field. + +### GetNamespaceString + +`func (o *XmlItem) GetNamespaceString() string` + +GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise. + +### GetNamespaceStringOk + +`func (o *XmlItem) GetNamespaceStringOk() (string, bool)` + +GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceString + +`func (o *XmlItem) HasNamespaceString() bool` + +HasNamespaceString returns a boolean if a field has been set. + +### SetNamespaceString + +`func (o *XmlItem) SetNamespaceString(v string)` + +SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field. + +### GetNamespaceNumber + +`func (o *XmlItem) GetNamespaceNumber() float32` + +GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise. + +### GetNamespaceNumberOk + +`func (o *XmlItem) GetNamespaceNumberOk() (float32, bool)` + +GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceNumber + +`func (o *XmlItem) HasNamespaceNumber() bool` + +HasNamespaceNumber returns a boolean if a field has been set. + +### SetNamespaceNumber + +`func (o *XmlItem) SetNamespaceNumber(v float32)` + +SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field. + +### GetNamespaceInteger + +`func (o *XmlItem) GetNamespaceInteger() int32` + +GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise. + +### GetNamespaceIntegerOk + +`func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool)` + +GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceInteger + +`func (o *XmlItem) HasNamespaceInteger() bool` + +HasNamespaceInteger returns a boolean if a field has been set. + +### SetNamespaceInteger + +`func (o *XmlItem) SetNamespaceInteger(v int32)` + +SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field. + +### GetNamespaceBoolean + +`func (o *XmlItem) GetNamespaceBoolean() bool` + +GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise. + +### GetNamespaceBooleanOk + +`func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool)` + +GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceBoolean + +`func (o *XmlItem) HasNamespaceBoolean() bool` + +HasNamespaceBoolean returns a boolean if a field has been set. + +### SetNamespaceBoolean + +`func (o *XmlItem) SetNamespaceBoolean(v bool)` + +SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field. + +### GetNamespaceArray + +`func (o *XmlItem) GetNamespaceArray() []int32` + +GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise. + +### GetNamespaceArrayOk + +`func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool)` + +GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceArray + +`func (o *XmlItem) HasNamespaceArray() bool` + +HasNamespaceArray returns a boolean if a field has been set. + +### SetNamespaceArray + +`func (o *XmlItem) SetNamespaceArray(v []int32)` + +SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field. + +### GetNamespaceWrappedArray + +`func (o *XmlItem) GetNamespaceWrappedArray() []int32` + +GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise. + +### GetNamespaceWrappedArrayOk + +`func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool)` + +GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceWrappedArray + +`func (o *XmlItem) HasNamespaceWrappedArray() bool` + +HasNamespaceWrappedArray returns a boolean if a field has been set. + +### SetNamespaceWrappedArray + +`func (o *XmlItem) SetNamespaceWrappedArray(v []int32)` + +SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field. + +### GetPrefixNsString + +`func (o *XmlItem) GetPrefixNsString() string` + +GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise. + +### GetPrefixNsStringOk + +`func (o *XmlItem) GetPrefixNsStringOk() (string, bool)` + +GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsString + +`func (o *XmlItem) HasPrefixNsString() bool` + +HasPrefixNsString returns a boolean if a field has been set. + +### SetPrefixNsString + +`func (o *XmlItem) SetPrefixNsString(v string)` + +SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field. + +### GetPrefixNsNumber + +`func (o *XmlItem) GetPrefixNsNumber() float32` + +GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise. + +### GetPrefixNsNumberOk + +`func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool)` + +GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsNumber + +`func (o *XmlItem) HasPrefixNsNumber() bool` + +HasPrefixNsNumber returns a boolean if a field has been set. + +### SetPrefixNsNumber + +`func (o *XmlItem) SetPrefixNsNumber(v float32)` + +SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field. + +### GetPrefixNsInteger + +`func (o *XmlItem) GetPrefixNsInteger() int32` + +GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise. + +### GetPrefixNsIntegerOk + +`func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool)` + +GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsInteger + +`func (o *XmlItem) HasPrefixNsInteger() bool` + +HasPrefixNsInteger returns a boolean if a field has been set. + +### SetPrefixNsInteger + +`func (o *XmlItem) SetPrefixNsInteger(v int32)` + +SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field. + +### GetPrefixNsBoolean + +`func (o *XmlItem) GetPrefixNsBoolean() bool` + +GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise. + +### GetPrefixNsBooleanOk + +`func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool)` + +GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsBoolean + +`func (o *XmlItem) HasPrefixNsBoolean() bool` + +HasPrefixNsBoolean returns a boolean if a field has been set. + +### SetPrefixNsBoolean + +`func (o *XmlItem) SetPrefixNsBoolean(v bool)` + +SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field. + +### GetPrefixNsArray + +`func (o *XmlItem) GetPrefixNsArray() []int32` + +GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise. + +### GetPrefixNsArrayOk + +`func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool)` + +GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsArray + +`func (o *XmlItem) HasPrefixNsArray() bool` + +HasPrefixNsArray returns a boolean if a field has been set. + +### SetPrefixNsArray + +`func (o *XmlItem) SetPrefixNsArray(v []int32)` + +SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field. + +### GetPrefixNsWrappedArray + +`func (o *XmlItem) GetPrefixNsWrappedArray() []int32` + +GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise. + +### GetPrefixNsWrappedArrayOk + +`func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool)` + +GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsWrappedArray + +`func (o *XmlItem) HasPrefixNsWrappedArray() bool` + +HasPrefixNsWrappedArray returns a boolean if a field has been set. + +### SetPrefixNsWrappedArray + +`func (o *XmlItem) SetPrefixNsWrappedArray(v []int32)` + +SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore-withXml/model_200_response.go b/samples/client/petstore/go/go-petstore-withXml/model_200_response.go index c595db807750..861e07c148d1 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_200_response.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_200_response.go @@ -9,9 +9,94 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) // Model for testing model name starting with number type Model200Response struct { - Name int32 `json:"name,omitempty" xml:"name"` - Class string `json:"class,omitempty" xml:"class"` + Name *int32 `json:"name,omitempty" xml:"name"` + + Class *string `json:"class,omitempty" xml:"class"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Model200Response) GetName() int32 { + if o == nil || o.Name == nil { + var ret int32 + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Model200Response) GetNameOk() (int32, bool) { + if o == nil || o.Name == nil { + var ret int32 + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Model200Response) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given int32 and assigns it to the Name field. +func (o *Model200Response) SetName(v int32) { + o.Name = &v +} + +// GetClass returns the Class field if non-nil, zero value otherwise. +func (o *Model200Response) GetClass() string { + if o == nil || o.Class == nil { + var ret string + return ret + } + return *o.Class } + +// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Model200Response) GetClassOk() (string, bool) { + if o == nil || o.Class == nil { + var ret string + return ret, false + } + return *o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Model200Response) HasClass() bool { + if o != nil && o.Class != nil { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Model200Response) SetClass(v string) { + o.Class = &v +} + + +func (o Model200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Class != nil { + toSerialize["class"] = o.Class + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go index 6977ea451be0..a1230dfa4499 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_any_type.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type AdditionalPropertiesAnyType struct { - Name string `json:"name,omitempty" xml:"name"` + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesAnyType) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesAnyType) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesAnyType) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go index ef3055a02b38..102398fa991e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_array.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type AdditionalPropertiesArray struct { - Name string `json:"name,omitempty" xml:"name"` + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesArray) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesArray) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesArray) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesArray) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesArray) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go index 6cd68b36627a..b91706aeb972 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_boolean.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type AdditionalPropertiesBoolean struct { - Name string `json:"name,omitempty" xml:"name"` + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesBoolean) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesBoolean) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesBoolean) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesBoolean) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go index 363a62f7a3e3..7d8a2537929e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go @@ -9,17 +9,435 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type AdditionalPropertiesClass struct { - MapString map[string]string `json:"map_string,omitempty" xml:"map_string"` - MapNumber map[string]float32 `json:"map_number,omitempty" xml:"map_number"` - MapInteger map[string]int32 `json:"map_integer,omitempty" xml:"map_integer"` - MapBoolean map[string]bool `json:"map_boolean,omitempty" xml:"map_boolean"` - MapArrayInteger map[string][]int32 `json:"map_array_integer,omitempty" xml:"map_array_integer"` - MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty" xml:"map_array_anytype"` - MapMapString map[string]map[string]string `json:"map_map_string,omitempty" xml:"map_map_string"` - MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty" xml:"map_map_anytype"` - Anytype1 map[string]interface{} `json:"anytype_1,omitempty" xml:"anytype_1"` - Anytype2 map[string]interface{} `json:"anytype_2,omitempty" xml:"anytype_2"` - Anytype3 map[string]interface{} `json:"anytype_3,omitempty" xml:"anytype_3"` + MapString *map[string]string `json:"map_string,omitempty" xml:"map_string"` + + MapNumber *map[string]float32 `json:"map_number,omitempty" xml:"map_number"` + + MapInteger *map[string]int32 `json:"map_integer,omitempty" xml:"map_integer"` + + MapBoolean *map[string]bool `json:"map_boolean,omitempty" xml:"map_boolean"` + + MapArrayInteger *map[string][]int32 `json:"map_array_integer,omitempty" xml:"map_array_integer"` + + MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty" xml:"map_array_anytype"` + + MapMapString *map[string]map[string]string `json:"map_map_string,omitempty" xml:"map_map_string"` + + MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty" xml:"map_map_anytype"` + + Anytype1 *map[string]interface{} `json:"anytype_1,omitempty" xml:"anytype_1"` + + Anytype2 *map[string]interface{} `json:"anytype_2,omitempty" xml:"anytype_2"` + + Anytype3 *map[string]interface{} `json:"anytype_3,omitempty" xml:"anytype_3"` + +} + +// GetMapString returns the MapString field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapString() map[string]string { + if o == nil || o.MapString == nil { + var ret map[string]string + return ret + } + return *o.MapString +} + +// GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool) { + if o == nil || o.MapString == nil { + var ret map[string]string + return ret, false + } + return *o.MapString, true +} + +// HasMapString returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapString() bool { + if o != nil && o.MapString != nil { + return true + } + + return false +} + +// SetMapString gets a reference to the given map[string]string and assigns it to the MapString field. +func (o *AdditionalPropertiesClass) SetMapString(v map[string]string) { + o.MapString = &v +} + +// GetMapNumber returns the MapNumber field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32 { + if o == nil || o.MapNumber == nil { + var ret map[string]float32 + return ret + } + return *o.MapNumber +} + +// GetMapNumberOk returns a tuple with the MapNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool) { + if o == nil || o.MapNumber == nil { + var ret map[string]float32 + return ret, false + } + return *o.MapNumber, true +} + +// HasMapNumber returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapNumber() bool { + if o != nil && o.MapNumber != nil { + return true + } + + return false +} + +// SetMapNumber gets a reference to the given map[string]float32 and assigns it to the MapNumber field. +func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32) { + o.MapNumber = &v +} + +// GetMapInteger returns the MapInteger field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32 { + if o == nil || o.MapInteger == nil { + var ret map[string]int32 + return ret + } + return *o.MapInteger +} + +// GetMapIntegerOk returns a tuple with the MapInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool) { + if o == nil || o.MapInteger == nil { + var ret map[string]int32 + return ret, false + } + return *o.MapInteger, true +} + +// HasMapInteger returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapInteger() bool { + if o != nil && o.MapInteger != nil { + return true + } + + return false +} + +// SetMapInteger gets a reference to the given map[string]int32 and assigns it to the MapInteger field. +func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32) { + o.MapInteger = &v +} + +// GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool { + if o == nil || o.MapBoolean == nil { + var ret map[string]bool + return ret + } + return *o.MapBoolean +} + +// GetMapBooleanOk returns a tuple with the MapBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool) { + if o == nil || o.MapBoolean == nil { + var ret map[string]bool + return ret, false + } + return *o.MapBoolean, true +} + +// HasMapBoolean returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapBoolean() bool { + if o != nil && o.MapBoolean != nil { + return true + } + + return false +} + +// SetMapBoolean gets a reference to the given map[string]bool and assigns it to the MapBoolean field. +func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool) { + o.MapBoolean = &v +} + +// GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32 { + if o == nil || o.MapArrayInteger == nil { + var ret map[string][]int32 + return ret + } + return *o.MapArrayInteger +} + +// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool) { + if o == nil || o.MapArrayInteger == nil { + var ret map[string][]int32 + return ret, false + } + return *o.MapArrayInteger, true +} + +// HasMapArrayInteger returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapArrayInteger() bool { + if o != nil && o.MapArrayInteger != nil { + return true + } + + return false +} + +// SetMapArrayInteger gets a reference to the given map[string][]int32 and assigns it to the MapArrayInteger field. +func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32) { + o.MapArrayInteger = &v +} + +// GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{} { + if o == nil || o.MapArrayAnytype == nil { + var ret map[string][]map[string]interface{} + return ret + } + return *o.MapArrayAnytype } + +// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool) { + if o == nil || o.MapArrayAnytype == nil { + var ret map[string][]map[string]interface{} + return ret, false + } + return *o.MapArrayAnytype, true +} + +// HasMapArrayAnytype returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool { + if o != nil && o.MapArrayAnytype != nil { + return true + } + + return false +} + +// SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field. +func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{}) { + o.MapArrayAnytype = &v +} + +// GetMapMapString returns the MapMapString field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]string { + if o == nil || o.MapMapString == nil { + var ret map[string]map[string]string + return ret + } + return *o.MapMapString +} + +// GetMapMapStringOk returns a tuple with the MapMapString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool) { + if o == nil || o.MapMapString == nil { + var ret map[string]map[string]string + return ret, false + } + return *o.MapMapString, true +} + +// HasMapMapString returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapMapString() bool { + if o != nil && o.MapMapString != nil { + return true + } + + return false +} + +// SetMapMapString gets a reference to the given map[string]map[string]string and assigns it to the MapMapString field. +func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]string) { + o.MapMapString = &v +} + +// GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{} { + if o == nil || o.MapMapAnytype == nil { + var ret map[string]map[string]map[string]interface{} + return ret + } + return *o.MapMapAnytype +} + +// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool) { + if o == nil || o.MapMapAnytype == nil { + var ret map[string]map[string]map[string]interface{} + return ret, false + } + return *o.MapMapAnytype, true +} + +// HasMapMapAnytype returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool { + if o != nil && o.MapMapAnytype != nil { + return true + } + + return false +} + +// SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field. +func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{}) { + o.MapMapAnytype = &v +} + +// GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { + if o == nil || o.Anytype1 == nil { + var ret map[string]interface{} + return ret + } + return *o.Anytype1 +} + +// GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) { + if o == nil || o.Anytype1 == nil { + var ret map[string]interface{} + return ret, false + } + return *o.Anytype1, true +} + +// HasAnytype1 returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasAnytype1() bool { + if o != nil && o.Anytype1 != nil { + return true + } + + return false +} + +// SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field. +func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) { + o.Anytype1 = &v +} + +// GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { + if o == nil || o.Anytype2 == nil { + var ret map[string]interface{} + return ret + } + return *o.Anytype2 +} + +// GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) { + if o == nil || o.Anytype2 == nil { + var ret map[string]interface{} + return ret, false + } + return *o.Anytype2, true +} + +// HasAnytype2 returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasAnytype2() bool { + if o != nil && o.Anytype2 != nil { + return true + } + + return false +} + +// SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field. +func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) { + o.Anytype2 = &v +} + +// GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { + if o == nil || o.Anytype3 == nil { + var ret map[string]interface{} + return ret + } + return *o.Anytype3 +} + +// GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) { + if o == nil || o.Anytype3 == nil { + var ret map[string]interface{} + return ret, false + } + return *o.Anytype3, true +} + +// HasAnytype3 returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasAnytype3() bool { + if o != nil && o.Anytype3 != nil { + return true + } + + return false +} + +// SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field. +func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) { + o.Anytype3 = &v +} + + +func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MapString != nil { + toSerialize["map_string"] = o.MapString + } + if o.MapNumber != nil { + toSerialize["map_number"] = o.MapNumber + } + if o.MapInteger != nil { + toSerialize["map_integer"] = o.MapInteger + } + if o.MapBoolean != nil { + toSerialize["map_boolean"] = o.MapBoolean + } + if o.MapArrayInteger != nil { + toSerialize["map_array_integer"] = o.MapArrayInteger + } + if o.MapArrayAnytype != nil { + toSerialize["map_array_anytype"] = o.MapArrayAnytype + } + if o.MapMapString != nil { + toSerialize["map_map_string"] = o.MapMapString + } + if o.MapMapAnytype != nil { + toSerialize["map_map_anytype"] = o.MapMapAnytype + } + if o.Anytype1 != nil { + toSerialize["anytype_1"] = o.Anytype1 + } + if o.Anytype2 != nil { + toSerialize["anytype_2"] = o.Anytype2 + } + if o.Anytype3 != nil { + toSerialize["anytype_3"] = o.Anytype3 + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go index 7878ce4a0661..3112a1a3c12c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_integer.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type AdditionalPropertiesInteger struct { - Name string `json:"name,omitempty" xml:"name"` + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesInteger) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesInteger) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesInteger) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesInteger) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go index f95c1a6e3d64..06d7646c6d93 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_number.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type AdditionalPropertiesNumber struct { - Name string `json:"name,omitempty" xml:"name"` + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesNumber) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesNumber) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesNumber) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesNumber) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go index e69e51537480..dddc2eb69804 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_object.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type AdditionalPropertiesObject struct { - Name string `json:"name,omitempty" xml:"name"` + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesObject) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesObject) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesObject) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesObject) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesObject) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go index 7fb9acc4f2a1..a0ac97e6b303 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_string.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type AdditionalPropertiesString struct { - Name string `json:"name,omitempty" xml:"name"` + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesString) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesString) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesString) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesString) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesString) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_animal.go b/samples/client/petstore/go/go-petstore-withXml/model_animal.go index 69c91c1b3575..517915575461 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_animal.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_animal.go @@ -9,8 +9,97 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) type Animal struct { - ClassName string `json:"className" xml:"className"` - Color string `json:"color,omitempty" xml:"color"` + ClassName *string `json:"className,omitempty" xml:"className"` + + Color *string `json:"color,omitempty" xml:"color"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Animal) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Animal) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Animal) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Animal) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Animal) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color } + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Animal) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Animal) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Animal) SetColor(v string) { + o.Color = &v +} + + +func (o Animal) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Animal") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_api_response.go b/samples/client/petstore/go/go-petstore-withXml/model_api_response.go index 9f617359fd81..e1dd1db17312 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_api_response.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_api_response.go @@ -9,9 +9,131 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type ApiResponse struct { - Code int32 `json:"code,omitempty" xml:"code"` - Type string `json:"type,omitempty" xml:"type"` - Message string `json:"message,omitempty" xml:"message"` + Code *int32 `json:"code,omitempty" xml:"code"` + + Type *string `json:"type,omitempty" xml:"type"` + + Message *string `json:"message,omitempty" xml:"message"` + +} + +// GetCode returns the Code field if non-nil, zero value otherwise. +func (o *ApiResponse) GetCode() int32 { + if o == nil || o.Code == nil { + var ret int32 + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetCodeOk() (int32, bool) { + if o == nil || o.Code == nil { + var ret int32 + return ret, false + } + return *o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ApiResponse) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *ApiResponse) SetCode(v int32) { + o.Code = &v +} + +// GetType returns the Type field if non-nil, zero value otherwise. +func (o *ApiResponse) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type } + +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetTypeOk() (string, bool) { + if o == nil || o.Type == nil { + var ret string + return ret, false + } + return *o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ApiResponse) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ApiResponse) SetType(v string) { + o.Type = &v +} + +// GetMessage returns the Message field if non-nil, zero value otherwise. +func (o *ApiResponse) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetMessageOk() (string, bool) { + if o == nil || o.Message == nil { + var ret string + return ret, false + } + return *o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ApiResponse) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ApiResponse) SetMessage(v string) { + o.Message = &v +} + + +func (o ApiResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Code != nil { + toSerialize["code"] = o.Code + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_array_of_array_of_number_only.go b/samples/client/petstore/go/go-petstore-withXml/model_array_of_array_of_number_only.go index ed5167ff2d5d..5fbc7d5feec4 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_array_of_array_of_number_only.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_array_of_array_of_number_only.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type ArrayOfArrayOfNumberOnly struct { - ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty" xml:"ArrayArrayNumber"` + ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty" xml:"ArrayArrayNumber"` + +} + +// GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { + if o == nil || o.ArrayArrayNumber == nil { + var ret [][]float32 + return ret + } + return *o.ArrayArrayNumber +} + +// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { + if o == nil || o.ArrayArrayNumber == nil { + var ret [][]float32 + return ret, false + } + return *o.ArrayArrayNumber, true +} + +// HasArrayArrayNumber returns a boolean if a field has been set. +func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool { + if o != nil && o.ArrayArrayNumber != nil { + return true + } + + return false } + +// SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. +func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) { + o.ArrayArrayNumber = &v +} + + +func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayArrayNumber != nil { + toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_array_of_number_only.go b/samples/client/petstore/go/go-petstore-withXml/model_array_of_number_only.go index 1c23a80552a5..0675101a8b90 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_array_of_number_only.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_array_of_number_only.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type ArrayOfNumberOnly struct { - ArrayNumber []float32 `json:"ArrayNumber,omitempty" xml:"ArrayNumber"` + ArrayNumber *[]float32 `json:"ArrayNumber,omitempty" xml:"ArrayNumber"` + +} + +// GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. +func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { + if o == nil || o.ArrayNumber == nil { + var ret []float32 + return ret + } + return *o.ArrayNumber +} + +// GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { + if o == nil || o.ArrayNumber == nil { + var ret []float32 + return ret, false + } + return *o.ArrayNumber, true +} + +// HasArrayNumber returns a boolean if a field has been set. +func (o *ArrayOfNumberOnly) HasArrayNumber() bool { + if o != nil && o.ArrayNumber != nil { + return true + } + + return false } + +// SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. +func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) { + o.ArrayNumber = &v +} + + +func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayNumber != nil { + toSerialize["ArrayNumber"] = o.ArrayNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_array_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_array_test_.go index 3a0f7178d2b5..91bd2bb2a5f1 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_array_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_array_test_.go @@ -9,9 +9,131 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type ArrayTest struct { - ArrayOfString []string `json:"array_of_string,omitempty" xml:"array_of_string"` - ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty" xml:"array_array_of_integer"` - ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty" xml:"array_array_of_model"` + ArrayOfString *[]string `json:"array_of_string,omitempty" xml:"array_of_string"` + + ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty" xml:"array_array_of_integer"` + + ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty" xml:"array_array_of_model"` + +} + +// GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayOfString() []string { + if o == nil || o.ArrayOfString == nil { + var ret []string + return ret + } + return *o.ArrayOfString +} + +// GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { + if o == nil || o.ArrayOfString == nil { + var ret []string + return ret, false + } + return *o.ArrayOfString, true +} + +// HasArrayOfString returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayOfString() bool { + if o != nil && o.ArrayOfString != nil { + return true + } + + return false +} + +// SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. +func (o *ArrayTest) SetArrayOfString(v []string) { + o.ArrayOfString = &v +} + +// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { + if o == nil || o.ArrayArrayOfInteger == nil { + var ret [][]int64 + return ret + } + return *o.ArrayArrayOfInteger } + +// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { + if o == nil || o.ArrayArrayOfInteger == nil { + var ret [][]int64 + return ret, false + } + return *o.ArrayArrayOfInteger, true +} + +// HasArrayArrayOfInteger returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayArrayOfInteger() bool { + if o != nil && o.ArrayArrayOfInteger != nil { + return true + } + + return false +} + +// SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. +func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) { + o.ArrayArrayOfInteger = &v +} + +// GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { + if o == nil || o.ArrayArrayOfModel == nil { + var ret [][]ReadOnlyFirst + return ret + } + return *o.ArrayArrayOfModel +} + +// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { + if o == nil || o.ArrayArrayOfModel == nil { + var ret [][]ReadOnlyFirst + return ret, false + } + return *o.ArrayArrayOfModel, true +} + +// HasArrayArrayOfModel returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayArrayOfModel() bool { + if o != nil && o.ArrayArrayOfModel != nil { + return true + } + + return false +} + +// SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. +func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) { + o.ArrayArrayOfModel = &v +} + + +func (o ArrayTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayOfString != nil { + toSerialize["array_of_string"] = o.ArrayOfString + } + if o.ArrayArrayOfInteger != nil { + toSerialize["array_array_of_integer"] = o.ArrayArrayOfInteger + } + if o.ArrayArrayOfModel != nil { + toSerialize["array_array_of_model"] = o.ArrayArrayOfModel + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_capitalization.go b/samples/client/petstore/go/go-petstore-withXml/model_capitalization.go index 66c5fc6c1480..e47a817bb638 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_capitalization.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_capitalization.go @@ -9,13 +9,246 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type Capitalization struct { - SmallCamel string `json:"smallCamel,omitempty" xml:"smallCamel"` - CapitalCamel string `json:"CapitalCamel,omitempty" xml:"CapitalCamel"` - SmallSnake string `json:"small_Snake,omitempty" xml:"small_Snake"` - CapitalSnake string `json:"Capital_Snake,omitempty" xml:"Capital_Snake"` - SCAETHFlowPoints string `json:"SCA_ETH_Flow_Points,omitempty" xml:"SCA_ETH_Flow_Points"` + SmallCamel *string `json:"smallCamel,omitempty" xml:"smallCamel"` + + CapitalCamel *string `json:"CapitalCamel,omitempty" xml:"CapitalCamel"` + + SmallSnake *string `json:"small_Snake,omitempty" xml:"small_Snake"` + + CapitalSnake *string `json:"Capital_Snake,omitempty" xml:"Capital_Snake"` + + SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty" xml:"SCA_ETH_Flow_Points"` + // Name of the pet - ATT_NAME string `json:"ATT_NAME,omitempty" xml:"ATT_NAME"` + ATT_NAME *string `json:"ATT_NAME,omitempty" xml:"ATT_NAME"` + +} + +// GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. +func (o *Capitalization) GetSmallCamel() string { + if o == nil || o.SmallCamel == nil { + var ret string + return ret + } + return *o.SmallCamel +} + +// GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSmallCamelOk() (string, bool) { + if o == nil || o.SmallCamel == nil { + var ret string + return ret, false + } + return *o.SmallCamel, true +} + +// HasSmallCamel returns a boolean if a field has been set. +func (o *Capitalization) HasSmallCamel() bool { + if o != nil && o.SmallCamel != nil { + return true + } + + return false +} + +// SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field. +func (o *Capitalization) SetSmallCamel(v string) { + o.SmallCamel = &v +} + +// GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. +func (o *Capitalization) GetCapitalCamel() string { + if o == nil || o.CapitalCamel == nil { + var ret string + return ret + } + return *o.CapitalCamel +} + +// GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetCapitalCamelOk() (string, bool) { + if o == nil || o.CapitalCamel == nil { + var ret string + return ret, false + } + return *o.CapitalCamel, true +} + +// HasCapitalCamel returns a boolean if a field has been set. +func (o *Capitalization) HasCapitalCamel() bool { + if o != nil && o.CapitalCamel != nil { + return true + } + + return false +} + +// SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field. +func (o *Capitalization) SetCapitalCamel(v string) { + o.CapitalCamel = &v +} + +// GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. +func (o *Capitalization) GetSmallSnake() string { + if o == nil || o.SmallSnake == nil { + var ret string + return ret + } + return *o.SmallSnake +} + +// GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSmallSnakeOk() (string, bool) { + if o == nil || o.SmallSnake == nil { + var ret string + return ret, false + } + return *o.SmallSnake, true +} + +// HasSmallSnake returns a boolean if a field has been set. +func (o *Capitalization) HasSmallSnake() bool { + if o != nil && o.SmallSnake != nil { + return true + } + + return false +} + +// SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field. +func (o *Capitalization) SetSmallSnake(v string) { + o.SmallSnake = &v } + +// GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. +func (o *Capitalization) GetCapitalSnake() string { + if o == nil || o.CapitalSnake == nil { + var ret string + return ret + } + return *o.CapitalSnake +} + +// GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetCapitalSnakeOk() (string, bool) { + if o == nil || o.CapitalSnake == nil { + var ret string + return ret, false + } + return *o.CapitalSnake, true +} + +// HasCapitalSnake returns a boolean if a field has been set. +func (o *Capitalization) HasCapitalSnake() bool { + if o != nil && o.CapitalSnake != nil { + return true + } + + return false +} + +// SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field. +func (o *Capitalization) SetCapitalSnake(v string) { + o.CapitalSnake = &v +} + +// GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. +func (o *Capitalization) GetSCAETHFlowPoints() string { + if o == nil || o.SCAETHFlowPoints == nil { + var ret string + return ret + } + return *o.SCAETHFlowPoints +} + +// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) { + if o == nil || o.SCAETHFlowPoints == nil { + var ret string + return ret, false + } + return *o.SCAETHFlowPoints, true +} + +// HasSCAETHFlowPoints returns a boolean if a field has been set. +func (o *Capitalization) HasSCAETHFlowPoints() bool { + if o != nil && o.SCAETHFlowPoints != nil { + return true + } + + return false +} + +// SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field. +func (o *Capitalization) SetSCAETHFlowPoints(v string) { + o.SCAETHFlowPoints = &v +} + +// GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. +func (o *Capitalization) GetATT_NAME() string { + if o == nil || o.ATT_NAME == nil { + var ret string + return ret + } + return *o.ATT_NAME +} + +// GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetATT_NAMEOk() (string, bool) { + if o == nil || o.ATT_NAME == nil { + var ret string + return ret, false + } + return *o.ATT_NAME, true +} + +// HasATT_NAME returns a boolean if a field has been set. +func (o *Capitalization) HasATT_NAME() bool { + if o != nil && o.ATT_NAME != nil { + return true + } + + return false +} + +// SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field. +func (o *Capitalization) SetATT_NAME(v string) { + o.ATT_NAME = &v +} + + +func (o Capitalization) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SmallCamel != nil { + toSerialize["smallCamel"] = o.SmallCamel + } + if o.CapitalCamel != nil { + toSerialize["CapitalCamel"] = o.CapitalCamel + } + if o.SmallSnake != nil { + toSerialize["small_Snake"] = o.SmallSnake + } + if o.CapitalSnake != nil { + toSerialize["Capital_Snake"] = o.CapitalSnake + } + if o.SCAETHFlowPoints != nil { + toSerialize["SCA_ETH_Flow_Points"] = o.SCAETHFlowPoints + } + if o.ATT_NAME != nil { + toSerialize["ATT_NAME"] = o.ATT_NAME + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_cat.go b/samples/client/petstore/go/go-petstore-withXml/model_cat.go index f59648881a6e..d2582bb5c253 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_cat.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_cat.go @@ -9,9 +9,135 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) type Cat struct { - ClassName string `json:"className" xml:"className"` - Color string `json:"color,omitempty" xml:"color"` - Declawed bool `json:"declawed,omitempty" xml:"declawed"` + ClassName *string `json:"className,omitempty" xml:"className"` + + Color *string `json:"color,omitempty" xml:"color"` + + Declawed *bool `json:"declawed,omitempty" xml:"declawed"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Cat) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Cat) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Cat) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Cat) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color } + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Cat) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Cat) SetColor(v string) { + o.Color = &v +} + +// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +func (o *Cat) GetDeclawed() bool { + if o == nil || o.Declawed == nil { + var ret bool + return ret + } + return *o.Declawed +} + +// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetDeclawedOk() (bool, bool) { + if o == nil || o.Declawed == nil { + var ret bool + return ret, false + } + return *o.Declawed, true +} + +// HasDeclawed returns a boolean if a field has been set. +func (o *Cat) HasDeclawed() bool { + if o != nil && o.Declawed != nil { + return true + } + + return false +} + +// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +func (o *Cat) SetDeclawed(v bool) { + o.Declawed = &v +} + + +func (o Cat) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Cat") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + if o.Declawed != nil { + toSerialize["declawed"] = o.Declawed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go b/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go index c01d44785e94..367d99efef14 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_cat_all_of.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type CatAllOf struct { - Declawed bool `json:"declawed,omitempty" xml:"declawed"` + Declawed *bool `json:"declawed,omitempty" xml:"declawed"` + +} + +// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +func (o *CatAllOf) GetDeclawed() bool { + if o == nil || o.Declawed == nil { + var ret bool + return ret + } + return *o.Declawed +} + +// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CatAllOf) GetDeclawedOk() (bool, bool) { + if o == nil || o.Declawed == nil { + var ret bool + return ret, false + } + return *o.Declawed, true +} + +// HasDeclawed returns a boolean if a field has been set. +func (o *CatAllOf) HasDeclawed() bool { + if o != nil && o.Declawed != nil { + return true + } + + return false } + +// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +func (o *CatAllOf) SetDeclawed(v bool) { + o.Declawed = &v +} + + +func (o CatAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Declawed != nil { + toSerialize["declawed"] = o.Declawed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_category.go b/samples/client/petstore/go/go-petstore-withXml/model_category.go index 134f5e8534cf..b31dd7e197cb 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_category.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_category.go @@ -9,8 +9,97 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) type Category struct { - Id int64 `json:"id,omitempty" xml:"id"` - Name string `json:"name" xml:"name"` + Id *int64 `json:"id,omitempty" xml:"id"` + + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Category) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Category) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Category) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Category) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Category) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name } + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Category) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Category) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Category) SetName(v string) { + o.Name = &v +} + + +func (o Category) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Category") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_class_model.go b/samples/client/petstore/go/go-petstore-withXml/model_class_model.go index 8c7a002dd35e..39b9006af226 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_class_model.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_class_model.go @@ -9,8 +9,56 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) // Model for testing model with \"_class\" property type ClassModel struct { - Class string `json:"_class,omitempty" xml:"_class"` + Class *string `json:"_class,omitempty" xml:"_class"` + +} + +// GetClass returns the Class field if non-nil, zero value otherwise. +func (o *ClassModel) GetClass() string { + if o == nil || o.Class == nil { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ClassModel) GetClassOk() (string, bool) { + if o == nil || o.Class == nil { + var ret string + return ret, false + } + return *o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *ClassModel) HasClass() bool { + if o != nil && o.Class != nil { + return true + } + + return false } + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *ClassModel) SetClass(v string) { + o.Class = &v +} + + +func (o ClassModel) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Class != nil { + toSerialize["_class"] = o.Class + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_client.go b/samples/client/petstore/go/go-petstore-withXml/model_client.go index e41f7052af02..c8d225dfc0cd 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_client.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_client.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type Client struct { - Client string `json:"client,omitempty" xml:"client"` + Client *string `json:"client,omitempty" xml:"client"` + +} + +// GetClient returns the Client field if non-nil, zero value otherwise. +func (o *Client) GetClient() string { + if o == nil || o.Client == nil { + var ret string + return ret + } + return *o.Client +} + +// GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Client) GetClientOk() (string, bool) { + if o == nil || o.Client == nil { + var ret string + return ret, false + } + return *o.Client, true +} + +// HasClient returns a boolean if a field has been set. +func (o *Client) HasClient() bool { + if o != nil && o.Client != nil { + return true + } + + return false } + +// SetClient gets a reference to the given string and assigns it to the Client field. +func (o *Client) SetClient(v string) { + o.Client = &v +} + + +func (o Client) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Client != nil { + toSerialize["client"] = o.Client + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_dog.go b/samples/client/petstore/go/go-petstore-withXml/model_dog.go index 8191c278bb63..f57b56f4de65 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_dog.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_dog.go @@ -9,9 +9,135 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) type Dog struct { - ClassName string `json:"className" xml:"className"` - Color string `json:"color,omitempty" xml:"color"` - Breed string `json:"breed,omitempty" xml:"breed"` + ClassName *string `json:"className,omitempty" xml:"className"` + + Color *string `json:"color,omitempty" xml:"color"` + + Breed *string `json:"breed,omitempty" xml:"breed"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Dog) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Dog) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Dog) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Dog) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color } + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Dog) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Dog) SetColor(v string) { + o.Color = &v +} + +// GetBreed returns the Breed field if non-nil, zero value otherwise. +func (o *Dog) GetBreed() string { + if o == nil || o.Breed == nil { + var ret string + return ret + } + return *o.Breed +} + +// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetBreedOk() (string, bool) { + if o == nil || o.Breed == nil { + var ret string + return ret, false + } + return *o.Breed, true +} + +// HasBreed returns a boolean if a field has been set. +func (o *Dog) HasBreed() bool { + if o != nil && o.Breed != nil { + return true + } + + return false +} + +// SetBreed gets a reference to the given string and assigns it to the Breed field. +func (o *Dog) SetBreed(v string) { + o.Breed = &v +} + + +func (o Dog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Dog") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + if o.Breed != nil { + toSerialize["breed"] = o.Breed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go b/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go index a679641f749b..21dd23db6560 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_dog_all_of.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type DogAllOf struct { - Breed string `json:"breed,omitempty" xml:"breed"` + Breed *string `json:"breed,omitempty" xml:"breed"` + +} + +// GetBreed returns the Breed field if non-nil, zero value otherwise. +func (o *DogAllOf) GetBreed() string { + if o == nil || o.Breed == nil { + var ret string + return ret + } + return *o.Breed +} + +// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *DogAllOf) GetBreedOk() (string, bool) { + if o == nil || o.Breed == nil { + var ret string + return ret, false + } + return *o.Breed, true +} + +// HasBreed returns a boolean if a field has been set. +func (o *DogAllOf) HasBreed() bool { + if o != nil && o.Breed != nil { + return true + } + + return false } + +// SetBreed gets a reference to the given string and assigns it to the Breed field. +func (o *DogAllOf) SetBreed(v string) { + o.Breed = &v +} + + +func (o DogAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Breed != nil { + toSerialize["breed"] = o.Breed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_enum_arrays.go b/samples/client/petstore/go/go-petstore-withXml/model_enum_arrays.go index f4c7e5495ccd..35ebe26e6a42 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_enum_arrays.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_enum_arrays.go @@ -9,8 +9,93 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type EnumArrays struct { - JustSymbol string `json:"just_symbol,omitempty" xml:"just_symbol"` - ArrayEnum []string `json:"array_enum,omitempty" xml:"array_enum"` + JustSymbol *string `json:"just_symbol,omitempty" xml:"just_symbol"` + + ArrayEnum *[]string `json:"array_enum,omitempty" xml:"array_enum"` + +} + +// GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. +func (o *EnumArrays) GetJustSymbol() string { + if o == nil || o.JustSymbol == nil { + var ret string + return ret + } + return *o.JustSymbol +} + +// GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumArrays) GetJustSymbolOk() (string, bool) { + if o == nil || o.JustSymbol == nil { + var ret string + return ret, false + } + return *o.JustSymbol, true +} + +// HasJustSymbol returns a boolean if a field has been set. +func (o *EnumArrays) HasJustSymbol() bool { + if o != nil && o.JustSymbol != nil { + return true + } + + return false +} + +// SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field. +func (o *EnumArrays) SetJustSymbol(v string) { + o.JustSymbol = &v +} + +// GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. +func (o *EnumArrays) GetArrayEnum() []string { + if o == nil || o.ArrayEnum == nil { + var ret []string + return ret + } + return *o.ArrayEnum } + +// GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { + if o == nil || o.ArrayEnum == nil { + var ret []string + return ret, false + } + return *o.ArrayEnum, true +} + +// HasArrayEnum returns a boolean if a field has been set. +func (o *EnumArrays) HasArrayEnum() bool { + if o != nil && o.ArrayEnum != nil { + return true + } + + return false +} + +// SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. +func (o *EnumArrays) SetArrayEnum(v []string) { + o.ArrayEnum = &v +} + + +func (o EnumArrays) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.JustSymbol != nil { + toSerialize["just_symbol"] = o.JustSymbol + } + if o.ArrayEnum != nil { + toSerialize["array_enum"] = o.ArrayEnum + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go b/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go index 9d3dd60a9469..e3bf8fddfaa4 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go @@ -16,4 +16,5 @@ const ( ABC EnumClass = "_abc" EFG EnumClass = "-efg" XYZ EnumClass = "(xyz)" -) \ No newline at end of file +) + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_enum_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_enum_test_.go index 02c6c920c31b..003f0462069f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_enum_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_enum_test_.go @@ -9,11 +9,211 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) type EnumTest struct { - EnumString string `json:"enum_string,omitempty" xml:"enum_string"` - EnumStringRequired string `json:"enum_string_required" xml:"enum_string_required"` - EnumInteger int32 `json:"enum_integer,omitempty" xml:"enum_integer"` - EnumNumber float64 `json:"enum_number,omitempty" xml:"enum_number"` - OuterEnum OuterEnum `json:"outerEnum,omitempty" xml:"outerEnum"` + EnumString *string `json:"enum_string,omitempty" xml:"enum_string"` + + EnumStringRequired *string `json:"enum_string_required,omitempty" xml:"enum_string_required"` + + EnumInteger *int32 `json:"enum_integer,omitempty" xml:"enum_integer"` + + EnumNumber *float64 `json:"enum_number,omitempty" xml:"enum_number"` + + OuterEnum *OuterEnum `json:"outerEnum,omitempty" xml:"outerEnum"` + +} + +// GetEnumString returns the EnumString field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumString() string { + if o == nil || o.EnumString == nil { + var ret string + return ret + } + return *o.EnumString +} + +// GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumStringOk() (string, bool) { + if o == nil || o.EnumString == nil { + var ret string + return ret, false + } + return *o.EnumString, true +} + +// HasEnumString returns a boolean if a field has been set. +func (o *EnumTest) HasEnumString() bool { + if o != nil && o.EnumString != nil { + return true + } + + return false +} + +// SetEnumString gets a reference to the given string and assigns it to the EnumString field. +func (o *EnumTest) SetEnumString(v string) { + o.EnumString = &v } + +// GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumStringRequired() string { + if o == nil || o.EnumStringRequired == nil { + var ret string + return ret + } + return *o.EnumStringRequired +} + +// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumStringRequiredOk() (string, bool) { + if o == nil || o.EnumStringRequired == nil { + var ret string + return ret, false + } + return *o.EnumStringRequired, true +} + +// HasEnumStringRequired returns a boolean if a field has been set. +func (o *EnumTest) HasEnumStringRequired() bool { + if o != nil && o.EnumStringRequired != nil { + return true + } + + return false +} + +// SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field. +func (o *EnumTest) SetEnumStringRequired(v string) { + o.EnumStringRequired = &v +} + +// GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumInteger() int32 { + if o == nil || o.EnumInteger == nil { + var ret int32 + return ret + } + return *o.EnumInteger +} + +// GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumIntegerOk() (int32, bool) { + if o == nil || o.EnumInteger == nil { + var ret int32 + return ret, false + } + return *o.EnumInteger, true +} + +// HasEnumInteger returns a boolean if a field has been set. +func (o *EnumTest) HasEnumInteger() bool { + if o != nil && o.EnumInteger != nil { + return true + } + + return false +} + +// SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field. +func (o *EnumTest) SetEnumInteger(v int32) { + o.EnumInteger = &v +} + +// GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumNumber() float64 { + if o == nil || o.EnumNumber == nil { + var ret float64 + return ret + } + return *o.EnumNumber +} + +// GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumNumberOk() (float64, bool) { + if o == nil || o.EnumNumber == nil { + var ret float64 + return ret, false + } + return *o.EnumNumber, true +} + +// HasEnumNumber returns a boolean if a field has been set. +func (o *EnumTest) HasEnumNumber() bool { + if o != nil && o.EnumNumber != nil { + return true + } + + return false +} + +// SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field. +func (o *EnumTest) SetEnumNumber(v float64) { + o.EnumNumber = &v +} + +// GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. +func (o *EnumTest) GetOuterEnum() OuterEnum { + if o == nil || o.OuterEnum == nil { + var ret OuterEnum + return ret + } + return *o.OuterEnum +} + +// GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) { + if o == nil || o.OuterEnum == nil { + var ret OuterEnum + return ret, false + } + return *o.OuterEnum, true +} + +// HasOuterEnum returns a boolean if a field has been set. +func (o *EnumTest) HasOuterEnum() bool { + if o != nil && o.OuterEnum != nil { + return true + } + + return false +} + +// SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. +func (o *EnumTest) SetOuterEnum(v OuterEnum) { + o.OuterEnum = &v +} + + +func (o EnumTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.EnumString != nil { + toSerialize["enum_string"] = o.EnumString + } + if o.EnumStringRequired == nil { + return nil, errors.New("EnumStringRequired is required and not nullable, but was not set on EnumTest") + } + if o.EnumStringRequired != nil { + toSerialize["enum_string_required"] = o.EnumStringRequired + } + if o.EnumInteger != nil { + toSerialize["enum_integer"] = o.EnumInteger + } + if o.EnumNumber != nil { + toSerialize["enum_number"] = o.EnumNumber + } + if o.OuterEnum != nil { + toSerialize["outerEnum"] = o.OuterEnum + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_file.go b/samples/client/petstore/go/go-petstore-withXml/model_file.go index f1d827d1e72d..e71f0d99c015 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_file.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_file.go @@ -9,9 +9,57 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) // Must be named `File` for test. type File struct { // Test capitalization - SourceURI string `json:"sourceURI,omitempty" xml:"sourceURI"` + SourceURI *string `json:"sourceURI,omitempty" xml:"sourceURI"` + +} + +// GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. +func (o *File) GetSourceURI() string { + if o == nil || o.SourceURI == nil { + var ret string + return ret + } + return *o.SourceURI +} + +// GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *File) GetSourceURIOk() (string, bool) { + if o == nil || o.SourceURI == nil { + var ret string + return ret, false + } + return *o.SourceURI, true +} + +// HasSourceURI returns a boolean if a field has been set. +func (o *File) HasSourceURI() bool { + if o != nil && o.SourceURI != nil { + return true + } + + return false } + +// SetSourceURI gets a reference to the given string and assigns it to the SourceURI field. +func (o *File) SetSourceURI(v string) { + o.SourceURI = &v +} + + +func (o File) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SourceURI != nil { + toSerialize["sourceURI"] = o.SourceURI + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_file_schema_test_class.go b/samples/client/petstore/go/go-petstore-withXml/model_file_schema_test_class.go index 6debdd3639b9..be35d5209f42 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_file_schema_test_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_file_schema_test_class.go @@ -9,8 +9,93 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type FileSchemaTestClass struct { - File File `json:"file,omitempty" xml:"file"` - Files []File `json:"files,omitempty" xml:"files"` + File *File `json:"file,omitempty" xml:"file"` + + Files *[]File `json:"files,omitempty" xml:"files"` + +} + +// GetFile returns the File field if non-nil, zero value otherwise. +func (o *FileSchemaTestClass) GetFile() File { + if o == nil || o.File == nil { + var ret File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FileSchemaTestClass) GetFileOk() (File, bool) { + if o == nil || o.File == nil { + var ret File + return ret, false + } + return *o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *FileSchemaTestClass) HasFile() bool { + if o != nil && o.File != nil { + return true + } + + return false +} + +// SetFile gets a reference to the given File and assigns it to the File field. +func (o *FileSchemaTestClass) SetFile(v File) { + o.File = &v +} + +// GetFiles returns the Files field if non-nil, zero value otherwise. +func (o *FileSchemaTestClass) GetFiles() []File { + if o == nil || o.Files == nil { + var ret []File + return ret + } + return *o.Files } + +// GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { + if o == nil || o.Files == nil { + var ret []File + return ret, false + } + return *o.Files, true +} + +// HasFiles returns a boolean if a field has been set. +func (o *FileSchemaTestClass) HasFiles() bool { + if o != nil && o.Files != nil { + return true + } + + return false +} + +// SetFiles gets a reference to the given []File and assigns it to the Files field. +func (o *FileSchemaTestClass) SetFiles(v []File) { + o.Files = &v +} + + +func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.File != nil { + toSerialize["file"] = o.File + } + if o.Files != nil { + toSerialize["files"] = o.Files + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go index dbd780a794e9..780abb060647 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go @@ -12,20 +12,523 @@ package petstore import ( "os" "time" + "encoding/json" + "errors" ) type FormatTest struct { - Integer int32 `json:"integer,omitempty" xml:"integer"` - Int32 int32 `json:"int32,omitempty" xml:"int32"` - Int64 int64 `json:"int64,omitempty" xml:"int64"` - Number float32 `json:"number" xml:"number"` - Float float32 `json:"float,omitempty" xml:"float"` - Double float64 `json:"double,omitempty" xml:"double"` - String string `json:"string,omitempty" xml:"string"` - Byte string `json:"byte" xml:"byte"` - Binary *os.File `json:"binary,omitempty" xml:"binary"` - Date string `json:"date" xml:"date"` - DateTime time.Time `json:"dateTime,omitempty" xml:"dateTime"` - Uuid string `json:"uuid,omitempty" xml:"uuid"` - Password string `json:"password" xml:"password"` + Integer *int32 `json:"integer,omitempty" xml:"integer"` + + Int32 *int32 `json:"int32,omitempty" xml:"int32"` + + Int64 *int64 `json:"int64,omitempty" xml:"int64"` + + Number *float32 `json:"number,omitempty" xml:"number"` + + Float *float32 `json:"float,omitempty" xml:"float"` + + Double *float64 `json:"double,omitempty" xml:"double"` + + String *string `json:"string,omitempty" xml:"string"` + + Byte *string `json:"byte,omitempty" xml:"byte"` + + Binary **os.File `json:"binary,omitempty" xml:"binary"` + + Date *string `json:"date,omitempty" xml:"date"` + + DateTime *time.Time `json:"dateTime,omitempty" xml:"dateTime"` + + Uuid *string `json:"uuid,omitempty" xml:"uuid"` + + Password *string `json:"password,omitempty" xml:"password"` + +} + +// GetInteger returns the Integer field if non-nil, zero value otherwise. +func (o *FormatTest) GetInteger() int32 { + if o == nil || o.Integer == nil { + var ret int32 + return ret + } + return *o.Integer +} + +// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetIntegerOk() (int32, bool) { + if o == nil || o.Integer == nil { + var ret int32 + return ret, false + } + return *o.Integer, true +} + +// HasInteger returns a boolean if a field has been set. +func (o *FormatTest) HasInteger() bool { + if o != nil && o.Integer != nil { + return true + } + + return false +} + +// SetInteger gets a reference to the given int32 and assigns it to the Integer field. +func (o *FormatTest) SetInteger(v int32) { + o.Integer = &v +} + +// GetInt32 returns the Int32 field if non-nil, zero value otherwise. +func (o *FormatTest) GetInt32() int32 { + if o == nil || o.Int32 == nil { + var ret int32 + return ret + } + return *o.Int32 +} + +// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetInt32Ok() (int32, bool) { + if o == nil || o.Int32 == nil { + var ret int32 + return ret, false + } + return *o.Int32, true +} + +// HasInt32 returns a boolean if a field has been set. +func (o *FormatTest) HasInt32() bool { + if o != nil && o.Int32 != nil { + return true + } + + return false +} + +// SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. +func (o *FormatTest) SetInt32(v int32) { + o.Int32 = &v +} + +// GetInt64 returns the Int64 field if non-nil, zero value otherwise. +func (o *FormatTest) GetInt64() int64 { + if o == nil || o.Int64 == nil { + var ret int64 + return ret + } + return *o.Int64 +} + +// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetInt64Ok() (int64, bool) { + if o == nil || o.Int64 == nil { + var ret int64 + return ret, false + } + return *o.Int64, true +} + +// HasInt64 returns a boolean if a field has been set. +func (o *FormatTest) HasInt64() bool { + if o != nil && o.Int64 != nil { + return true + } + + return false +} + +// SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. +func (o *FormatTest) SetInt64(v int64) { + o.Int64 = &v +} + +// GetNumber returns the Number field if non-nil, zero value otherwise. +func (o *FormatTest) GetNumber() float32 { + if o == nil || o.Number == nil { + var ret float32 + return ret + } + return *o.Number +} + +// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetNumberOk() (float32, bool) { + if o == nil || o.Number == nil { + var ret float32 + return ret, false + } + return *o.Number, true +} + +// HasNumber returns a boolean if a field has been set. +func (o *FormatTest) HasNumber() bool { + if o != nil && o.Number != nil { + return true + } + + return false +} + +// SetNumber gets a reference to the given float32 and assigns it to the Number field. +func (o *FormatTest) SetNumber(v float32) { + o.Number = &v +} + +// GetFloat returns the Float field if non-nil, zero value otherwise. +func (o *FormatTest) GetFloat() float32 { + if o == nil || o.Float == nil { + var ret float32 + return ret + } + return *o.Float } + +// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetFloatOk() (float32, bool) { + if o == nil || o.Float == nil { + var ret float32 + return ret, false + } + return *o.Float, true +} + +// HasFloat returns a boolean if a field has been set. +func (o *FormatTest) HasFloat() bool { + if o != nil && o.Float != nil { + return true + } + + return false +} + +// SetFloat gets a reference to the given float32 and assigns it to the Float field. +func (o *FormatTest) SetFloat(v float32) { + o.Float = &v +} + +// GetDouble returns the Double field if non-nil, zero value otherwise. +func (o *FormatTest) GetDouble() float64 { + if o == nil || o.Double == nil { + var ret float64 + return ret + } + return *o.Double +} + +// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDoubleOk() (float64, bool) { + if o == nil || o.Double == nil { + var ret float64 + return ret, false + } + return *o.Double, true +} + +// HasDouble returns a boolean if a field has been set. +func (o *FormatTest) HasDouble() bool { + if o != nil && o.Double != nil { + return true + } + + return false +} + +// SetDouble gets a reference to the given float64 and assigns it to the Double field. +func (o *FormatTest) SetDouble(v float64) { + o.Double = &v +} + +// GetString returns the String field if non-nil, zero value otherwise. +func (o *FormatTest) GetString() string { + if o == nil || o.String == nil { + var ret string + return ret + } + return *o.String +} + +// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetStringOk() (string, bool) { + if o == nil || o.String == nil { + var ret string + return ret, false + } + return *o.String, true +} + +// HasString returns a boolean if a field has been set. +func (o *FormatTest) HasString() bool { + if o != nil && o.String != nil { + return true + } + + return false +} + +// SetString gets a reference to the given string and assigns it to the String field. +func (o *FormatTest) SetString(v string) { + o.String = &v +} + +// GetByte returns the Byte field if non-nil, zero value otherwise. +func (o *FormatTest) GetByte() string { + if o == nil || o.Byte == nil { + var ret string + return ret + } + return *o.Byte +} + +// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetByteOk() (string, bool) { + if o == nil || o.Byte == nil { + var ret string + return ret, false + } + return *o.Byte, true +} + +// HasByte returns a boolean if a field has been set. +func (o *FormatTest) HasByte() bool { + if o != nil && o.Byte != nil { + return true + } + + return false +} + +// SetByte gets a reference to the given string and assigns it to the Byte field. +func (o *FormatTest) SetByte(v string) { + o.Byte = &v +} + +// GetBinary returns the Binary field if non-nil, zero value otherwise. +func (o *FormatTest) GetBinary() *os.File { + if o == nil || o.Binary == nil { + var ret *os.File + return ret + } + return *o.Binary +} + +// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetBinaryOk() (*os.File, bool) { + if o == nil || o.Binary == nil { + var ret *os.File + return ret, false + } + return *o.Binary, true +} + +// HasBinary returns a boolean if a field has been set. +func (o *FormatTest) HasBinary() bool { + if o != nil && o.Binary != nil { + return true + } + + return false +} + +// SetBinary gets a reference to the given *os.File and assigns it to the Binary field. +func (o *FormatTest) SetBinary(v *os.File) { + o.Binary = &v +} + +// GetDate returns the Date field if non-nil, zero value otherwise. +func (o *FormatTest) GetDate() string { + if o == nil || o.Date == nil { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDateOk() (string, bool) { + if o == nil || o.Date == nil { + var ret string + return ret, false + } + return *o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *FormatTest) HasDate() bool { + if o != nil && o.Date != nil { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *FormatTest) SetDate(v string) { + o.Date = &v +} + +// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +func (o *FormatTest) GetDateTime() time.Time { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret + } + return *o.DateTime +} + +// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDateTimeOk() (time.Time, bool) { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret, false + } + return *o.DateTime, true +} + +// HasDateTime returns a boolean if a field has been set. +func (o *FormatTest) HasDateTime() bool { + if o != nil && o.DateTime != nil { + return true + } + + return false +} + +// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +func (o *FormatTest) SetDateTime(v time.Time) { + o.DateTime = &v +} + +// GetUuid returns the Uuid field if non-nil, zero value otherwise. +func (o *FormatTest) GetUuid() string { + if o == nil || o.Uuid == nil { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetUuidOk() (string, bool) { + if o == nil || o.Uuid == nil { + var ret string + return ret, false + } + return *o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *FormatTest) HasUuid() bool { + if o != nil && o.Uuid != nil { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *FormatTest) SetUuid(v string) { + o.Uuid = &v +} + +// GetPassword returns the Password field if non-nil, zero value otherwise. +func (o *FormatTest) GetPassword() string { + if o == nil || o.Password == nil { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetPasswordOk() (string, bool) { + if o == nil || o.Password == nil { + var ret string + return ret, false + } + return *o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *FormatTest) HasPassword() bool { + if o != nil && o.Password != nil { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *FormatTest) SetPassword(v string) { + o.Password = &v +} + + +func (o FormatTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Integer != nil { + toSerialize["integer"] = o.Integer + } + if o.Int32 != nil { + toSerialize["int32"] = o.Int32 + } + if o.Int64 != nil { + toSerialize["int64"] = o.Int64 + } + if o.Number == nil { + return nil, errors.New("Number is required and not nullable, but was not set on FormatTest") + } + if o.Number != nil { + toSerialize["number"] = o.Number + } + if o.Float != nil { + toSerialize["float"] = o.Float + } + if o.Double != nil { + toSerialize["double"] = o.Double + } + if o.String != nil { + toSerialize["string"] = o.String + } + if o.Byte == nil { + return nil, errors.New("Byte is required and not nullable, but was not set on FormatTest") + } + if o.Byte != nil { + toSerialize["byte"] = o.Byte + } + if o.Binary != nil { + toSerialize["binary"] = o.Binary + } + if o.Date == nil { + return nil, errors.New("Date is required and not nullable, but was not set on FormatTest") + } + if o.Date != nil { + toSerialize["date"] = o.Date + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Uuid != nil { + toSerialize["uuid"] = o.Uuid + } + if o.Password == nil { + return nil, errors.New("Password is required and not nullable, but was not set on FormatTest") + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_has_only_read_only.go b/samples/client/petstore/go/go-petstore-withXml/model_has_only_read_only.go index 15edfc4349a7..848606230f14 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_has_only_read_only.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_has_only_read_only.go @@ -9,8 +9,93 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type HasOnlyReadOnly struct { - Bar string `json:"bar,omitempty" xml:"bar"` - Foo string `json:"foo,omitempty" xml:"foo"` + Bar *string `json:"bar,omitempty" xml:"bar"` + + Foo *string `json:"foo,omitempty" xml:"foo"` + +} + +// GetBar returns the Bar field if non-nil, zero value otherwise. +func (o *HasOnlyReadOnly) GetBar() string { + if o == nil || o.Bar == nil { + var ret string + return ret + } + return *o.Bar +} + +// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *HasOnlyReadOnly) GetBarOk() (string, bool) { + if o == nil || o.Bar == nil { + var ret string + return ret, false + } + return *o.Bar, true +} + +// HasBar returns a boolean if a field has been set. +func (o *HasOnlyReadOnly) HasBar() bool { + if o != nil && o.Bar != nil { + return true + } + + return false +} + +// SetBar gets a reference to the given string and assigns it to the Bar field. +func (o *HasOnlyReadOnly) SetBar(v string) { + o.Bar = &v +} + +// GetFoo returns the Foo field if non-nil, zero value otherwise. +func (o *HasOnlyReadOnly) GetFoo() string { + if o == nil || o.Foo == nil { + var ret string + return ret + } + return *o.Foo } + +// GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *HasOnlyReadOnly) GetFooOk() (string, bool) { + if o == nil || o.Foo == nil { + var ret string + return ret, false + } + return *o.Foo, true +} + +// HasFoo returns a boolean if a field has been set. +func (o *HasOnlyReadOnly) HasFoo() bool { + if o != nil && o.Foo != nil { + return true + } + + return false +} + +// SetFoo gets a reference to the given string and assigns it to the Foo field. +func (o *HasOnlyReadOnly) SetFoo(v string) { + o.Foo = &v +} + + +func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Bar != nil { + toSerialize["bar"] = o.Bar + } + if o.Foo != nil { + toSerialize["foo"] = o.Foo + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_list.go b/samples/client/petstore/go/go-petstore-withXml/model_list.go index 86b6d67a5fd0..073d6508f114 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_list.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_list.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type List struct { - Var123List string `json:"123-list,omitempty" xml:"123-list"` + Var123List *string `json:"123-list,omitempty" xml:"123-list"` + +} + +// GetVar123List returns the Var123List field if non-nil, zero value otherwise. +func (o *List) GetVar123List() string { + if o == nil || o.Var123List == nil { + var ret string + return ret + } + return *o.Var123List +} + +// GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *List) GetVar123ListOk() (string, bool) { + if o == nil || o.Var123List == nil { + var ret string + return ret, false + } + return *o.Var123List, true +} + +// HasVar123List returns a boolean if a field has been set. +func (o *List) HasVar123List() bool { + if o != nil && o.Var123List != nil { + return true + } + + return false } + +// SetVar123List gets a reference to the given string and assigns it to the Var123List field. +func (o *List) SetVar123List(v string) { + o.Var123List = &v +} + + +func (o List) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Var123List != nil { + toSerialize["123-list"] = o.Var123List + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_map_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_map_test_.go index 1c8e4459206f..bcdcf4fdf1e6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_map_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_map_test_.go @@ -9,10 +9,169 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type MapTest struct { - MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty" xml:"map_map_of_string"` - MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty" xml:"map_of_enum_string"` - DirectMap map[string]bool `json:"direct_map,omitempty" xml:"direct_map"` - IndirectMap map[string]bool `json:"indirect_map,omitempty" xml:"indirect_map"` + MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty" xml:"map_map_of_string"` + + MapOfEnumString *map[string]string `json:"map_of_enum_string,omitempty" xml:"map_of_enum_string"` + + DirectMap *map[string]bool `json:"direct_map,omitempty" xml:"direct_map"` + + IndirectMap *map[string]bool `json:"indirect_map,omitempty" xml:"indirect_map"` + +} + +// GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. +func (o *MapTest) GetMapMapOfString() map[string]map[string]string { + if o == nil || o.MapMapOfString == nil { + var ret map[string]map[string]string + return ret + } + return *o.MapMapOfString } + +// GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool) { + if o == nil || o.MapMapOfString == nil { + var ret map[string]map[string]string + return ret, false + } + return *o.MapMapOfString, true +} + +// HasMapMapOfString returns a boolean if a field has been set. +func (o *MapTest) HasMapMapOfString() bool { + if o != nil && o.MapMapOfString != nil { + return true + } + + return false +} + +// SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field. +func (o *MapTest) SetMapMapOfString(v map[string]map[string]string) { + o.MapMapOfString = &v +} + +// GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. +func (o *MapTest) GetMapOfEnumString() map[string]string { + if o == nil || o.MapOfEnumString == nil { + var ret map[string]string + return ret + } + return *o.MapOfEnumString +} + +// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool) { + if o == nil || o.MapOfEnumString == nil { + var ret map[string]string + return ret, false + } + return *o.MapOfEnumString, true +} + +// HasMapOfEnumString returns a boolean if a field has been set. +func (o *MapTest) HasMapOfEnumString() bool { + if o != nil && o.MapOfEnumString != nil { + return true + } + + return false +} + +// SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field. +func (o *MapTest) SetMapOfEnumString(v map[string]string) { + o.MapOfEnumString = &v +} + +// GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. +func (o *MapTest) GetDirectMap() map[string]bool { + if o == nil || o.DirectMap == nil { + var ret map[string]bool + return ret + } + return *o.DirectMap +} + +// GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetDirectMapOk() (map[string]bool, bool) { + if o == nil || o.DirectMap == nil { + var ret map[string]bool + return ret, false + } + return *o.DirectMap, true +} + +// HasDirectMap returns a boolean if a field has been set. +func (o *MapTest) HasDirectMap() bool { + if o != nil && o.DirectMap != nil { + return true + } + + return false +} + +// SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field. +func (o *MapTest) SetDirectMap(v map[string]bool) { + o.DirectMap = &v +} + +// GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. +func (o *MapTest) GetIndirectMap() map[string]bool { + if o == nil || o.IndirectMap == nil { + var ret map[string]bool + return ret + } + return *o.IndirectMap +} + +// GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool) { + if o == nil || o.IndirectMap == nil { + var ret map[string]bool + return ret, false + } + return *o.IndirectMap, true +} + +// HasIndirectMap returns a boolean if a field has been set. +func (o *MapTest) HasIndirectMap() bool { + if o != nil && o.IndirectMap != nil { + return true + } + + return false +} + +// SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field. +func (o *MapTest) SetIndirectMap(v map[string]bool) { + o.IndirectMap = &v +} + + +func (o MapTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MapMapOfString != nil { + toSerialize["map_map_of_string"] = o.MapMapOfString + } + if o.MapOfEnumString != nil { + toSerialize["map_of_enum_string"] = o.MapOfEnumString + } + if o.DirectMap != nil { + toSerialize["direct_map"] = o.DirectMap + } + if o.IndirectMap != nil { + toSerialize["indirect_map"] = o.IndirectMap + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go index 099ebd1c28a1..019b751556f8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go @@ -11,10 +11,130 @@ package petstore import ( "time" + "encoding/json" ) type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid string `json:"uuid,omitempty" xml:"uuid"` - DateTime time.Time `json:"dateTime,omitempty" xml:"dateTime"` - Map map[string]Animal `json:"map,omitempty" xml:"map"` + Uuid *string `json:"uuid,omitempty" xml:"uuid"` + + DateTime *time.Time `json:"dateTime,omitempty" xml:"dateTime"` + + Map *map[string]Animal `json:"map,omitempty" xml:"map"` + +} + +// GetUuid returns the Uuid field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { + if o == nil || o.Uuid == nil { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { + if o == nil || o.Uuid == nil { + var ret string + return ret, false + } + return *o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool { + if o != nil && o.Uuid != nil { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) { + o.Uuid = &v +} + +// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret + } + return *o.DateTime } + +// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool) { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret, false + } + return *o.DateTime, true +} + +// HasDateTime returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool { + if o != nil && o.DateTime != nil { + return true + } + + return false +} + +// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time) { + o.DateTime = &v +} + +// GetMap returns the Map field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal { + if o == nil || o.Map == nil { + var ret map[string]Animal + return ret + } + return *o.Map +} + +// GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool) { + if o == nil || o.Map == nil { + var ret map[string]Animal + return ret, false + } + return *o.Map, true +} + +// HasMap returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool { + if o != nil && o.Map != nil { + return true + } + + return false +} + +// SetMap gets a reference to the given map[string]Animal and assigns it to the Map field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal) { + o.Map = &v +} + + +func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Uuid != nil { + toSerialize["uuid"] = o.Uuid + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Map != nil { + toSerialize["map"] = o.Map + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_name.go b/samples/client/petstore/go/go-petstore-withXml/model_name.go index 684f282beb72..e30a33166e6f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_name.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_name.go @@ -9,11 +9,174 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) // Model for testing model name same as property name type Name struct { - Name int32 `json:"name" xml:"name"` - SnakeCase int32 `json:"snake_case,omitempty" xml:"snake_case"` - Property string `json:"property,omitempty" xml:"property"` - Var123Number int32 `json:"123Number,omitempty" xml:"123Number"` + Name *int32 `json:"name,omitempty" xml:"name"` + + SnakeCase *int32 `json:"snake_case,omitempty" xml:"snake_case"` + + Property *string `json:"property,omitempty" xml:"property"` + + Var123Number *int32 `json:"123Number,omitempty" xml:"123Number"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Name) GetName() int32 { + if o == nil || o.Name == nil { + var ret int32 + return ret + } + return *o.Name } + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetNameOk() (int32, bool) { + if o == nil || o.Name == nil { + var ret int32 + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Name) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given int32 and assigns it to the Name field. +func (o *Name) SetName(v int32) { + o.Name = &v +} + +// GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. +func (o *Name) GetSnakeCase() int32 { + if o == nil || o.SnakeCase == nil { + var ret int32 + return ret + } + return *o.SnakeCase +} + +// GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetSnakeCaseOk() (int32, bool) { + if o == nil || o.SnakeCase == nil { + var ret int32 + return ret, false + } + return *o.SnakeCase, true +} + +// HasSnakeCase returns a boolean if a field has been set. +func (o *Name) HasSnakeCase() bool { + if o != nil && o.SnakeCase != nil { + return true + } + + return false +} + +// SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field. +func (o *Name) SetSnakeCase(v int32) { + o.SnakeCase = &v +} + +// GetProperty returns the Property field if non-nil, zero value otherwise. +func (o *Name) GetProperty() string { + if o == nil || o.Property == nil { + var ret string + return ret + } + return *o.Property +} + +// GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetPropertyOk() (string, bool) { + if o == nil || o.Property == nil { + var ret string + return ret, false + } + return *o.Property, true +} + +// HasProperty returns a boolean if a field has been set. +func (o *Name) HasProperty() bool { + if o != nil && o.Property != nil { + return true + } + + return false +} + +// SetProperty gets a reference to the given string and assigns it to the Property field. +func (o *Name) SetProperty(v string) { + o.Property = &v +} + +// GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. +func (o *Name) GetVar123Number() int32 { + if o == nil || o.Var123Number == nil { + var ret int32 + return ret + } + return *o.Var123Number +} + +// GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetVar123NumberOk() (int32, bool) { + if o == nil || o.Var123Number == nil { + var ret int32 + return ret, false + } + return *o.Var123Number, true +} + +// HasVar123Number returns a boolean if a field has been set. +func (o *Name) HasVar123Number() bool { + if o != nil && o.Var123Number != nil { + return true + } + + return false +} + +// SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field. +func (o *Name) SetVar123Number(v int32) { + o.Var123Number = &v +} + + +func (o Name) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Name") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.SnakeCase != nil { + toSerialize["snake_case"] = o.SnakeCase + } + if o.Property != nil { + toSerialize["property"] = o.Property + } + if o.Var123Number != nil { + toSerialize["123Number"] = o.Var123Number + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_number_only.go b/samples/client/petstore/go/go-petstore-withXml/model_number_only.go index 9148cddf4aec..2f6a915999df 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_number_only.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_number_only.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type NumberOnly struct { - JustNumber float32 `json:"JustNumber,omitempty" xml:"JustNumber"` + JustNumber *float32 `json:"JustNumber,omitempty" xml:"JustNumber"` + +} + +// GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. +func (o *NumberOnly) GetJustNumber() float32 { + if o == nil || o.JustNumber == nil { + var ret float32 + return ret + } + return *o.JustNumber +} + +// GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NumberOnly) GetJustNumberOk() (float32, bool) { + if o == nil || o.JustNumber == nil { + var ret float32 + return ret, false + } + return *o.JustNumber, true +} + +// HasJustNumber returns a boolean if a field has been set. +func (o *NumberOnly) HasJustNumber() bool { + if o != nil && o.JustNumber != nil { + return true + } + + return false } + +// SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field. +func (o *NumberOnly) SetJustNumber(v float32) { + o.JustNumber = &v +} + + +func (o NumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.JustNumber != nil { + toSerialize["JustNumber"] = o.JustNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_order.go b/samples/client/petstore/go/go-petstore-withXml/model_order.go index c4a731b72ca7..9152425b9223 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_order.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_order.go @@ -11,14 +11,245 @@ package petstore import ( "time" + "encoding/json" ) type Order struct { - Id int64 `json:"id,omitempty" xml:"id"` - PetId int64 `json:"petId,omitempty" xml:"petId"` - Quantity int32 `json:"quantity,omitempty" xml:"quantity"` - ShipDate time.Time `json:"shipDate,omitempty" xml:"shipDate"` + Id *int64 `json:"id,omitempty" xml:"id"` + + PetId *int64 `json:"petId,omitempty" xml:"petId"` + + Quantity *int32 `json:"quantity,omitempty" xml:"quantity"` + + ShipDate *time.Time `json:"shipDate,omitempty" xml:"shipDate"` + // Order Status - Status string `json:"status,omitempty" xml:"status"` - Complete bool `json:"complete,omitempty" xml:"complete"` + Status *string `json:"status,omitempty" xml:"status"` + + Complete *bool `json:"complete,omitempty" xml:"complete"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Order) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Order) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Order) SetId(v int64) { + o.Id = &v +} + +// GetPetId returns the PetId field if non-nil, zero value otherwise. +func (o *Order) GetPetId() int64 { + if o == nil || o.PetId == nil { + var ret int64 + return ret + } + return *o.PetId +} + +// GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetPetIdOk() (int64, bool) { + if o == nil || o.PetId == nil { + var ret int64 + return ret, false + } + return *o.PetId, true +} + +// HasPetId returns a boolean if a field has been set. +func (o *Order) HasPetId() bool { + if o != nil && o.PetId != nil { + return true + } + + return false +} + +// SetPetId gets a reference to the given int64 and assigns it to the PetId field. +func (o *Order) SetPetId(v int64) { + o.PetId = &v +} + +// GetQuantity returns the Quantity field if non-nil, zero value otherwise. +func (o *Order) GetQuantity() int32 { + if o == nil || o.Quantity == nil { + var ret int32 + return ret + } + return *o.Quantity +} + +// GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetQuantityOk() (int32, bool) { + if o == nil || o.Quantity == nil { + var ret int32 + return ret, false + } + return *o.Quantity, true +} + +// HasQuantity returns a boolean if a field has been set. +func (o *Order) HasQuantity() bool { + if o != nil && o.Quantity != nil { + return true + } + + return false +} + +// SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. +func (o *Order) SetQuantity(v int32) { + o.Quantity = &v } + +// GetShipDate returns the ShipDate field if non-nil, zero value otherwise. +func (o *Order) GetShipDate() time.Time { + if o == nil || o.ShipDate == nil { + var ret time.Time + return ret + } + return *o.ShipDate +} + +// GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetShipDateOk() (time.Time, bool) { + if o == nil || o.ShipDate == nil { + var ret time.Time + return ret, false + } + return *o.ShipDate, true +} + +// HasShipDate returns a boolean if a field has been set. +func (o *Order) HasShipDate() bool { + if o != nil && o.ShipDate != nil { + return true + } + + return false +} + +// SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field. +func (o *Order) SetShipDate(v time.Time) { + o.ShipDate = &v +} + +// GetStatus returns the Status field if non-nil, zero value otherwise. +func (o *Order) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetStatusOk() (string, bool) { + if o == nil || o.Status == nil { + var ret string + return ret, false + } + return *o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Order) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Order) SetStatus(v string) { + o.Status = &v +} + +// GetComplete returns the Complete field if non-nil, zero value otherwise. +func (o *Order) GetComplete() bool { + if o == nil || o.Complete == nil { + var ret bool + return ret + } + return *o.Complete +} + +// GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetCompleteOk() (bool, bool) { + if o == nil || o.Complete == nil { + var ret bool + return ret, false + } + return *o.Complete, true +} + +// HasComplete returns a boolean if a field has been set. +func (o *Order) HasComplete() bool { + if o != nil && o.Complete != nil { + return true + } + + return false +} + +// SetComplete gets a reference to the given bool and assigns it to the Complete field. +func (o *Order) SetComplete(v bool) { + o.Complete = &v +} + + +func (o Order) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.PetId != nil { + toSerialize["petId"] = o.PetId + } + if o.Quantity != nil { + toSerialize["quantity"] = o.Quantity + } + if o.ShipDate != nil { + toSerialize["shipDate"] = o.ShipDate + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Complete != nil { + toSerialize["complete"] = o.Complete + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_outer_composite.go b/samples/client/petstore/go/go-petstore-withXml/model_outer_composite.go index 0a6cc434b976..a08b9f86291d 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_outer_composite.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_outer_composite.go @@ -9,9 +9,131 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type OuterComposite struct { - MyNumber float32 `json:"my_number,omitempty" xml:"my_number"` - MyString string `json:"my_string,omitempty" xml:"my_string"` - MyBoolean bool `json:"my_boolean,omitempty" xml:"my_boolean"` + MyNumber *float32 `json:"my_number,omitempty" xml:"my_number"` + + MyString *string `json:"my_string,omitempty" xml:"my_string"` + + MyBoolean *bool `json:"my_boolean,omitempty" xml:"my_boolean"` + +} + +// GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyNumber() float32 { + if o == nil || o.MyNumber == nil { + var ret float32 + return ret + } + return *o.MyNumber +} + +// GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyNumberOk() (float32, bool) { + if o == nil || o.MyNumber == nil { + var ret float32 + return ret, false + } + return *o.MyNumber, true +} + +// HasMyNumber returns a boolean if a field has been set. +func (o *OuterComposite) HasMyNumber() bool { + if o != nil && o.MyNumber != nil { + return true + } + + return false +} + +// SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field. +func (o *OuterComposite) SetMyNumber(v float32) { + o.MyNumber = &v +} + +// GetMyString returns the MyString field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyString() string { + if o == nil || o.MyString == nil { + var ret string + return ret + } + return *o.MyString } + +// GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyStringOk() (string, bool) { + if o == nil || o.MyString == nil { + var ret string + return ret, false + } + return *o.MyString, true +} + +// HasMyString returns a boolean if a field has been set. +func (o *OuterComposite) HasMyString() bool { + if o != nil && o.MyString != nil { + return true + } + + return false +} + +// SetMyString gets a reference to the given string and assigns it to the MyString field. +func (o *OuterComposite) SetMyString(v string) { + o.MyString = &v +} + +// GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyBoolean() bool { + if o == nil || o.MyBoolean == nil { + var ret bool + return ret + } + return *o.MyBoolean +} + +// GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyBooleanOk() (bool, bool) { + if o == nil || o.MyBoolean == nil { + var ret bool + return ret, false + } + return *o.MyBoolean, true +} + +// HasMyBoolean returns a boolean if a field has been set. +func (o *OuterComposite) HasMyBoolean() bool { + if o != nil && o.MyBoolean != nil { + return true + } + + return false +} + +// SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field. +func (o *OuterComposite) SetMyBoolean(v bool) { + o.MyBoolean = &v +} + + +func (o OuterComposite) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MyNumber != nil { + toSerialize["my_number"] = o.MyNumber + } + if o.MyString != nil { + toSerialize["my_string"] = o.MyString + } + if o.MyBoolean != nil { + toSerialize["my_boolean"] = o.MyBoolean + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go b/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go index c6b28556bf2f..73cc6596e080 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go @@ -16,4 +16,5 @@ const ( PLACED OuterEnum = "placed" APPROVED OuterEnum = "approved" DELIVERED OuterEnum = "delivered" -) \ No newline at end of file +) + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_pet.go b/samples/client/petstore/go/go-petstore-withXml/model_pet.go index eb0d4085f772..07e60cd9ba28 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_pet.go @@ -9,13 +9,253 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) type Pet struct { - Id int64 `json:"id,omitempty" xml:"id"` - Category Category `json:"category,omitempty" xml:"category"` - Name string `json:"name" xml:"name"` - PhotoUrls []string `json:"photoUrls" xml:"photoUrls"` - Tags []Tag `json:"tags,omitempty" xml:"tags"` + Id *int64 `json:"id,omitempty" xml:"id"` + + Category *Category `json:"category,omitempty" xml:"category"` + + Name *string `json:"name,omitempty" xml:"name"` + + PhotoUrls *[]string `json:"photoUrls,omitempty" xml:"photoUrls"` + + Tags *[]Tag `json:"tags,omitempty" xml:"tags"` + // pet status in the store - Status string `json:"status,omitempty" xml:"status"` + Status *string `json:"status,omitempty" xml:"status"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Pet) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Pet) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Pet) SetId(v int64) { + o.Id = &v +} + +// GetCategory returns the Category field if non-nil, zero value otherwise. +func (o *Pet) GetCategory() Category { + if o == nil || o.Category == nil { + var ret Category + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetCategoryOk() (Category, bool) { + if o == nil || o.Category == nil { + var ret Category + return ret, false + } + return *o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *Pet) HasCategory() bool { + if o != nil && o.Category != nil { + return true + } + + return false +} + +// SetCategory gets a reference to the given Category and assigns it to the Category field. +func (o *Pet) SetCategory(v Category) { + o.Category = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Pet) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Pet) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Pet) SetName(v string) { + o.Name = &v } + +// GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. +func (o *Pet) GetPhotoUrls() []string { + if o == nil || o.PhotoUrls == nil { + var ret []string + return ret + } + return *o.PhotoUrls +} + +// GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { + if o == nil || o.PhotoUrls == nil { + var ret []string + return ret, false + } + return *o.PhotoUrls, true +} + +// HasPhotoUrls returns a boolean if a field has been set. +func (o *Pet) HasPhotoUrls() bool { + if o != nil && o.PhotoUrls != nil { + return true + } + + return false +} + +// SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. +func (o *Pet) SetPhotoUrls(v []string) { + o.PhotoUrls = &v +} + +// GetTags returns the Tags field if non-nil, zero value otherwise. +func (o *Pet) GetTags() []Tag { + if o == nil || o.Tags == nil { + var ret []Tag + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetTagsOk() ([]Tag, bool) { + if o == nil || o.Tags == nil { + var ret []Tag + return ret, false + } + return *o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Pet) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []Tag and assigns it to the Tags field. +func (o *Pet) SetTags(v []Tag) { + o.Tags = &v +} + +// GetStatus returns the Status field if non-nil, zero value otherwise. +func (o *Pet) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetStatusOk() (string, bool) { + if o == nil || o.Status == nil { + var ret string + return ret, false + } + return *o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Pet) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Pet) SetStatus(v string) { + o.Status = &v +} + + +func (o Pet) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Category != nil { + toSerialize["category"] = o.Category + } + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Pet") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.PhotoUrls == nil { + return nil, errors.New("PhotoUrls is required and not nullable, but was not set on Pet") + } + if o.PhotoUrls != nil { + toSerialize["photoUrls"] = o.PhotoUrls + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_read_only_first.go b/samples/client/petstore/go/go-petstore-withXml/model_read_only_first.go index 47da7a75c835..a62fca256de8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_read_only_first.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_read_only_first.go @@ -9,8 +9,93 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type ReadOnlyFirst struct { - Bar string `json:"bar,omitempty" xml:"bar"` - Baz string `json:"baz,omitempty" xml:"baz"` + Bar *string `json:"bar,omitempty" xml:"bar"` + + Baz *string `json:"baz,omitempty" xml:"baz"` + +} + +// GetBar returns the Bar field if non-nil, zero value otherwise. +func (o *ReadOnlyFirst) GetBar() string { + if o == nil || o.Bar == nil { + var ret string + return ret + } + return *o.Bar +} + +// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ReadOnlyFirst) GetBarOk() (string, bool) { + if o == nil || o.Bar == nil { + var ret string + return ret, false + } + return *o.Bar, true +} + +// HasBar returns a boolean if a field has been set. +func (o *ReadOnlyFirst) HasBar() bool { + if o != nil && o.Bar != nil { + return true + } + + return false +} + +// SetBar gets a reference to the given string and assigns it to the Bar field. +func (o *ReadOnlyFirst) SetBar(v string) { + o.Bar = &v +} + +// GetBaz returns the Baz field if non-nil, zero value otherwise. +func (o *ReadOnlyFirst) GetBaz() string { + if o == nil || o.Baz == nil { + var ret string + return ret + } + return *o.Baz } + +// GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ReadOnlyFirst) GetBazOk() (string, bool) { + if o == nil || o.Baz == nil { + var ret string + return ret, false + } + return *o.Baz, true +} + +// HasBaz returns a boolean if a field has been set. +func (o *ReadOnlyFirst) HasBaz() bool { + if o != nil && o.Baz != nil { + return true + } + + return false +} + +// SetBaz gets a reference to the given string and assigns it to the Baz field. +func (o *ReadOnlyFirst) SetBaz(v string) { + o.Baz = &v +} + + +func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Bar != nil { + toSerialize["bar"] = o.Bar + } + if o.Baz != nil { + toSerialize["baz"] = o.Baz + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_return.go b/samples/client/petstore/go/go-petstore-withXml/model_return.go index 7ec34d521edd..3fd3de9d0da6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_return.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_return.go @@ -9,8 +9,56 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) // Model for testing reserved words type Return struct { - Return int32 `json:"return,omitempty" xml:"return"` + Return *int32 `json:"return,omitempty" xml:"return"` + +} + +// GetReturn returns the Return field if non-nil, zero value otherwise. +func (o *Return) GetReturn() int32 { + if o == nil || o.Return == nil { + var ret int32 + return ret + } + return *o.Return +} + +// GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Return) GetReturnOk() (int32, bool) { + if o == nil || o.Return == nil { + var ret int32 + return ret, false + } + return *o.Return, true +} + +// HasReturn returns a boolean if a field has been set. +func (o *Return) HasReturn() bool { + if o != nil && o.Return != nil { + return true + } + + return false } + +// SetReturn gets a reference to the given int32 and assigns it to the Return field. +func (o *Return) SetReturn(v int32) { + o.Return = &v +} + + +func (o Return) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Return != nil { + toSerialize["return"] = o.Return + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_special_model_name.go b/samples/client/petstore/go/go-petstore-withXml/model_special_model_name.go index be2037eb6817..80a149f889ac 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_special_model_name.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_special_model_name.go @@ -9,7 +9,55 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type SpecialModelName struct { - SpecialPropertyName int64 `json:"$special[property.name],omitempty" xml:"$special[property.name]"` + SpecialPropertyName *int64 `json:"$special[property.name],omitempty" xml:"$special[property.name]"` + +} + +// GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. +func (o *SpecialModelName) GetSpecialPropertyName() int64 { + if o == nil || o.SpecialPropertyName == nil { + var ret int64 + return ret + } + return *o.SpecialPropertyName +} + +// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) { + if o == nil || o.SpecialPropertyName == nil { + var ret int64 + return ret, false + } + return *o.SpecialPropertyName, true +} + +// HasSpecialPropertyName returns a boolean if a field has been set. +func (o *SpecialModelName) HasSpecialPropertyName() bool { + if o != nil && o.SpecialPropertyName != nil { + return true + } + + return false } + +// SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field. +func (o *SpecialModelName) SetSpecialPropertyName(v int64) { + o.SpecialPropertyName = &v +} + + +func (o SpecialModelName) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SpecialPropertyName != nil { + toSerialize["$special[property.name]"] = o.SpecialPropertyName + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_tag.go b/samples/client/petstore/go/go-petstore-withXml/model_tag.go index fb2232a6bf47..892f073f9762 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_tag.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_tag.go @@ -9,8 +9,93 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type Tag struct { - Id int64 `json:"id,omitempty" xml:"id"` - Name string `json:"name,omitempty" xml:"name"` + Id *int64 `json:"id,omitempty" xml:"id"` + + Name *string `json:"name,omitempty" xml:"name"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Tag) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Tag) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Tag) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Tag) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name } + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Tag) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Tag) SetName(v string) { + o.Name = &v +} + + +func (o Tag) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_type_holder_default.go b/samples/client/petstore/go/go-petstore-withXml/model_type_holder_default.go index b4883cac9599..8a4e9d97a7af 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_type_holder_default.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_type_holder_default.go @@ -9,11 +9,223 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) type TypeHolderDefault struct { - StringItem string `json:"string_item" xml:"string_item"` - NumberItem float32 `json:"number_item" xml:"number_item"` - IntegerItem int32 `json:"integer_item" xml:"integer_item"` - BoolItem bool `json:"bool_item" xml:"bool_item"` - ArrayItem []int32 `json:"array_item" xml:"array_item"` + StringItem *string `json:"string_item,omitempty" xml:"string_item"` + + NumberItem *float32 `json:"number_item,omitempty" xml:"number_item"` + + IntegerItem *int32 `json:"integer_item,omitempty" xml:"integer_item"` + + BoolItem *bool `json:"bool_item,omitempty" xml:"bool_item"` + + ArrayItem *[]int32 `json:"array_item,omitempty" xml:"array_item"` + +} + +// GetStringItem returns the StringItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetStringItem() string { + if o == nil || o.StringItem == nil { + var ret string + return ret + } + return *o.StringItem +} + +// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetStringItemOk() (string, bool) { + if o == nil || o.StringItem == nil { + var ret string + return ret, false + } + return *o.StringItem, true +} + +// HasStringItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasStringItem() bool { + if o != nil && o.StringItem != nil { + return true + } + + return false +} + +// SetStringItem gets a reference to the given string and assigns it to the StringItem field. +func (o *TypeHolderDefault) SetStringItem(v string) { + o.StringItem = &v } + +// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetNumberItem() float32 { + if o == nil || o.NumberItem == nil { + var ret float32 + return ret + } + return *o.NumberItem +} + +// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool) { + if o == nil || o.NumberItem == nil { + var ret float32 + return ret, false + } + return *o.NumberItem, true +} + +// HasNumberItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasNumberItem() bool { + if o != nil && o.NumberItem != nil { + return true + } + + return false +} + +// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +func (o *TypeHolderDefault) SetNumberItem(v float32) { + o.NumberItem = &v +} + +// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetIntegerItem() int32 { + if o == nil || o.IntegerItem == nil { + var ret int32 + return ret + } + return *o.IntegerItem +} + +// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool) { + if o == nil || o.IntegerItem == nil { + var ret int32 + return ret, false + } + return *o.IntegerItem, true +} + +// HasIntegerItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasIntegerItem() bool { + if o != nil && o.IntegerItem != nil { + return true + } + + return false +} + +// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. +func (o *TypeHolderDefault) SetIntegerItem(v int32) { + o.IntegerItem = &v +} + +// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetBoolItem() bool { + if o == nil || o.BoolItem == nil { + var ret bool + return ret + } + return *o.BoolItem +} + +// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool) { + if o == nil || o.BoolItem == nil { + var ret bool + return ret, false + } + return *o.BoolItem, true +} + +// HasBoolItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasBoolItem() bool { + if o != nil && o.BoolItem != nil { + return true + } + + return false +} + +// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. +func (o *TypeHolderDefault) SetBoolItem(v bool) { + o.BoolItem = &v +} + +// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetArrayItem() []int32 { + if o == nil || o.ArrayItem == nil { + var ret []int32 + return ret + } + return *o.ArrayItem +} + +// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool) { + if o == nil || o.ArrayItem == nil { + var ret []int32 + return ret, false + } + return *o.ArrayItem, true +} + +// HasArrayItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasArrayItem() bool { + if o != nil && o.ArrayItem != nil { + return true + } + + return false +} + +// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. +func (o *TypeHolderDefault) SetArrayItem(v []int32) { + o.ArrayItem = &v +} + + +func (o TypeHolderDefault) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.StringItem == nil { + return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.StringItem != nil { + toSerialize["string_item"] = o.StringItem + } + if o.NumberItem == nil { + return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.NumberItem != nil { + toSerialize["number_item"] = o.NumberItem + } + if o.IntegerItem == nil { + return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.IntegerItem != nil { + toSerialize["integer_item"] = o.IntegerItem + } + if o.BoolItem == nil { + return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.BoolItem != nil { + toSerialize["bool_item"] = o.BoolItem + } + if o.ArrayItem == nil { + return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.ArrayItem != nil { + toSerialize["array_item"] = o.ArrayItem + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_type_holder_example.go b/samples/client/petstore/go/go-petstore-withXml/model_type_holder_example.go index af3fac4aa6e7..4ff4dec0f55e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_type_holder_example.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_type_holder_example.go @@ -9,11 +9,223 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" + "errors" +) type TypeHolderExample struct { - StringItem string `json:"string_item" xml:"string_item"` - NumberItem float32 `json:"number_item" xml:"number_item"` - IntegerItem int32 `json:"integer_item" xml:"integer_item"` - BoolItem bool `json:"bool_item" xml:"bool_item"` - ArrayItem []int32 `json:"array_item" xml:"array_item"` + StringItem *string `json:"string_item,omitempty" xml:"string_item"` + + NumberItem *float32 `json:"number_item,omitempty" xml:"number_item"` + + IntegerItem *int32 `json:"integer_item,omitempty" xml:"integer_item"` + + BoolItem *bool `json:"bool_item,omitempty" xml:"bool_item"` + + ArrayItem *[]int32 `json:"array_item,omitempty" xml:"array_item"` + +} + +// GetStringItem returns the StringItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetStringItem() string { + if o == nil || o.StringItem == nil { + var ret string + return ret + } + return *o.StringItem +} + +// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetStringItemOk() (string, bool) { + if o == nil || o.StringItem == nil { + var ret string + return ret, false + } + return *o.StringItem, true +} + +// HasStringItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasStringItem() bool { + if o != nil && o.StringItem != nil { + return true + } + + return false +} + +// SetStringItem gets a reference to the given string and assigns it to the StringItem field. +func (o *TypeHolderExample) SetStringItem(v string) { + o.StringItem = &v } + +// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetNumberItem() float32 { + if o == nil || o.NumberItem == nil { + var ret float32 + return ret + } + return *o.NumberItem +} + +// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetNumberItemOk() (float32, bool) { + if o == nil || o.NumberItem == nil { + var ret float32 + return ret, false + } + return *o.NumberItem, true +} + +// HasNumberItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasNumberItem() bool { + if o != nil && o.NumberItem != nil { + return true + } + + return false +} + +// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +func (o *TypeHolderExample) SetNumberItem(v float32) { + o.NumberItem = &v +} + +// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetIntegerItem() int32 { + if o == nil || o.IntegerItem == nil { + var ret int32 + return ret + } + return *o.IntegerItem +} + +// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool) { + if o == nil || o.IntegerItem == nil { + var ret int32 + return ret, false + } + return *o.IntegerItem, true +} + +// HasIntegerItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasIntegerItem() bool { + if o != nil && o.IntegerItem != nil { + return true + } + + return false +} + +// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. +func (o *TypeHolderExample) SetIntegerItem(v int32) { + o.IntegerItem = &v +} + +// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetBoolItem() bool { + if o == nil || o.BoolItem == nil { + var ret bool + return ret + } + return *o.BoolItem +} + +// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetBoolItemOk() (bool, bool) { + if o == nil || o.BoolItem == nil { + var ret bool + return ret, false + } + return *o.BoolItem, true +} + +// HasBoolItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasBoolItem() bool { + if o != nil && o.BoolItem != nil { + return true + } + + return false +} + +// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. +func (o *TypeHolderExample) SetBoolItem(v bool) { + o.BoolItem = &v +} + +// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetArrayItem() []int32 { + if o == nil || o.ArrayItem == nil { + var ret []int32 + return ret + } + return *o.ArrayItem +} + +// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool) { + if o == nil || o.ArrayItem == nil { + var ret []int32 + return ret, false + } + return *o.ArrayItem, true +} + +// HasArrayItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasArrayItem() bool { + if o != nil && o.ArrayItem != nil { + return true + } + + return false +} + +// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. +func (o *TypeHolderExample) SetArrayItem(v []int32) { + o.ArrayItem = &v +} + + +func (o TypeHolderExample) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.StringItem == nil { + return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.StringItem != nil { + toSerialize["string_item"] = o.StringItem + } + if o.NumberItem == nil { + return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.NumberItem != nil { + toSerialize["number_item"] = o.NumberItem + } + if o.IntegerItem == nil { + return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.IntegerItem != nil { + toSerialize["integer_item"] = o.IntegerItem + } + if o.BoolItem == nil { + return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.BoolItem != nil { + toSerialize["bool_item"] = o.BoolItem + } + if o.ArrayItem == nil { + return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.ArrayItem != nil { + toSerialize["array_item"] = o.ArrayItem + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_user.go b/samples/client/petstore/go/go-petstore-withXml/model_user.go index 27f1f67e4274..0d0d49201f18 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_user.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_user.go @@ -9,15 +9,322 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type User struct { - Id int64 `json:"id,omitempty" xml:"id"` - Username string `json:"username,omitempty" xml:"username"` - FirstName string `json:"firstName,omitempty" xml:"firstName"` - LastName string `json:"lastName,omitempty" xml:"lastName"` - Email string `json:"email,omitempty" xml:"email"` - Password string `json:"password,omitempty" xml:"password"` - Phone string `json:"phone,omitempty" xml:"phone"` + Id *int64 `json:"id,omitempty" xml:"id"` + + Username *string `json:"username,omitempty" xml:"username"` + + FirstName *string `json:"firstName,omitempty" xml:"firstName"` + + LastName *string `json:"lastName,omitempty" xml:"lastName"` + + Email *string `json:"email,omitempty" xml:"email"` + + Password *string `json:"password,omitempty" xml:"password"` + + Phone *string `json:"phone,omitempty" xml:"phone"` + // User Status - UserStatus int32 `json:"userStatus,omitempty" xml:"userStatus"` + UserStatus *int32 `json:"userStatus,omitempty" xml:"userStatus"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *User) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *User) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *User) SetId(v int64) { + o.Id = &v } + +// GetUsername returns the Username field if non-nil, zero value otherwise. +func (o *User) GetUsername() string { + if o == nil || o.Username == nil { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (string, bool) { + if o == nil || o.Username == nil { + var ret string + return ret, false + } + return *o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && o.Username != nil { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *User) SetUsername(v string) { + o.Username = &v +} + +// GetFirstName returns the FirstName field if non-nil, zero value otherwise. +func (o *User) GetFirstName() string { + if o == nil || o.FirstName == nil { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetFirstNameOk() (string, bool) { + if o == nil || o.FirstName == nil { + var ret string + return ret, false + } + return *o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *User) HasFirstName() bool { + if o != nil && o.FirstName != nil { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *User) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field if non-nil, zero value otherwise. +func (o *User) GetLastName() string { + if o == nil || o.LastName == nil { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastNameOk() (string, bool) { + if o == nil || o.LastName == nil { + var ret string + return ret, false + } + return *o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *User) HasLastName() bool { + if o != nil && o.LastName != nil { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *User) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field if non-nil, zero value otherwise. +func (o *User) GetEmail() string { + if o == nil || o.Email == nil { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetEmailOk() (string, bool) { + if o == nil || o.Email == nil { + var ret string + return ret, false + } + return *o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *User) HasEmail() bool { + if o != nil && o.Email != nil { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *User) SetEmail(v string) { + o.Email = &v +} + +// GetPassword returns the Password field if non-nil, zero value otherwise. +func (o *User) GetPassword() string { + if o == nil || o.Password == nil { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordOk() (string, bool) { + if o == nil || o.Password == nil { + var ret string + return ret, false + } + return *o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && o.Password != nil { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v string) { + o.Password = &v +} + +// GetPhone returns the Phone field if non-nil, zero value otherwise. +func (o *User) GetPhone() string { + if o == nil || o.Phone == nil { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPhoneOk() (string, bool) { + if o == nil || o.Phone == nil { + var ret string + return ret, false + } + return *o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *User) HasPhone() bool { + if o != nil && o.Phone != nil { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *User) SetPhone(v string) { + o.Phone = &v +} + +// GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. +func (o *User) GetUserStatus() int32 { + if o == nil || o.UserStatus == nil { + var ret int32 + return ret + } + return *o.UserStatus +} + +// GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUserStatusOk() (int32, bool) { + if o == nil || o.UserStatus == nil { + var ret int32 + return ret, false + } + return *o.UserStatus, true +} + +// HasUserStatus returns a boolean if a field has been set. +func (o *User) HasUserStatus() bool { + if o != nil && o.UserStatus != nil { + return true + } + + return false +} + +// SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field. +func (o *User) SetUserStatus(v int32) { + o.UserStatus = &v +} + + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Username != nil { + toSerialize["username"] = o.Username + } + if o.FirstName != nil { + toSerialize["firstName"] = o.FirstName + } + if o.LastName != nil { + toSerialize["lastName"] = o.LastName + } + if o.Email != nil { + toSerialize["email"] = o.Email + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + if o.Phone != nil { + toSerialize["phone"] = o.Phone + } + if o.UserStatus != nil { + toSerialize["userStatus"] = o.UserStatus + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/model_xml_item.go b/samples/client/petstore/go/go-petstore-withXml/model_xml_item.go index 0276796aca62..1f2912321b4c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_xml_item.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_xml_item.go @@ -9,35 +9,1119 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package petstore +import ( + "encoding/json" +) type XmlItem struct { - AttributeString string `json:"attribute_string,omitempty" xml:"attribute_string,attr"` - AttributeNumber float32 `json:"attribute_number,omitempty" xml:"attribute_number,attr"` - AttributeInteger int32 `json:"attribute_integer,omitempty" xml:"attribute_integer,attr"` - AttributeBoolean bool `json:"attribute_boolean,omitempty" xml:"attribute_boolean,attr"` - WrappedArray []int32 `json:"wrapped_array,omitempty" xml:"wrapped_array"` - NameString string `json:"name_string,omitempty" xml:"name_string"` - NameNumber float32 `json:"name_number,omitempty" xml:"name_number"` - NameInteger int32 `json:"name_integer,omitempty" xml:"name_integer"` - NameBoolean bool `json:"name_boolean,omitempty" xml:"name_boolean"` - NameArray []int32 `json:"name_array,omitempty" xml:"name_array"` - NameWrappedArray []int32 `json:"name_wrapped_array,omitempty" xml:"name_wrapped_array"` - PrefixString string `json:"prefix_string,omitempty" xml:"prefix_string"` - PrefixNumber float32 `json:"prefix_number,omitempty" xml:"prefix_number"` - PrefixInteger int32 `json:"prefix_integer,omitempty" xml:"prefix_integer"` - PrefixBoolean bool `json:"prefix_boolean,omitempty" xml:"prefix_boolean"` - PrefixArray []int32 `json:"prefix_array,omitempty" xml:"prefix_array"` - PrefixWrappedArray []int32 `json:"prefix_wrapped_array,omitempty" xml:"prefix_wrapped_array"` - NamespaceString string `json:"namespace_string,omitempty" xml:"namespace_string"` - NamespaceNumber float32 `json:"namespace_number,omitempty" xml:"namespace_number"` - NamespaceInteger int32 `json:"namespace_integer,omitempty" xml:"namespace_integer"` - NamespaceBoolean bool `json:"namespace_boolean,omitempty" xml:"namespace_boolean"` - NamespaceArray []int32 `json:"namespace_array,omitempty" xml:"namespace_array"` - NamespaceWrappedArray []int32 `json:"namespace_wrapped_array,omitempty" xml:"namespace_wrapped_array"` - PrefixNsString string `json:"prefix_ns_string,omitempty" xml:"prefix_ns_string"` - PrefixNsNumber float32 `json:"prefix_ns_number,omitempty" xml:"prefix_ns_number"` - PrefixNsInteger int32 `json:"prefix_ns_integer,omitempty" xml:"prefix_ns_integer"` - PrefixNsBoolean bool `json:"prefix_ns_boolean,omitempty" xml:"prefix_ns_boolean"` - PrefixNsArray []int32 `json:"prefix_ns_array,omitempty" xml:"prefix_ns_array"` - PrefixNsWrappedArray []int32 `json:"prefix_ns_wrapped_array,omitempty" xml:"prefix_ns_wrapped_array"` + AttributeString *string `json:"attribute_string,omitempty" xml:"attribute_string,attr"` + + AttributeNumber *float32 `json:"attribute_number,omitempty" xml:"attribute_number,attr"` + + AttributeInteger *int32 `json:"attribute_integer,omitempty" xml:"attribute_integer,attr"` + + AttributeBoolean *bool `json:"attribute_boolean,omitempty" xml:"attribute_boolean,attr"` + + WrappedArray *[]int32 `json:"wrapped_array,omitempty" xml:"wrapped_array"` + + NameString *string `json:"name_string,omitempty" xml:"name_string"` + + NameNumber *float32 `json:"name_number,omitempty" xml:"name_number"` + + NameInteger *int32 `json:"name_integer,omitempty" xml:"name_integer"` + + NameBoolean *bool `json:"name_boolean,omitempty" xml:"name_boolean"` + + NameArray *[]int32 `json:"name_array,omitempty" xml:"name_array"` + + NameWrappedArray *[]int32 `json:"name_wrapped_array,omitempty" xml:"name_wrapped_array"` + + PrefixString *string `json:"prefix_string,omitempty" xml:"prefix_string"` + + PrefixNumber *float32 `json:"prefix_number,omitempty" xml:"prefix_number"` + + PrefixInteger *int32 `json:"prefix_integer,omitempty" xml:"prefix_integer"` + + PrefixBoolean *bool `json:"prefix_boolean,omitempty" xml:"prefix_boolean"` + + PrefixArray *[]int32 `json:"prefix_array,omitempty" xml:"prefix_array"` + + PrefixWrappedArray *[]int32 `json:"prefix_wrapped_array,omitempty" xml:"prefix_wrapped_array"` + + NamespaceString *string `json:"namespace_string,omitempty" xml:"namespace_string"` + + NamespaceNumber *float32 `json:"namespace_number,omitempty" xml:"namespace_number"` + + NamespaceInteger *int32 `json:"namespace_integer,omitempty" xml:"namespace_integer"` + + NamespaceBoolean *bool `json:"namespace_boolean,omitempty" xml:"namespace_boolean"` + + NamespaceArray *[]int32 `json:"namespace_array,omitempty" xml:"namespace_array"` + + NamespaceWrappedArray *[]int32 `json:"namespace_wrapped_array,omitempty" xml:"namespace_wrapped_array"` + + PrefixNsString *string `json:"prefix_ns_string,omitempty" xml:"prefix_ns_string"` + + PrefixNsNumber *float32 `json:"prefix_ns_number,omitempty" xml:"prefix_ns_number"` + + PrefixNsInteger *int32 `json:"prefix_ns_integer,omitempty" xml:"prefix_ns_integer"` + + PrefixNsBoolean *bool `json:"prefix_ns_boolean,omitempty" xml:"prefix_ns_boolean"` + + PrefixNsArray *[]int32 `json:"prefix_ns_array,omitempty" xml:"prefix_ns_array"` + + PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty" xml:"prefix_ns_wrapped_array"` + +} + +// GetAttributeString returns the AttributeString field if non-nil, zero value otherwise. +func (o *XmlItem) GetAttributeString() string { + if o == nil || o.AttributeString == nil { + var ret string + return ret + } + return *o.AttributeString +} + +// GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetAttributeStringOk() (string, bool) { + if o == nil || o.AttributeString == nil { + var ret string + return ret, false + } + return *o.AttributeString, true +} + +// HasAttributeString returns a boolean if a field has been set. +func (o *XmlItem) HasAttributeString() bool { + if o != nil && o.AttributeString != nil { + return true + } + + return false +} + +// SetAttributeString gets a reference to the given string and assigns it to the AttributeString field. +func (o *XmlItem) SetAttributeString(v string) { + o.AttributeString = &v +} + +// GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetAttributeNumber() float32 { + if o == nil || o.AttributeNumber == nil { + var ret float32 + return ret + } + return *o.AttributeNumber +} + +// GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetAttributeNumberOk() (float32, bool) { + if o == nil || o.AttributeNumber == nil { + var ret float32 + return ret, false + } + return *o.AttributeNumber, true +} + +// HasAttributeNumber returns a boolean if a field has been set. +func (o *XmlItem) HasAttributeNumber() bool { + if o != nil && o.AttributeNumber != nil { + return true + } + + return false +} + +// SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field. +func (o *XmlItem) SetAttributeNumber(v float32) { + o.AttributeNumber = &v +} + +// GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetAttributeInteger() int32 { + if o == nil || o.AttributeInteger == nil { + var ret int32 + return ret + } + return *o.AttributeInteger +} + +// GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetAttributeIntegerOk() (int32, bool) { + if o == nil || o.AttributeInteger == nil { + var ret int32 + return ret, false + } + return *o.AttributeInteger, true +} + +// HasAttributeInteger returns a boolean if a field has been set. +func (o *XmlItem) HasAttributeInteger() bool { + if o != nil && o.AttributeInteger != nil { + return true + } + + return false +} + +// SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field. +func (o *XmlItem) SetAttributeInteger(v int32) { + o.AttributeInteger = &v +} + +// GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetAttributeBoolean() bool { + if o == nil || o.AttributeBoolean == nil { + var ret bool + return ret + } + return *o.AttributeBoolean +} + +// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetAttributeBooleanOk() (bool, bool) { + if o == nil || o.AttributeBoolean == nil { + var ret bool + return ret, false + } + return *o.AttributeBoolean, true +} + +// HasAttributeBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasAttributeBoolean() bool { + if o != nil && o.AttributeBoolean != nil { + return true + } + + return false +} + +// SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field. +func (o *XmlItem) SetAttributeBoolean(v bool) { + o.AttributeBoolean = &v +} + +// GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetWrappedArray() []int32 { + if o == nil || o.WrappedArray == nil { + var ret []int32 + return ret + } + return *o.WrappedArray +} + +// GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) { + if o == nil || o.WrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.WrappedArray, true +} + +// HasWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasWrappedArray() bool { + if o != nil && o.WrappedArray != nil { + return true + } + + return false +} + +// SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field. +func (o *XmlItem) SetWrappedArray(v []int32) { + o.WrappedArray = &v +} + +// GetNameString returns the NameString field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameString() string { + if o == nil || o.NameString == nil { + var ret string + return ret + } + return *o.NameString +} + +// GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameStringOk() (string, bool) { + if o == nil || o.NameString == nil { + var ret string + return ret, false + } + return *o.NameString, true +} + +// HasNameString returns a boolean if a field has been set. +func (o *XmlItem) HasNameString() bool { + if o != nil && o.NameString != nil { + return true + } + + return false +} + +// SetNameString gets a reference to the given string and assigns it to the NameString field. +func (o *XmlItem) SetNameString(v string) { + o.NameString = &v +} + +// GetNameNumber returns the NameNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameNumber() float32 { + if o == nil || o.NameNumber == nil { + var ret float32 + return ret + } + return *o.NameNumber +} + +// GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameNumberOk() (float32, bool) { + if o == nil || o.NameNumber == nil { + var ret float32 + return ret, false + } + return *o.NameNumber, true +} + +// HasNameNumber returns a boolean if a field has been set. +func (o *XmlItem) HasNameNumber() bool { + if o != nil && o.NameNumber != nil { + return true + } + + return false +} + +// SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field. +func (o *XmlItem) SetNameNumber(v float32) { + o.NameNumber = &v +} + +// GetNameInteger returns the NameInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameInteger() int32 { + if o == nil || o.NameInteger == nil { + var ret int32 + return ret + } + return *o.NameInteger +} + +// GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameIntegerOk() (int32, bool) { + if o == nil || o.NameInteger == nil { + var ret int32 + return ret, false + } + return *o.NameInteger, true +} + +// HasNameInteger returns a boolean if a field has been set. +func (o *XmlItem) HasNameInteger() bool { + if o != nil && o.NameInteger != nil { + return true + } + + return false +} + +// SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field. +func (o *XmlItem) SetNameInteger(v int32) { + o.NameInteger = &v +} + +// GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameBoolean() bool { + if o == nil || o.NameBoolean == nil { + var ret bool + return ret + } + return *o.NameBoolean +} + +// GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameBooleanOk() (bool, bool) { + if o == nil || o.NameBoolean == nil { + var ret bool + return ret, false + } + return *o.NameBoolean, true +} + +// HasNameBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasNameBoolean() bool { + if o != nil && o.NameBoolean != nil { + return true + } + + return false +} + +// SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field. +func (o *XmlItem) SetNameBoolean(v bool) { + o.NameBoolean = &v +} + +// GetNameArray returns the NameArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameArray() []int32 { + if o == nil || o.NameArray == nil { + var ret []int32 + return ret + } + return *o.NameArray +} + +// GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameArrayOk() ([]int32, bool) { + if o == nil || o.NameArray == nil { + var ret []int32 + return ret, false + } + return *o.NameArray, true +} + +// HasNameArray returns a boolean if a field has been set. +func (o *XmlItem) HasNameArray() bool { + if o != nil && o.NameArray != nil { + return true + } + + return false +} + +// SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field. +func (o *XmlItem) SetNameArray(v []int32) { + o.NameArray = &v +} + +// GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameWrappedArray() []int32 { + if o == nil || o.NameWrappedArray == nil { + var ret []int32 + return ret + } + return *o.NameWrappedArray +} + +// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) { + if o == nil || o.NameWrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.NameWrappedArray, true +} + +// HasNameWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasNameWrappedArray() bool { + if o != nil && o.NameWrappedArray != nil { + return true + } + + return false +} + +// SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field. +func (o *XmlItem) SetNameWrappedArray(v []int32) { + o.NameWrappedArray = &v +} + +// GetPrefixString returns the PrefixString field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixString() string { + if o == nil || o.PrefixString == nil { + var ret string + return ret + } + return *o.PrefixString +} + +// GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixStringOk() (string, bool) { + if o == nil || o.PrefixString == nil { + var ret string + return ret, false + } + return *o.PrefixString, true +} + +// HasPrefixString returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixString() bool { + if o != nil && o.PrefixString != nil { + return true + } + + return false +} + +// SetPrefixString gets a reference to the given string and assigns it to the PrefixString field. +func (o *XmlItem) SetPrefixString(v string) { + o.PrefixString = &v +} + +// GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNumber() float32 { + if o == nil || o.PrefixNumber == nil { + var ret float32 + return ret + } + return *o.PrefixNumber +} + +// GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNumberOk() (float32, bool) { + if o == nil || o.PrefixNumber == nil { + var ret float32 + return ret, false + } + return *o.PrefixNumber, true +} + +// HasPrefixNumber returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNumber() bool { + if o != nil && o.PrefixNumber != nil { + return true + } + + return false +} + +// SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field. +func (o *XmlItem) SetPrefixNumber(v float32) { + o.PrefixNumber = &v +} + +// GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixInteger() int32 { + if o == nil || o.PrefixInteger == nil { + var ret int32 + return ret + } + return *o.PrefixInteger } + +// GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixIntegerOk() (int32, bool) { + if o == nil || o.PrefixInteger == nil { + var ret int32 + return ret, false + } + return *o.PrefixInteger, true +} + +// HasPrefixInteger returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixInteger() bool { + if o != nil && o.PrefixInteger != nil { + return true + } + + return false +} + +// SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field. +func (o *XmlItem) SetPrefixInteger(v int32) { + o.PrefixInteger = &v +} + +// GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixBoolean() bool { + if o == nil || o.PrefixBoolean == nil { + var ret bool + return ret + } + return *o.PrefixBoolean +} + +// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixBooleanOk() (bool, bool) { + if o == nil || o.PrefixBoolean == nil { + var ret bool + return ret, false + } + return *o.PrefixBoolean, true +} + +// HasPrefixBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixBoolean() bool { + if o != nil && o.PrefixBoolean != nil { + return true + } + + return false +} + +// SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field. +func (o *XmlItem) SetPrefixBoolean(v bool) { + o.PrefixBoolean = &v +} + +// GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixArray() []int32 { + if o == nil || o.PrefixArray == nil { + var ret []int32 + return ret + } + return *o.PrefixArray +} + +// GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) { + if o == nil || o.PrefixArray == nil { + var ret []int32 + return ret, false + } + return *o.PrefixArray, true +} + +// HasPrefixArray returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixArray() bool { + if o != nil && o.PrefixArray != nil { + return true + } + + return false +} + +// SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field. +func (o *XmlItem) SetPrefixArray(v []int32) { + o.PrefixArray = &v +} + +// GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixWrappedArray() []int32 { + if o == nil || o.PrefixWrappedArray == nil { + var ret []int32 + return ret + } + return *o.PrefixWrappedArray +} + +// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) { + if o == nil || o.PrefixWrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.PrefixWrappedArray, true +} + +// HasPrefixWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixWrappedArray() bool { + if o != nil && o.PrefixWrappedArray != nil { + return true + } + + return false +} + +// SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field. +func (o *XmlItem) SetPrefixWrappedArray(v []int32) { + o.PrefixWrappedArray = &v +} + +// GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceString() string { + if o == nil || o.NamespaceString == nil { + var ret string + return ret + } + return *o.NamespaceString +} + +// GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceStringOk() (string, bool) { + if o == nil || o.NamespaceString == nil { + var ret string + return ret, false + } + return *o.NamespaceString, true +} + +// HasNamespaceString returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceString() bool { + if o != nil && o.NamespaceString != nil { + return true + } + + return false +} + +// SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field. +func (o *XmlItem) SetNamespaceString(v string) { + o.NamespaceString = &v +} + +// GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceNumber() float32 { + if o == nil || o.NamespaceNumber == nil { + var ret float32 + return ret + } + return *o.NamespaceNumber +} + +// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceNumberOk() (float32, bool) { + if o == nil || o.NamespaceNumber == nil { + var ret float32 + return ret, false + } + return *o.NamespaceNumber, true +} + +// HasNamespaceNumber returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceNumber() bool { + if o != nil && o.NamespaceNumber != nil { + return true + } + + return false +} + +// SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field. +func (o *XmlItem) SetNamespaceNumber(v float32) { + o.NamespaceNumber = &v +} + +// GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceInteger() int32 { + if o == nil || o.NamespaceInteger == nil { + var ret int32 + return ret + } + return *o.NamespaceInteger +} + +// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool) { + if o == nil || o.NamespaceInteger == nil { + var ret int32 + return ret, false + } + return *o.NamespaceInteger, true +} + +// HasNamespaceInteger returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceInteger() bool { + if o != nil && o.NamespaceInteger != nil { + return true + } + + return false +} + +// SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field. +func (o *XmlItem) SetNamespaceInteger(v int32) { + o.NamespaceInteger = &v +} + +// GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceBoolean() bool { + if o == nil || o.NamespaceBoolean == nil { + var ret bool + return ret + } + return *o.NamespaceBoolean +} + +// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool) { + if o == nil || o.NamespaceBoolean == nil { + var ret bool + return ret, false + } + return *o.NamespaceBoolean, true +} + +// HasNamespaceBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceBoolean() bool { + if o != nil && o.NamespaceBoolean != nil { + return true + } + + return false +} + +// SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field. +func (o *XmlItem) SetNamespaceBoolean(v bool) { + o.NamespaceBoolean = &v +} + +// GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceArray() []int32 { + if o == nil || o.NamespaceArray == nil { + var ret []int32 + return ret + } + return *o.NamespaceArray +} + +// GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) { + if o == nil || o.NamespaceArray == nil { + var ret []int32 + return ret, false + } + return *o.NamespaceArray, true +} + +// HasNamespaceArray returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceArray() bool { + if o != nil && o.NamespaceArray != nil { + return true + } + + return false +} + +// SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field. +func (o *XmlItem) SetNamespaceArray(v []int32) { + o.NamespaceArray = &v +} + +// GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceWrappedArray() []int32 { + if o == nil || o.NamespaceWrappedArray == nil { + var ret []int32 + return ret + } + return *o.NamespaceWrappedArray +} + +// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { + if o == nil || o.NamespaceWrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.NamespaceWrappedArray, true +} + +// HasNamespaceWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceWrappedArray() bool { + if o != nil && o.NamespaceWrappedArray != nil { + return true + } + + return false +} + +// SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field. +func (o *XmlItem) SetNamespaceWrappedArray(v []int32) { + o.NamespaceWrappedArray = &v +} + +// GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsString() string { + if o == nil || o.PrefixNsString == nil { + var ret string + return ret + } + return *o.PrefixNsString +} + +// GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsStringOk() (string, bool) { + if o == nil || o.PrefixNsString == nil { + var ret string + return ret, false + } + return *o.PrefixNsString, true +} + +// HasPrefixNsString returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsString() bool { + if o != nil && o.PrefixNsString != nil { + return true + } + + return false +} + +// SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field. +func (o *XmlItem) SetPrefixNsString(v string) { + o.PrefixNsString = &v +} + +// GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsNumber() float32 { + if o == nil || o.PrefixNsNumber == nil { + var ret float32 + return ret + } + return *o.PrefixNsNumber +} + +// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool) { + if o == nil || o.PrefixNsNumber == nil { + var ret float32 + return ret, false + } + return *o.PrefixNsNumber, true +} + +// HasPrefixNsNumber returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsNumber() bool { + if o != nil && o.PrefixNsNumber != nil { + return true + } + + return false +} + +// SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field. +func (o *XmlItem) SetPrefixNsNumber(v float32) { + o.PrefixNsNumber = &v +} + +// GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsInteger() int32 { + if o == nil || o.PrefixNsInteger == nil { + var ret int32 + return ret + } + return *o.PrefixNsInteger +} + +// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool) { + if o == nil || o.PrefixNsInteger == nil { + var ret int32 + return ret, false + } + return *o.PrefixNsInteger, true +} + +// HasPrefixNsInteger returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsInteger() bool { + if o != nil && o.PrefixNsInteger != nil { + return true + } + + return false +} + +// SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field. +func (o *XmlItem) SetPrefixNsInteger(v int32) { + o.PrefixNsInteger = &v +} + +// GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsBoolean() bool { + if o == nil || o.PrefixNsBoolean == nil { + var ret bool + return ret + } + return *o.PrefixNsBoolean +} + +// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool) { + if o == nil || o.PrefixNsBoolean == nil { + var ret bool + return ret, false + } + return *o.PrefixNsBoolean, true +} + +// HasPrefixNsBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsBoolean() bool { + if o != nil && o.PrefixNsBoolean != nil { + return true + } + + return false +} + +// SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field. +func (o *XmlItem) SetPrefixNsBoolean(v bool) { + o.PrefixNsBoolean = &v +} + +// GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsArray() []int32 { + if o == nil || o.PrefixNsArray == nil { + var ret []int32 + return ret + } + return *o.PrefixNsArray +} + +// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) { + if o == nil || o.PrefixNsArray == nil { + var ret []int32 + return ret, false + } + return *o.PrefixNsArray, true +} + +// HasPrefixNsArray returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsArray() bool { + if o != nil && o.PrefixNsArray != nil { + return true + } + + return false +} + +// SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field. +func (o *XmlItem) SetPrefixNsArray(v []int32) { + o.PrefixNsArray = &v +} + +// GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { + if o == nil || o.PrefixNsWrappedArray == nil { + var ret []int32 + return ret + } + return *o.PrefixNsWrappedArray +} + +// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { + if o == nil || o.PrefixNsWrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.PrefixNsWrappedArray, true +} + +// HasPrefixNsWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsWrappedArray() bool { + if o != nil && o.PrefixNsWrappedArray != nil { + return true + } + + return false +} + +// SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field. +func (o *XmlItem) SetPrefixNsWrappedArray(v []int32) { + o.PrefixNsWrappedArray = &v +} + + +func (o XmlItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AttributeString != nil { + toSerialize["attribute_string"] = o.AttributeString + } + if o.AttributeNumber != nil { + toSerialize["attribute_number"] = o.AttributeNumber + } + if o.AttributeInteger != nil { + toSerialize["attribute_integer"] = o.AttributeInteger + } + if o.AttributeBoolean != nil { + toSerialize["attribute_boolean"] = o.AttributeBoolean + } + if o.WrappedArray != nil { + toSerialize["wrapped_array"] = o.WrappedArray + } + if o.NameString != nil { + toSerialize["name_string"] = o.NameString + } + if o.NameNumber != nil { + toSerialize["name_number"] = o.NameNumber + } + if o.NameInteger != nil { + toSerialize["name_integer"] = o.NameInteger + } + if o.NameBoolean != nil { + toSerialize["name_boolean"] = o.NameBoolean + } + if o.NameArray != nil { + toSerialize["name_array"] = o.NameArray + } + if o.NameWrappedArray != nil { + toSerialize["name_wrapped_array"] = o.NameWrappedArray + } + if o.PrefixString != nil { + toSerialize["prefix_string"] = o.PrefixString + } + if o.PrefixNumber != nil { + toSerialize["prefix_number"] = o.PrefixNumber + } + if o.PrefixInteger != nil { + toSerialize["prefix_integer"] = o.PrefixInteger + } + if o.PrefixBoolean != nil { + toSerialize["prefix_boolean"] = o.PrefixBoolean + } + if o.PrefixArray != nil { + toSerialize["prefix_array"] = o.PrefixArray + } + if o.PrefixWrappedArray != nil { + toSerialize["prefix_wrapped_array"] = o.PrefixWrappedArray + } + if o.NamespaceString != nil { + toSerialize["namespace_string"] = o.NamespaceString + } + if o.NamespaceNumber != nil { + toSerialize["namespace_number"] = o.NamespaceNumber + } + if o.NamespaceInteger != nil { + toSerialize["namespace_integer"] = o.NamespaceInteger + } + if o.NamespaceBoolean != nil { + toSerialize["namespace_boolean"] = o.NamespaceBoolean + } + if o.NamespaceArray != nil { + toSerialize["namespace_array"] = o.NamespaceArray + } + if o.NamespaceWrappedArray != nil { + toSerialize["namespace_wrapped_array"] = o.NamespaceWrappedArray + } + if o.PrefixNsString != nil { + toSerialize["prefix_ns_string"] = o.PrefixNsString + } + if o.PrefixNsNumber != nil { + toSerialize["prefix_ns_number"] = o.PrefixNsNumber + } + if o.PrefixNsInteger != nil { + toSerialize["prefix_ns_integer"] = o.PrefixNsInteger + } + if o.PrefixNsBoolean != nil { + toSerialize["prefix_ns_boolean"] = o.PrefixNsBoolean + } + if o.PrefixNsArray != nil { + toSerialize["prefix_ns_array"] = o.PrefixNsArray + } + if o.PrefixNsWrappedArray != nil { + toSerialize["prefix_ns_wrapped_array"] = o.PrefixNsWrappedArray + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore-withXml/utils.go b/samples/client/petstore/go/go-petstore-withXml/utils.go new file mode 100644 index 000000000000..f07bdfbcc0d6 --- /dev/null +++ b/samples/client/petstore/go/go-petstore-withXml/utils.go @@ -0,0 +1,40 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package petstore + +import "time" + +// Bool is a helper routine that returns a pointer to given integer value. +func Bool(v bool) *bool { return &v } + +// Int is a helper routine that returns a pointer to given integer value. +func Int(v int) *int { return &v } + +// Int32 is a helper routine that returns a pointer to given integer value. +func Int32(v int32) *int32 { return &v } + +// Int64 is a helper routine that returns a pointer to given integer value. +func Int64(v int64) *int64 { return &v } + +// Float is a helper routine that returns a pointer to given float value. +func Float(v float32) *float32 { return &v } + +// Float32 is a helper routine that returns a pointer to given float value. +func Float32(v float32) *float32 { return &v } + +// Float64 is a helper routine that returns a pointer to given float value. +func Float64(v float64) *float64 { return &v } + +// String is a helper routine that returns a pointer to given string value. +func String(v string) *string { return &v } + +// Time is helper routine that returns a pointer to given Time value. +func Time(v time.Time) *time.Time { return &v } \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesAnyType.md index eadec3142ce8..d6a64a17629c 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesAnyType.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesAnyType) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesAnyType) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesAnyType) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesArray.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesArray.md index 0c37598aeb2c..8fa3956c6cbf 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesArray.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesArray) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesArray) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesArray) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesArray) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesBoolean.md index 7190fe8429b8..dab05846a08e 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesBoolean.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesBoolean) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesBoolean) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesBoolean) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md index 877a5d45a316..8b22e0ef339a 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md @@ -4,17 +4,295 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapString** | **map[string]string** | | [optional] -**MapNumber** | **map[string]float32** | | [optional] -**MapInteger** | **map[string]int32** | | [optional] -**MapBoolean** | **map[string]bool** | | [optional] -**MapArrayInteger** | [**map[string][]int32**](array.md) | | [optional] -**MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] -**MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] -**MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] -**Anytype1** | [**map[string]interface{}**](.md) | | [optional] -**Anytype2** | [**map[string]interface{}**](.md) | | [optional] -**Anytype3** | [**map[string]interface{}**](.md) | | [optional] +**MapString** | Pointer to **map[string]string** | | [optional] +**MapNumber** | Pointer to **map[string]float32** | | [optional] +**MapInteger** | Pointer to **map[string]int32** | | [optional] +**MapBoolean** | Pointer to **map[string]bool** | | [optional] +**MapArrayInteger** | Pointer to [**map[string][]int32**](array.md) | | [optional] +**MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional] +**MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] +**MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] +**Anytype1** | Pointer to [**map[string]interface{}**](.md) | | [optional] +**Anytype2** | Pointer to [**map[string]interface{}**](.md) | | [optional] +**Anytype3** | Pointer to [**map[string]interface{}**](.md) | | [optional] + +## Methods + +### GetMapString + +`func (o *AdditionalPropertiesClass) GetMapString() map[string]string` + +GetMapString returns the MapString field if non-nil, zero value otherwise. + +### GetMapStringOk + +`func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool)` + +GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapString + +`func (o *AdditionalPropertiesClass) HasMapString() bool` + +HasMapString returns a boolean if a field has been set. + +### SetMapString + +`func (o *AdditionalPropertiesClass) SetMapString(v map[string]string)` + +SetMapString gets a reference to the given map[string]string and assigns it to the MapString field. + +### GetMapNumber + +`func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32` + +GetMapNumber returns the MapNumber field if non-nil, zero value otherwise. + +### GetMapNumberOk + +`func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool)` + +GetMapNumberOk returns a tuple with the MapNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapNumber + +`func (o *AdditionalPropertiesClass) HasMapNumber() bool` + +HasMapNumber returns a boolean if a field has been set. + +### SetMapNumber + +`func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32)` + +SetMapNumber gets a reference to the given map[string]float32 and assigns it to the MapNumber field. + +### GetMapInteger + +`func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32` + +GetMapInteger returns the MapInteger field if non-nil, zero value otherwise. + +### GetMapIntegerOk + +`func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool)` + +GetMapIntegerOk returns a tuple with the MapInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapInteger + +`func (o *AdditionalPropertiesClass) HasMapInteger() bool` + +HasMapInteger returns a boolean if a field has been set. + +### SetMapInteger + +`func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32)` + +SetMapInteger gets a reference to the given map[string]int32 and assigns it to the MapInteger field. + +### GetMapBoolean + +`func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool` + +GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise. + +### GetMapBooleanOk + +`func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool)` + +GetMapBooleanOk returns a tuple with the MapBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapBoolean + +`func (o *AdditionalPropertiesClass) HasMapBoolean() bool` + +HasMapBoolean returns a boolean if a field has been set. + +### SetMapBoolean + +`func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool)` + +SetMapBoolean gets a reference to the given map[string]bool and assigns it to the MapBoolean field. + +### GetMapArrayInteger + +`func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32` + +GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value otherwise. + +### GetMapArrayIntegerOk + +`func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool)` + +GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapArrayInteger + +`func (o *AdditionalPropertiesClass) HasMapArrayInteger() bool` + +HasMapArrayInteger returns a boolean if a field has been set. + +### SetMapArrayInteger + +`func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32)` + +SetMapArrayInteger gets a reference to the given map[string][]int32 and assigns it to the MapArrayInteger field. + +### GetMapArrayAnytype + +`func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{}` + +GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise. + +### GetMapArrayAnytypeOk + +`func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool)` + +GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapArrayAnytype + +`func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool` + +HasMapArrayAnytype returns a boolean if a field has been set. + +### SetMapArrayAnytype + +`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{})` + +SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field. + +### GetMapMapString + +`func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]string` + +GetMapMapString returns the MapMapString field if non-nil, zero value otherwise. + +### GetMapMapStringOk + +`func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool)` + +GetMapMapStringOk returns a tuple with the MapMapString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapMapString + +`func (o *AdditionalPropertiesClass) HasMapMapString() bool` + +HasMapMapString returns a boolean if a field has been set. + +### SetMapMapString + +`func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]string)` + +SetMapMapString gets a reference to the given map[string]map[string]string and assigns it to the MapMapString field. + +### GetMapMapAnytype + +`func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{}` + +GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise. + +### GetMapMapAnytypeOk + +`func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool)` + +GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapMapAnytype + +`func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool` + +HasMapMapAnytype returns a boolean if a field has been set. + +### SetMapMapAnytype + +`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{})` + +SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field. + +### GetAnytype1 + +`func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{}` + +GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. + +### GetAnytype1Ok + +`func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool)` + +GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAnytype1 + +`func (o *AdditionalPropertiesClass) HasAnytype1() bool` + +HasAnytype1 returns a boolean if a field has been set. + +### SetAnytype1 + +`func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{})` + +SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field. + +### GetAnytype2 + +`func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{}` + +GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. + +### GetAnytype2Ok + +`func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool)` + +GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAnytype2 + +`func (o *AdditionalPropertiesClass) HasAnytype2() bool` + +HasAnytype2 returns a boolean if a field has been set. + +### SetAnytype2 + +`func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{})` + +SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field. + +### GetAnytype3 + +`func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{}` + +GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. + +### GetAnytype3Ok + +`func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool)` + +GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAnytype3 + +`func (o *AdditionalPropertiesClass) HasAnytype3() bool` + +HasAnytype3 returns a boolean if a field has been set. + +### SetAnytype3 + +`func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{})` + +SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesInteger.md index 34e6fca8fb00..9bed1f72584a 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesInteger.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesInteger) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesInteger) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesInteger) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesNumber.md index 6d41fd2315c7..efc3cc156c1e 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesNumber.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesNumber) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesNumber) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesNumber) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesObject.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesObject.md index b856de693b16..af3963446840 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesObject.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesObject) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesObject) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesObject) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesObject) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesString.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesString.md index 69ad20656858..0934f9bf5042 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesString.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *AdditionalPropertiesString) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AdditionalPropertiesString) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AdditionalPropertiesString) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AdditionalPropertiesString) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Animal.md b/samples/client/petstore/go/go-petstore/docs/Animal.md index 02d23377da6d..55133b29745a 100644 --- a/samples/client/petstore/go/go-petstore/docs/Animal.md +++ b/samples/client/petstore/go/go-petstore/docs/Animal.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to red] +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] + +## Methods + +### GetClassName + +`func (o *Animal) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Animal) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Animal) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Animal) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Animal) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Animal) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Animal) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Animal) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/ApiResponse.md b/samples/client/petstore/go/go-petstore/docs/ApiResponse.md index 41d28fb578c1..b0c891bbc960 100644 --- a/samples/client/petstore/go/go-petstore/docs/ApiResponse.md +++ b/samples/client/petstore/go/go-petstore/docs/ApiResponse.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Code** | **int32** | | [optional] -**Type** | **string** | | [optional] -**Message** | **string** | | [optional] +**Code** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### GetCode + +`func (o *ApiResponse) GetCode() int32` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *ApiResponse) GetCodeOk() (int32, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCode + +`func (o *ApiResponse) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### SetCode + +`func (o *ApiResponse) SetCode(v int32)` + +SetCode gets a reference to the given int32 and assigns it to the Code field. + +### GetType + +`func (o *ApiResponse) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ApiResponse) GetTypeOk() (string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasType + +`func (o *ApiResponse) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetType + +`func (o *ApiResponse) SetType(v string)` + +SetType gets a reference to the given string and assigns it to the Type field. + +### GetMessage + +`func (o *ApiResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ApiResponse) GetMessageOk() (string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMessage + +`func (o *ApiResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessage + +`func (o *ApiResponse) SetMessage(v string)` + +SetMessage gets a reference to the given string and assigns it to the Message field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md index 555213013b20..64ad908ea3bf 100644 --- a/samples/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional] +**ArrayArrayNumber** | Pointer to [**[][]float32**](array.md) | | [optional] + +## Methods + +### GetArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32` + +GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. + +### GetArrayArrayNumberOk + +`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool)` + +GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool` + +HasArrayArrayNumber returns a boolean if a field has been set. + +### SetArrayArrayNumber + +`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)` + +SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md index 56618756dd77..0ce95922a5ed 100644 --- a/samples/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayNumber** | **[]float32** | | [optional] +**ArrayNumber** | Pointer to **[]float32** | | [optional] + +## Methods + +### GetArrayNumber + +`func (o *ArrayOfNumberOnly) GetArrayNumber() []float32` + +GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. + +### GetArrayNumberOk + +`func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool)` + +GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayNumber + +`func (o *ArrayOfNumberOnly) HasArrayNumber() bool` + +HasArrayNumber returns a boolean if a field has been set. + +### SetArrayNumber + +`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)` + +SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/ArrayTest.md b/samples/client/petstore/go/go-petstore/docs/ArrayTest.md index 0da0bc52d2d3..f7020fadea38 100644 --- a/samples/client/petstore/go/go-petstore/docs/ArrayTest.md +++ b/samples/client/petstore/go/go-petstore/docs/ArrayTest.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayOfString** | **[]string** | | [optional] -**ArrayArrayOfInteger** | [**[][]int64**](array.md) | | [optional] -**ArrayArrayOfModel** | [**[][]ReadOnlyFirst**](array.md) | | [optional] +**ArrayOfString** | Pointer to **[]string** | | [optional] +**ArrayArrayOfInteger** | Pointer to [**[][]int64**](array.md) | | [optional] +**ArrayArrayOfModel** | Pointer to [**[][]ReadOnlyFirst**](array.md) | | [optional] + +## Methods + +### GetArrayOfString + +`func (o *ArrayTest) GetArrayOfString() []string` + +GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. + +### GetArrayOfStringOk + +`func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool)` + +GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayOfString + +`func (o *ArrayTest) HasArrayOfString() bool` + +HasArrayOfString returns a boolean if a field has been set. + +### SetArrayOfString + +`func (o *ArrayTest) SetArrayOfString(v []string)` + +SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. + +### GetArrayArrayOfInteger + +`func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64` + +GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. + +### GetArrayArrayOfIntegerOk + +`func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool)` + +GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayOfInteger + +`func (o *ArrayTest) HasArrayArrayOfInteger() bool` + +HasArrayArrayOfInteger returns a boolean if a field has been set. + +### SetArrayArrayOfInteger + +`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)` + +SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. + +### GetArrayArrayOfModel + +`func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst` + +GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. + +### GetArrayArrayOfModelOk + +`func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool)` + +GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayArrayOfModel + +`func (o *ArrayTest) HasArrayArrayOfModel() bool` + +HasArrayArrayOfModel returns a boolean if a field has been set. + +### SetArrayArrayOfModel + +`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)` + +SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Capitalization.md b/samples/client/petstore/go/go-petstore/docs/Capitalization.md index 426b8eabd9bd..a4772d740066 100644 --- a/samples/client/petstore/go/go-petstore/docs/Capitalization.md +++ b/samples/client/petstore/go/go-petstore/docs/Capitalization.md @@ -4,12 +4,165 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] -**CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] -**CapitalSnake** | **string** | | [optional] -**SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name of the pet | [optional] +**SmallCamel** | Pointer to **string** | | [optional] +**CapitalCamel** | Pointer to **string** | | [optional] +**SmallSnake** | Pointer to **string** | | [optional] +**CapitalSnake** | Pointer to **string** | | [optional] +**SCAETHFlowPoints** | Pointer to **string** | | [optional] +**ATT_NAME** | Pointer to **string** | Name of the pet | [optional] + +## Methods + +### GetSmallCamel + +`func (o *Capitalization) GetSmallCamel() string` + +GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. + +### GetSmallCamelOk + +`func (o *Capitalization) GetSmallCamelOk() (string, bool)` + +GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSmallCamel + +`func (o *Capitalization) HasSmallCamel() bool` + +HasSmallCamel returns a boolean if a field has been set. + +### SetSmallCamel + +`func (o *Capitalization) SetSmallCamel(v string)` + +SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field. + +### GetCapitalCamel + +`func (o *Capitalization) GetCapitalCamel() string` + +GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. + +### GetCapitalCamelOk + +`func (o *Capitalization) GetCapitalCamelOk() (string, bool)` + +GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCapitalCamel + +`func (o *Capitalization) HasCapitalCamel() bool` + +HasCapitalCamel returns a boolean if a field has been set. + +### SetCapitalCamel + +`func (o *Capitalization) SetCapitalCamel(v string)` + +SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field. + +### GetSmallSnake + +`func (o *Capitalization) GetSmallSnake() string` + +GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. + +### GetSmallSnakeOk + +`func (o *Capitalization) GetSmallSnakeOk() (string, bool)` + +GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSmallSnake + +`func (o *Capitalization) HasSmallSnake() bool` + +HasSmallSnake returns a boolean if a field has been set. + +### SetSmallSnake + +`func (o *Capitalization) SetSmallSnake(v string)` + +SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field. + +### GetCapitalSnake + +`func (o *Capitalization) GetCapitalSnake() string` + +GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. + +### GetCapitalSnakeOk + +`func (o *Capitalization) GetCapitalSnakeOk() (string, bool)` + +GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCapitalSnake + +`func (o *Capitalization) HasCapitalSnake() bool` + +HasCapitalSnake returns a boolean if a field has been set. + +### SetCapitalSnake + +`func (o *Capitalization) SetCapitalSnake(v string)` + +SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field. + +### GetSCAETHFlowPoints + +`func (o *Capitalization) GetSCAETHFlowPoints() string` + +GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. + +### GetSCAETHFlowPointsOk + +`func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool)` + +GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSCAETHFlowPoints + +`func (o *Capitalization) HasSCAETHFlowPoints() bool` + +HasSCAETHFlowPoints returns a boolean if a field has been set. + +### SetSCAETHFlowPoints + +`func (o *Capitalization) SetSCAETHFlowPoints(v string)` + +SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field. + +### GetATT_NAME + +`func (o *Capitalization) GetATT_NAME() string` + +GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. + +### GetATT_NAMEOk + +`func (o *Capitalization) GetATT_NAMEOk() (string, bool)` + +GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasATT_NAME + +`func (o *Capitalization) HasATT_NAME() bool` + +HasATT_NAME returns a boolean if a field has been set. + +### SetATT_NAME + +`func (o *Capitalization) SetATT_NAME(v string)` + +SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Cat.md b/samples/client/petstore/go/go-petstore/docs/Cat.md index 1ef1f095e947..0f2fe5a1f1f8 100644 --- a/samples/client/petstore/go/go-petstore/docs/Cat.md +++ b/samples/client/petstore/go/go-petstore/docs/Cat.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to red] -**Declawed** | **bool** | | [optional] +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] +**Declawed** | Pointer to **bool** | | [optional] + +## Methods + +### GetClassName + +`func (o *Cat) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Cat) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Cat) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Cat) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Cat) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Cat) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Cat) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Cat) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + +### GetDeclawed + +`func (o *Cat) GetDeclawed() bool` + +GetDeclawed returns the Declawed field if non-nil, zero value otherwise. + +### GetDeclawedOk + +`func (o *Cat) GetDeclawedOk() (bool, bool)` + +GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDeclawed + +`func (o *Cat) HasDeclawed() bool` + +HasDeclawed returns a boolean if a field has been set. + +### SetDeclawed + +`func (o *Cat) SetDeclawed(v bool)` + +SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/CatAllOf.md b/samples/client/petstore/go/go-petstore/docs/CatAllOf.md index c978cee0417f..85f40d251d94 100644 --- a/samples/client/petstore/go/go-petstore/docs/CatAllOf.md +++ b/samples/client/petstore/go/go-petstore/docs/CatAllOf.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] +**Declawed** | Pointer to **bool** | | [optional] + +## Methods + +### GetDeclawed + +`func (o *CatAllOf) GetDeclawed() bool` + +GetDeclawed returns the Declawed field if non-nil, zero value otherwise. + +### GetDeclawedOk + +`func (o *CatAllOf) GetDeclawedOk() (bool, bool)` + +GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDeclawed + +`func (o *CatAllOf) HasDeclawed() bool` + +HasDeclawed returns a boolean if a field has been set. + +### SetDeclawed + +`func (o *CatAllOf) SetDeclawed(v bool)` + +SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Category.md b/samples/client/petstore/go/go-petstore/docs/Category.md index 01e8344bd06f..88b525bade15 100644 --- a/samples/client/petstore/go/go-petstore/docs/Category.md +++ b/samples/client/petstore/go/go-petstore/docs/Category.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Name** | **string** | | [default to default-name] +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [default to default-name] + +## Methods + +### GetId + +`func (o *Category) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Category) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Category) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Category) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetName + +`func (o *Category) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Category) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Category) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Category) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/ClassModel.md b/samples/client/petstore/go/go-petstore/docs/ClassModel.md index 0b925cebb1f6..d9c4f41e98bc 100644 --- a/samples/client/petstore/go/go-petstore/docs/ClassModel.md +++ b/samples/client/petstore/go/go-petstore/docs/ClassModel.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Class** | **string** | | [optional] +**Class** | Pointer to **string** | | [optional] + +## Methods + +### GetClass + +`func (o *ClassModel) GetClass() string` + +GetClass returns the Class field if non-nil, zero value otherwise. + +### GetClassOk + +`func (o *ClassModel) GetClassOk() (string, bool)` + +GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClass + +`func (o *ClassModel) HasClass() bool` + +HasClass returns a boolean if a field has been set. + +### SetClass + +`func (o *ClassModel) SetClass(v string)` + +SetClass gets a reference to the given string and assigns it to the Class field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Client.md b/samples/client/petstore/go/go-petstore/docs/Client.md index 551da852eece..5ed3098fd491 100644 --- a/samples/client/petstore/go/go-petstore/docs/Client.md +++ b/samples/client/petstore/go/go-petstore/docs/Client.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Client** | **string** | | [optional] +**Client** | Pointer to **string** | | [optional] + +## Methods + +### GetClient + +`func (o *Client) GetClient() string` + +GetClient returns the Client field if non-nil, zero value otherwise. + +### GetClientOk + +`func (o *Client) GetClientOk() (string, bool)` + +GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClient + +`func (o *Client) HasClient() bool` + +HasClient returns a boolean if a field has been set. + +### SetClient + +`func (o *Client) SetClient(v string)` + +SetClient gets a reference to the given string and assigns it to the Client field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Dog.md b/samples/client/petstore/go/go-petstore/docs/Dog.md index ff35dd5cdca2..4b5c332d8e14 100644 --- a/samples/client/petstore/go/go-petstore/docs/Dog.md +++ b/samples/client/petstore/go/go-petstore/docs/Dog.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to red] -**Breed** | **string** | | [optional] +**ClassName** | Pointer to **string** | | +**Color** | Pointer to **string** | | [optional] [default to red] +**Breed** | Pointer to **string** | | [optional] + +## Methods + +### GetClassName + +`func (o *Dog) GetClassName() string` + +GetClassName returns the ClassName field if non-nil, zero value otherwise. + +### GetClassNameOk + +`func (o *Dog) GetClassNameOk() (string, bool)` + +GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClassName + +`func (o *Dog) HasClassName() bool` + +HasClassName returns a boolean if a field has been set. + +### SetClassName + +`func (o *Dog) SetClassName(v string)` + +SetClassName gets a reference to the given string and assigns it to the ClassName field. + +### GetColor + +`func (o *Dog) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Dog) GetColorOk() (string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasColor + +`func (o *Dog) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### SetColor + +`func (o *Dog) SetColor(v string)` + +SetColor gets a reference to the given string and assigns it to the Color field. + +### GetBreed + +`func (o *Dog) GetBreed() string` + +GetBreed returns the Breed field if non-nil, zero value otherwise. + +### GetBreedOk + +`func (o *Dog) GetBreedOk() (string, bool)` + +GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBreed + +`func (o *Dog) HasBreed() bool` + +HasBreed returns a boolean if a field has been set. + +### SetBreed + +`func (o *Dog) SetBreed(v string)` + +SetBreed gets a reference to the given string and assigns it to the Breed field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/DogAllOf.md b/samples/client/petstore/go/go-petstore/docs/DogAllOf.md index b87153e92652..a3169521cecc 100644 --- a/samples/client/petstore/go/go-petstore/docs/DogAllOf.md +++ b/samples/client/petstore/go/go-petstore/docs/DogAllOf.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Breed** | **string** | | [optional] +**Breed** | Pointer to **string** | | [optional] + +## Methods + +### GetBreed + +`func (o *DogAllOf) GetBreed() string` + +GetBreed returns the Breed field if non-nil, zero value otherwise. + +### GetBreedOk + +`func (o *DogAllOf) GetBreedOk() (string, bool)` + +GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBreed + +`func (o *DogAllOf) HasBreed() bool` + +HasBreed returns a boolean if a field has been set. + +### SetBreed + +`func (o *DogAllOf) SetBreed(v string)` + +SetBreed gets a reference to the given string and assigns it to the Breed field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/EnumArrays.md b/samples/client/petstore/go/go-petstore/docs/EnumArrays.md index 3021f8818307..31d7b2b9faaa 100644 --- a/samples/client/petstore/go/go-petstore/docs/EnumArrays.md +++ b/samples/client/petstore/go/go-petstore/docs/EnumArrays.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] -**ArrayEnum** | **[]string** | | [optional] +**JustSymbol** | Pointer to **string** | | [optional] +**ArrayEnum** | Pointer to **[]string** | | [optional] + +## Methods + +### GetJustSymbol + +`func (o *EnumArrays) GetJustSymbol() string` + +GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. + +### GetJustSymbolOk + +`func (o *EnumArrays) GetJustSymbolOk() (string, bool)` + +GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasJustSymbol + +`func (o *EnumArrays) HasJustSymbol() bool` + +HasJustSymbol returns a boolean if a field has been set. + +### SetJustSymbol + +`func (o *EnumArrays) SetJustSymbol(v string)` + +SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field. + +### GetArrayEnum + +`func (o *EnumArrays) GetArrayEnum() []string` + +GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. + +### GetArrayEnumOk + +`func (o *EnumArrays) GetArrayEnumOk() ([]string, bool)` + +GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayEnum + +`func (o *EnumArrays) HasArrayEnum() bool` + +HasArrayEnum returns a boolean if a field has been set. + +### SetArrayEnum + +`func (o *EnumArrays) SetArrayEnum(v []string)` + +SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/EnumClass.md b/samples/client/petstore/go/go-petstore/docs/EnumClass.md index c6932388c067..e231f94bd73c 100644 --- a/samples/client/petstore/go/go-petstore/docs/EnumClass.md +++ b/samples/client/petstore/go/go-petstore/docs/EnumClass.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/EnumTest.md b/samples/client/petstore/go/go-petstore/docs/EnumTest.md index eeec09b66b4f..d0e7aebc42d0 100644 --- a/samples/client/petstore/go/go-petstore/docs/EnumTest.md +++ b/samples/client/petstore/go/go-petstore/docs/EnumTest.md @@ -4,11 +4,139 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EnumString** | **string** | | [optional] -**EnumStringRequired** | **string** | | -**EnumInteger** | **int32** | | [optional] -**EnumNumber** | **float64** | | [optional] -**OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**EnumString** | Pointer to **string** | | [optional] +**EnumStringRequired** | Pointer to **string** | | +**EnumInteger** | Pointer to **int32** | | [optional] +**EnumNumber** | Pointer to **float64** | | [optional] +**OuterEnum** | Pointer to [**OuterEnum**](OuterEnum.md) | | [optional] + +## Methods + +### GetEnumString + +`func (o *EnumTest) GetEnumString() string` + +GetEnumString returns the EnumString field if non-nil, zero value otherwise. + +### GetEnumStringOk + +`func (o *EnumTest) GetEnumStringOk() (string, bool)` + +GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumString + +`func (o *EnumTest) HasEnumString() bool` + +HasEnumString returns a boolean if a field has been set. + +### SetEnumString + +`func (o *EnumTest) SetEnumString(v string)` + +SetEnumString gets a reference to the given string and assigns it to the EnumString field. + +### GetEnumStringRequired + +`func (o *EnumTest) GetEnumStringRequired() string` + +GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. + +### GetEnumStringRequiredOk + +`func (o *EnumTest) GetEnumStringRequiredOk() (string, bool)` + +GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumStringRequired + +`func (o *EnumTest) HasEnumStringRequired() bool` + +HasEnumStringRequired returns a boolean if a field has been set. + +### SetEnumStringRequired + +`func (o *EnumTest) SetEnumStringRequired(v string)` + +SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field. + +### GetEnumInteger + +`func (o *EnumTest) GetEnumInteger() int32` + +GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. + +### GetEnumIntegerOk + +`func (o *EnumTest) GetEnumIntegerOk() (int32, bool)` + +GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumInteger + +`func (o *EnumTest) HasEnumInteger() bool` + +HasEnumInteger returns a boolean if a field has been set. + +### SetEnumInteger + +`func (o *EnumTest) SetEnumInteger(v int32)` + +SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field. + +### GetEnumNumber + +`func (o *EnumTest) GetEnumNumber() float64` + +GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. + +### GetEnumNumberOk + +`func (o *EnumTest) GetEnumNumberOk() (float64, bool)` + +GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnumNumber + +`func (o *EnumTest) HasEnumNumber() bool` + +HasEnumNumber returns a boolean if a field has been set. + +### SetEnumNumber + +`func (o *EnumTest) SetEnumNumber(v float64)` + +SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field. + +### GetOuterEnum + +`func (o *EnumTest) GetOuterEnum() OuterEnum` + +GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. + +### GetOuterEnumOk + +`func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool)` + +GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasOuterEnum + +`func (o *EnumTest) HasOuterEnum() bool` + +HasOuterEnum returns a boolean if a field has been set. + +### SetOuterEnum + +`func (o *EnumTest) SetOuterEnum(v OuterEnum)` + +SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/File.md b/samples/client/petstore/go/go-petstore/docs/File.md index a113b0312cdf..454b159609c1 100644 --- a/samples/client/petstore/go/go-petstore/docs/File.md +++ b/samples/client/petstore/go/go-petstore/docs/File.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SourceURI** | **string** | Test capitalization | [optional] +**SourceURI** | Pointer to **string** | Test capitalization | [optional] + +## Methods + +### GetSourceURI + +`func (o *File) GetSourceURI() string` + +GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. + +### GetSourceURIOk + +`func (o *File) GetSourceURIOk() (string, bool)` + +GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSourceURI + +`func (o *File) HasSourceURI() bool` + +HasSourceURI returns a boolean if a field has been set. + +### SetSourceURI + +`func (o *File) SetSourceURI(v string)` + +SetSourceURI gets a reference to the given string and assigns it to the SourceURI field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/FileSchemaTestClass.md b/samples/client/petstore/go/go-petstore/docs/FileSchemaTestClass.md index ae51414dd6cc..d4a4da7206c4 100644 --- a/samples/client/petstore/go/go-petstore/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/go/go-petstore/docs/FileSchemaTestClass.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**File** | [**File**](File.md) | | [optional] -**Files** | [**[]File**](File.md) | | [optional] +**File** | Pointer to [**File**](File.md) | | [optional] +**Files** | Pointer to [**[]File**](File.md) | | [optional] + +## Methods + +### GetFile + +`func (o *FileSchemaTestClass) GetFile() File` + +GetFile returns the File field if non-nil, zero value otherwise. + +### GetFileOk + +`func (o *FileSchemaTestClass) GetFileOk() (File, bool)` + +GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFile + +`func (o *FileSchemaTestClass) HasFile() bool` + +HasFile returns a boolean if a field has been set. + +### SetFile + +`func (o *FileSchemaTestClass) SetFile(v File)` + +SetFile gets a reference to the given File and assigns it to the File field. + +### GetFiles + +`func (o *FileSchemaTestClass) GetFiles() []File` + +GetFiles returns the Files field if non-nil, zero value otherwise. + +### GetFilesOk + +`func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool)` + +GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFiles + +`func (o *FileSchemaTestClass) HasFiles() bool` + +HasFiles returns a boolean if a field has been set. + +### SetFiles + +`func (o *FileSchemaTestClass) SetFiles(v []File)` + +SetFiles gets a reference to the given []File and assigns it to the Files field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/FormatTest.md b/samples/client/petstore/go/go-petstore/docs/FormatTest.md index ee089a03cd79..6711f4f4fcc7 100644 --- a/samples/client/petstore/go/go-petstore/docs/FormatTest.md +++ b/samples/client/petstore/go/go-petstore/docs/FormatTest.md @@ -4,19 +4,347 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Integer** | **int32** | | [optional] -**Int32** | **int32** | | [optional] -**Int64** | **int64** | | [optional] -**Number** | **float32** | | -**Float** | **float32** | | [optional] -**Double** | **float64** | | [optional] -**String** | **string** | | [optional] -**Byte** | **string** | | -**Binary** | [***os.File**](*os.File.md) | | [optional] -**Date** | **string** | | -**DateTime** | [**time.Time**](time.Time.md) | | [optional] -**Uuid** | **string** | | [optional] -**Password** | **string** | | +**Integer** | Pointer to **int32** | | [optional] +**Int32** | Pointer to **int32** | | [optional] +**Int64** | Pointer to **int64** | | [optional] +**Number** | Pointer to **float32** | | +**Float** | Pointer to **float32** | | [optional] +**Double** | Pointer to **float64** | | [optional] +**String** | Pointer to **string** | | [optional] +**Byte** | Pointer to **string** | | +**Binary** | Pointer to [***os.File**](*os.File.md) | | [optional] +**Date** | Pointer to **string** | | +**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Uuid** | Pointer to **string** | | [optional] +**Password** | Pointer to **string** | | + +## Methods + +### GetInteger + +`func (o *FormatTest) GetInteger() int32` + +GetInteger returns the Integer field if non-nil, zero value otherwise. + +### GetIntegerOk + +`func (o *FormatTest) GetIntegerOk() (int32, bool)` + +GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInteger + +`func (o *FormatTest) HasInteger() bool` + +HasInteger returns a boolean if a field has been set. + +### SetInteger + +`func (o *FormatTest) SetInteger(v int32)` + +SetInteger gets a reference to the given int32 and assigns it to the Integer field. + +### GetInt32 + +`func (o *FormatTest) GetInt32() int32` + +GetInt32 returns the Int32 field if non-nil, zero value otherwise. + +### GetInt32Ok + +`func (o *FormatTest) GetInt32Ok() (int32, bool)` + +GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInt32 + +`func (o *FormatTest) HasInt32() bool` + +HasInt32 returns a boolean if a field has been set. + +### SetInt32 + +`func (o *FormatTest) SetInt32(v int32)` + +SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. + +### GetInt64 + +`func (o *FormatTest) GetInt64() int64` + +GetInt64 returns the Int64 field if non-nil, zero value otherwise. + +### GetInt64Ok + +`func (o *FormatTest) GetInt64Ok() (int64, bool)` + +GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInt64 + +`func (o *FormatTest) HasInt64() bool` + +HasInt64 returns a boolean if a field has been set. + +### SetInt64 + +`func (o *FormatTest) SetInt64(v int64)` + +SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. + +### GetNumber + +`func (o *FormatTest) GetNumber() float32` + +GetNumber returns the Number field if non-nil, zero value otherwise. + +### GetNumberOk + +`func (o *FormatTest) GetNumberOk() (float32, bool)` + +GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumber + +`func (o *FormatTest) HasNumber() bool` + +HasNumber returns a boolean if a field has been set. + +### SetNumber + +`func (o *FormatTest) SetNumber(v float32)` + +SetNumber gets a reference to the given float32 and assigns it to the Number field. + +### GetFloat + +`func (o *FormatTest) GetFloat() float32` + +GetFloat returns the Float field if non-nil, zero value otherwise. + +### GetFloatOk + +`func (o *FormatTest) GetFloatOk() (float32, bool)` + +GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFloat + +`func (o *FormatTest) HasFloat() bool` + +HasFloat returns a boolean if a field has been set. + +### SetFloat + +`func (o *FormatTest) SetFloat(v float32)` + +SetFloat gets a reference to the given float32 and assigns it to the Float field. + +### GetDouble + +`func (o *FormatTest) GetDouble() float64` + +GetDouble returns the Double field if non-nil, zero value otherwise. + +### GetDoubleOk + +`func (o *FormatTest) GetDoubleOk() (float64, bool)` + +GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDouble + +`func (o *FormatTest) HasDouble() bool` + +HasDouble returns a boolean if a field has been set. + +### SetDouble + +`func (o *FormatTest) SetDouble(v float64)` + +SetDouble gets a reference to the given float64 and assigns it to the Double field. + +### GetString + +`func (o *FormatTest) GetString() string` + +GetString returns the String field if non-nil, zero value otherwise. + +### GetStringOk + +`func (o *FormatTest) GetStringOk() (string, bool)` + +GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasString + +`func (o *FormatTest) HasString() bool` + +HasString returns a boolean if a field has been set. + +### SetString + +`func (o *FormatTest) SetString(v string)` + +SetString gets a reference to the given string and assigns it to the String field. + +### GetByte + +`func (o *FormatTest) GetByte() string` + +GetByte returns the Byte field if non-nil, zero value otherwise. + +### GetByteOk + +`func (o *FormatTest) GetByteOk() (string, bool)` + +GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasByte + +`func (o *FormatTest) HasByte() bool` + +HasByte returns a boolean if a field has been set. + +### SetByte + +`func (o *FormatTest) SetByte(v string)` + +SetByte gets a reference to the given string and assigns it to the Byte field. + +### GetBinary + +`func (o *FormatTest) GetBinary() *os.File` + +GetBinary returns the Binary field if non-nil, zero value otherwise. + +### GetBinaryOk + +`func (o *FormatTest) GetBinaryOk() (*os.File, bool)` + +GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBinary + +`func (o *FormatTest) HasBinary() bool` + +HasBinary returns a boolean if a field has been set. + +### SetBinary + +`func (o *FormatTest) SetBinary(v *os.File)` + +SetBinary gets a reference to the given *os.File and assigns it to the Binary field. + +### GetDate + +`func (o *FormatTest) GetDate() string` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *FormatTest) GetDateOk() (string, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDate + +`func (o *FormatTest) HasDate() bool` + +HasDate returns a boolean if a field has been set. + +### SetDate + +`func (o *FormatTest) SetDate(v string)` + +SetDate gets a reference to the given string and assigns it to the Date field. + +### GetDateTime + +`func (o *FormatTest) GetDateTime() time.Time` + +GetDateTime returns the DateTime field if non-nil, zero value otherwise. + +### GetDateTimeOk + +`func (o *FormatTest) GetDateTimeOk() (time.Time, bool)` + +GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDateTime + +`func (o *FormatTest) HasDateTime() bool` + +HasDateTime returns a boolean if a field has been set. + +### SetDateTime + +`func (o *FormatTest) SetDateTime(v time.Time)` + +SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. + +### GetUuid + +`func (o *FormatTest) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *FormatTest) GetUuidOk() (string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUuid + +`func (o *FormatTest) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuid + +`func (o *FormatTest) SetUuid(v string)` + +SetUuid gets a reference to the given string and assigns it to the Uuid field. + +### GetPassword + +`func (o *FormatTest) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *FormatTest) GetPasswordOk() (string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPassword + +`func (o *FormatTest) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### SetPassword + +`func (o *FormatTest) SetPassword(v string)` + +SetPassword gets a reference to the given string and assigns it to the Password field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md b/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md index 9e2f49573597..78f67041d33a 100644 --- a/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Foo** | **string** | | [optional] +**Bar** | Pointer to **string** | | [optional] +**Foo** | Pointer to **string** | | [optional] + +## Methods + +### GetBar + +`func (o *HasOnlyReadOnly) GetBar() string` + +GetBar returns the Bar field if non-nil, zero value otherwise. + +### GetBarOk + +`func (o *HasOnlyReadOnly) GetBarOk() (string, bool)` + +GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBar + +`func (o *HasOnlyReadOnly) HasBar() bool` + +HasBar returns a boolean if a field has been set. + +### SetBar + +`func (o *HasOnlyReadOnly) SetBar(v string)` + +SetBar gets a reference to the given string and assigns it to the Bar field. + +### GetFoo + +`func (o *HasOnlyReadOnly) GetFoo() string` + +GetFoo returns the Foo field if non-nil, zero value otherwise. + +### GetFooOk + +`func (o *HasOnlyReadOnly) GetFooOk() (string, bool)` + +GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFoo + +`func (o *HasOnlyReadOnly) HasFoo() bool` + +HasFoo returns a boolean if a field has been set. + +### SetFoo + +`func (o *HasOnlyReadOnly) SetFoo(v string)` + +SetFoo gets a reference to the given string and assigns it to the Foo field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/List.md b/samples/client/petstore/go/go-petstore/docs/List.md index bba2e5299066..ca8849936e72 100644 --- a/samples/client/petstore/go/go-petstore/docs/List.md +++ b/samples/client/petstore/go/go-petstore/docs/List.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Var123List** | **string** | | [optional] +**Var123List** | Pointer to **string** | | [optional] + +## Methods + +### GetVar123List + +`func (o *List) GetVar123List() string` + +GetVar123List returns the Var123List field if non-nil, zero value otherwise. + +### GetVar123ListOk + +`func (o *List) GetVar123ListOk() (string, bool)` + +GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasVar123List + +`func (o *List) HasVar123List() bool` + +HasVar123List returns a boolean if a field has been set. + +### SetVar123List + +`func (o *List) SetVar123List(v string)` + +SetVar123List gets a reference to the given string and assigns it to the Var123List field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/MapTest.md b/samples/client/petstore/go/go-petstore/docs/MapTest.md index 6645e044658d..6c84c2e89c2a 100644 --- a/samples/client/petstore/go/go-petstore/docs/MapTest.md +++ b/samples/client/petstore/go/go-petstore/docs/MapTest.md @@ -4,10 +4,113 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional] -**MapOfEnumString** | **map[string]string** | | [optional] -**DirectMap** | **map[string]bool** | | [optional] -**IndirectMap** | **map[string]bool** | | [optional] +**MapMapOfString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] +**MapOfEnumString** | Pointer to **map[string]string** | | [optional] +**DirectMap** | Pointer to **map[string]bool** | | [optional] +**IndirectMap** | Pointer to **map[string]bool** | | [optional] + +## Methods + +### GetMapMapOfString + +`func (o *MapTest) GetMapMapOfString() map[string]map[string]string` + +GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. + +### GetMapMapOfStringOk + +`func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool)` + +GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapMapOfString + +`func (o *MapTest) HasMapMapOfString() bool` + +HasMapMapOfString returns a boolean if a field has been set. + +### SetMapMapOfString + +`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)` + +SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field. + +### GetMapOfEnumString + +`func (o *MapTest) GetMapOfEnumString() map[string]string` + +GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. + +### GetMapOfEnumStringOk + +`func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool)` + +GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMapOfEnumString + +`func (o *MapTest) HasMapOfEnumString() bool` + +HasMapOfEnumString returns a boolean if a field has been set. + +### SetMapOfEnumString + +`func (o *MapTest) SetMapOfEnumString(v map[string]string)` + +SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field. + +### GetDirectMap + +`func (o *MapTest) GetDirectMap() map[string]bool` + +GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. + +### GetDirectMapOk + +`func (o *MapTest) GetDirectMapOk() (map[string]bool, bool)` + +GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDirectMap + +`func (o *MapTest) HasDirectMap() bool` + +HasDirectMap returns a boolean if a field has been set. + +### SetDirectMap + +`func (o *MapTest) SetDirectMap(v map[string]bool)` + +SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field. + +### GetIndirectMap + +`func (o *MapTest) GetIndirectMap() map[string]bool` + +GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. + +### GetIndirectMapOk + +`func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool)` + +GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIndirectMap + +`func (o *MapTest) HasIndirectMap() bool` + +HasIndirectMap returns a boolean if a field has been set. + +### SetIndirectMap + +`func (o *MapTest) SetIndirectMap(v map[string]bool)` + +SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index a2ce1068b279..49f7c8eb7687 100644 --- a/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] -**DateTime** | [**time.Time**](time.Time.md) | | [optional] -**Map** | [**map[string]Animal**](Animal.md) | | [optional] +**Uuid** | Pointer to **string** | | [optional] +**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional] + +## Methods + +### GetUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)` + +GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### SetUuid + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` + +SetUuid gets a reference to the given string and assigns it to the Uuid field. + +### GetDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time` + +GetDateTime returns the DateTime field if non-nil, zero value otherwise. + +### GetDateTimeOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool)` + +GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool` + +HasDateTime returns a boolean if a field has been set. + +### SetDateTime + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)` + +SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. + +### GetMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal` + +GetMap returns the Map field if non-nil, zero value otherwise. + +### GetMapOk + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool)` + +GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool` + +HasMap returns a boolean if a field has been set. + +### SetMap + +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)` + +SetMap gets a reference to the given map[string]Animal and assigns it to the Map field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Model200Response.md b/samples/client/petstore/go/go-petstore/docs/Model200Response.md index 27b93bd1549f..d0bde7b7f7b3 100644 --- a/samples/client/petstore/go/go-petstore/docs/Model200Response.md +++ b/samples/client/petstore/go/go-petstore/docs/Model200Response.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **int32** | | [optional] -**Class** | **string** | | [optional] +**Name** | Pointer to **int32** | | [optional] +**Class** | Pointer to **string** | | [optional] + +## Methods + +### GetName + +`func (o *Model200Response) GetName() int32` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Model200Response) GetNameOk() (int32, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Model200Response) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Model200Response) SetName(v int32)` + +SetName gets a reference to the given int32 and assigns it to the Name field. + +### GetClass + +`func (o *Model200Response) GetClass() string` + +GetClass returns the Class field if non-nil, zero value otherwise. + +### GetClassOk + +`func (o *Model200Response) GetClassOk() (string, bool)` + +GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasClass + +`func (o *Model200Response) HasClass() bool` + +HasClass returns a boolean if a field has been set. + +### SetClass + +`func (o *Model200Response) SetClass(v string)` + +SetClass gets a reference to the given string and assigns it to the Class field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Name.md b/samples/client/petstore/go/go-petstore/docs/Name.md index 453e54d98516..7cc6fd6a3a43 100644 --- a/samples/client/petstore/go/go-petstore/docs/Name.md +++ b/samples/client/petstore/go/go-petstore/docs/Name.md @@ -4,10 +4,113 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **int32** | | -**SnakeCase** | **int32** | | [optional] -**Property** | **string** | | [optional] -**Var123Number** | **int32** | | [optional] +**Name** | Pointer to **int32** | | +**SnakeCase** | Pointer to **int32** | | [optional] +**Property** | Pointer to **string** | | [optional] +**Var123Number** | Pointer to **int32** | | [optional] + +## Methods + +### GetName + +`func (o *Name) GetName() int32` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Name) GetNameOk() (int32, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Name) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Name) SetName(v int32)` + +SetName gets a reference to the given int32 and assigns it to the Name field. + +### GetSnakeCase + +`func (o *Name) GetSnakeCase() int32` + +GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. + +### GetSnakeCaseOk + +`func (o *Name) GetSnakeCaseOk() (int32, bool)` + +GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSnakeCase + +`func (o *Name) HasSnakeCase() bool` + +HasSnakeCase returns a boolean if a field has been set. + +### SetSnakeCase + +`func (o *Name) SetSnakeCase(v int32)` + +SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field. + +### GetProperty + +`func (o *Name) GetProperty() string` + +GetProperty returns the Property field if non-nil, zero value otherwise. + +### GetPropertyOk + +`func (o *Name) GetPropertyOk() (string, bool)` + +GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProperty + +`func (o *Name) HasProperty() bool` + +HasProperty returns a boolean if a field has been set. + +### SetProperty + +`func (o *Name) SetProperty(v string)` + +SetProperty gets a reference to the given string and assigns it to the Property field. + +### GetVar123Number + +`func (o *Name) GetVar123Number() int32` + +GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. + +### GetVar123NumberOk + +`func (o *Name) GetVar123NumberOk() (int32, bool)` + +GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasVar123Number + +`func (o *Name) HasVar123Number() bool` + +HasVar123Number returns a boolean if a field has been set. + +### SetVar123Number + +`func (o *Name) SetVar123Number(v int32)` + +SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/NumberOnly.md b/samples/client/petstore/go/go-petstore/docs/NumberOnly.md index 604cf37eeded..c8dcac264c2d 100644 --- a/samples/client/petstore/go/go-petstore/docs/NumberOnly.md +++ b/samples/client/petstore/go/go-petstore/docs/NumberOnly.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**JustNumber** | **float32** | | [optional] +**JustNumber** | Pointer to **float32** | | [optional] + +## Methods + +### GetJustNumber + +`func (o *NumberOnly) GetJustNumber() float32` + +GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. + +### GetJustNumberOk + +`func (o *NumberOnly) GetJustNumberOk() (float32, bool)` + +GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasJustNumber + +`func (o *NumberOnly) HasJustNumber() bool` + +HasJustNumber returns a boolean if a field has been set. + +### SetJustNumber + +`func (o *NumberOnly) SetJustNumber(v float32)` + +SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Order.md b/samples/client/petstore/go/go-petstore/docs/Order.md index eeef0971005e..8aa8bbd1ee54 100644 --- a/samples/client/petstore/go/go-petstore/docs/Order.md +++ b/samples/client/petstore/go/go-petstore/docs/Order.md @@ -4,12 +4,165 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**PetId** | **int64** | | [optional] -**Quantity** | **int32** | | [optional] -**ShipDate** | [**time.Time**](time.Time.md) | | [optional] -**Status** | **string** | Order Status | [optional] -**Complete** | **bool** | | [optional] [default to false] +**Id** | Pointer to **int64** | | [optional] +**PetId** | Pointer to **int64** | | [optional] +**Quantity** | Pointer to **int32** | | [optional] +**ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Status** | Pointer to **string** | Order Status | [optional] +**Complete** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### GetId + +`func (o *Order) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Order) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Order) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Order) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetPetId + +`func (o *Order) GetPetId() int64` + +GetPetId returns the PetId field if non-nil, zero value otherwise. + +### GetPetIdOk + +`func (o *Order) GetPetIdOk() (int64, bool)` + +GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPetId + +`func (o *Order) HasPetId() bool` + +HasPetId returns a boolean if a field has been set. + +### SetPetId + +`func (o *Order) SetPetId(v int64)` + +SetPetId gets a reference to the given int64 and assigns it to the PetId field. + +### GetQuantity + +`func (o *Order) GetQuantity() int32` + +GetQuantity returns the Quantity field if non-nil, zero value otherwise. + +### GetQuantityOk + +`func (o *Order) GetQuantityOk() (int32, bool)` + +GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasQuantity + +`func (o *Order) HasQuantity() bool` + +HasQuantity returns a boolean if a field has been set. + +### SetQuantity + +`func (o *Order) SetQuantity(v int32)` + +SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. + +### GetShipDate + +`func (o *Order) GetShipDate() time.Time` + +GetShipDate returns the ShipDate field if non-nil, zero value otherwise. + +### GetShipDateOk + +`func (o *Order) GetShipDateOk() (time.Time, bool)` + +GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasShipDate + +`func (o *Order) HasShipDate() bool` + +HasShipDate returns a boolean if a field has been set. + +### SetShipDate + +`func (o *Order) SetShipDate(v time.Time)` + +SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field. + +### GetStatus + +`func (o *Order) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Order) GetStatusOk() (string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *Order) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *Order) SetStatus(v string)` + +SetStatus gets a reference to the given string and assigns it to the Status field. + +### GetComplete + +`func (o *Order) GetComplete() bool` + +GetComplete returns the Complete field if non-nil, zero value otherwise. + +### GetCompleteOk + +`func (o *Order) GetCompleteOk() (bool, bool)` + +GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasComplete + +`func (o *Order) HasComplete() bool` + +HasComplete returns a boolean if a field has been set. + +### SetComplete + +`func (o *Order) SetComplete(v bool)` + +SetComplete gets a reference to the given bool and assigns it to the Complete field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/OuterComposite.md b/samples/client/petstore/go/go-petstore/docs/OuterComposite.md index df9bce1bd904..f89080222827 100644 --- a/samples/client/petstore/go/go-petstore/docs/OuterComposite.md +++ b/samples/client/petstore/go/go-petstore/docs/OuterComposite.md @@ -4,9 +4,87 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MyNumber** | **float32** | | [optional] -**MyString** | **string** | | [optional] -**MyBoolean** | **bool** | | [optional] +**MyNumber** | Pointer to **float32** | | [optional] +**MyString** | Pointer to **string** | | [optional] +**MyBoolean** | Pointer to **bool** | | [optional] + +## Methods + +### GetMyNumber + +`func (o *OuterComposite) GetMyNumber() float32` + +GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. + +### GetMyNumberOk + +`func (o *OuterComposite) GetMyNumberOk() (float32, bool)` + +GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyNumber + +`func (o *OuterComposite) HasMyNumber() bool` + +HasMyNumber returns a boolean if a field has been set. + +### SetMyNumber + +`func (o *OuterComposite) SetMyNumber(v float32)` + +SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field. + +### GetMyString + +`func (o *OuterComposite) GetMyString() string` + +GetMyString returns the MyString field if non-nil, zero value otherwise. + +### GetMyStringOk + +`func (o *OuterComposite) GetMyStringOk() (string, bool)` + +GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyString + +`func (o *OuterComposite) HasMyString() bool` + +HasMyString returns a boolean if a field has been set. + +### SetMyString + +`func (o *OuterComposite) SetMyString(v string)` + +SetMyString gets a reference to the given string and assigns it to the MyString field. + +### GetMyBoolean + +`func (o *OuterComposite) GetMyBoolean() bool` + +GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. + +### GetMyBooleanOk + +`func (o *OuterComposite) GetMyBooleanOk() (bool, bool)` + +GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMyBoolean + +`func (o *OuterComposite) HasMyBoolean() bool` + +HasMyBoolean returns a boolean if a field has been set. + +### SetMyBoolean + +`func (o *OuterComposite) SetMyBoolean(v bool)` + +SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/OuterEnum.md b/samples/client/petstore/go/go-petstore/docs/OuterEnum.md index c97466159c56..13bed2d17fd8 100644 --- a/samples/client/petstore/go/go-petstore/docs/OuterEnum.md +++ b/samples/client/petstore/go/go-petstore/docs/OuterEnum.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Pet.md b/samples/client/petstore/go/go-petstore/docs/Pet.md index c48104c63971..dba9589f9d77 100644 --- a/samples/client/petstore/go/go-petstore/docs/Pet.md +++ b/samples/client/petstore/go/go-petstore/docs/Pet.md @@ -4,12 +4,165 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Name** | **string** | | -**PhotoUrls** | **[]string** | | -**Tags** | [**[]Tag**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [optional] +**Id** | Pointer to **int64** | | [optional] +**Category** | Pointer to [**Category**](Category.md) | | [optional] +**Name** | Pointer to **string** | | +**PhotoUrls** | Pointer to **[]string** | | +**Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional] +**Status** | Pointer to **string** | pet status in the store | [optional] + +## Methods + +### GetId + +`func (o *Pet) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Pet) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Pet) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Pet) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetCategory + +`func (o *Pet) GetCategory() Category` + +GetCategory returns the Category field if non-nil, zero value otherwise. + +### GetCategoryOk + +`func (o *Pet) GetCategoryOk() (Category, bool)` + +GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCategory + +`func (o *Pet) HasCategory() bool` + +HasCategory returns a boolean if a field has been set. + +### SetCategory + +`func (o *Pet) SetCategory(v Category)` + +SetCategory gets a reference to the given Category and assigns it to the Category field. + +### GetName + +`func (o *Pet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Pet) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Pet) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Pet) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetPhotoUrls + +`func (o *Pet) GetPhotoUrls() []string` + +GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. + +### GetPhotoUrlsOk + +`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)` + +GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPhotoUrls + +`func (o *Pet) HasPhotoUrls() bool` + +HasPhotoUrls returns a boolean if a field has been set. + +### SetPhotoUrls + +`func (o *Pet) SetPhotoUrls(v []string)` + +SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. + +### GetTags + +`func (o *Pet) GetTags() []Tag` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Pet) GetTagsOk() ([]Tag, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTags + +`func (o *Pet) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### SetTags + +`func (o *Pet) SetTags(v []Tag)` + +SetTags gets a reference to the given []Tag and assigns it to the Tags field. + +### GetStatus + +`func (o *Pet) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Pet) GetStatusOk() (string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *Pet) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *Pet) SetStatus(v string)` + +SetStatus gets a reference to the given string and assigns it to the Status field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md b/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md index 3fee799f2951..552f0170bd85 100644 --- a/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] -**Baz** | **string** | | [optional] +**Bar** | Pointer to **string** | | [optional] +**Baz** | Pointer to **string** | | [optional] + +## Methods + +### GetBar + +`func (o *ReadOnlyFirst) GetBar() string` + +GetBar returns the Bar field if non-nil, zero value otherwise. + +### GetBarOk + +`func (o *ReadOnlyFirst) GetBarOk() (string, bool)` + +GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBar + +`func (o *ReadOnlyFirst) HasBar() bool` + +HasBar returns a boolean if a field has been set. + +### SetBar + +`func (o *ReadOnlyFirst) SetBar(v string)` + +SetBar gets a reference to the given string and assigns it to the Bar field. + +### GetBaz + +`func (o *ReadOnlyFirst) GetBaz() string` + +GetBaz returns the Baz field if non-nil, zero value otherwise. + +### GetBazOk + +`func (o *ReadOnlyFirst) GetBazOk() (string, bool)` + +GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBaz + +`func (o *ReadOnlyFirst) HasBaz() bool` + +HasBaz returns a boolean if a field has been set. + +### SetBaz + +`func (o *ReadOnlyFirst) SetBaz(v string)` + +SetBaz gets a reference to the given string and assigns it to the Baz field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Return.md b/samples/client/petstore/go/go-petstore/docs/Return.md index 11be0b27c503..1facabb6bbf3 100644 --- a/samples/client/petstore/go/go-petstore/docs/Return.md +++ b/samples/client/petstore/go/go-petstore/docs/Return.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Return** | **int32** | | [optional] +**Return** | Pointer to **int32** | | [optional] + +## Methods + +### GetReturn + +`func (o *Return) GetReturn() int32` + +GetReturn returns the Return field if non-nil, zero value otherwise. + +### GetReturnOk + +`func (o *Return) GetReturnOk() (int32, bool)` + +GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasReturn + +`func (o *Return) HasReturn() bool` + +HasReturn returns a boolean if a field has been set. + +### SetReturn + +`func (o *Return) SetReturn(v int32)` + +SetReturn gets a reference to the given int32 and assigns it to the Return field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/SpecialModelName.md b/samples/client/petstore/go/go-petstore/docs/SpecialModelName.md index 96d7a28a409a..34d8d8d89c72 100644 --- a/samples/client/petstore/go/go-petstore/docs/SpecialModelName.md +++ b/samples/client/petstore/go/go-petstore/docs/SpecialModelName.md @@ -4,7 +4,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SpecialPropertyName** | **int64** | | [optional] +**SpecialPropertyName** | Pointer to **int64** | | [optional] + +## Methods + +### GetSpecialPropertyName + +`func (o *SpecialModelName) GetSpecialPropertyName() int64` + +GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. + +### GetSpecialPropertyNameOk + +`func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool)` + +GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSpecialPropertyName + +`func (o *SpecialModelName) HasSpecialPropertyName() bool` + +HasSpecialPropertyName returns a boolean if a field has been set. + +### SetSpecialPropertyName + +`func (o *SpecialModelName) SetSpecialPropertyName(v int64)` + +SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/Tag.md b/samples/client/petstore/go/go-petstore/docs/Tag.md index d6b3cc117b52..bf868298a5e7 100644 --- a/samples/client/petstore/go/go-petstore/docs/Tag.md +++ b/samples/client/petstore/go/go-petstore/docs/Tag.md @@ -4,8 +4,61 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Name** | **string** | | [optional] +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### GetId + +`func (o *Tag) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Tag) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Tag) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Tag) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetName + +`func (o *Tag) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Tag) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Tag) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Tag) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/TypeHolderDefault.md b/samples/client/petstore/go/go-petstore/docs/TypeHolderDefault.md index 1b9f077c303b..85097ef9fbe5 100644 --- a/samples/client/petstore/go/go-petstore/docs/TypeHolderDefault.md +++ b/samples/client/petstore/go/go-petstore/docs/TypeHolderDefault.md @@ -4,11 +4,139 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**StringItem** | **string** | | [default to what] -**NumberItem** | **float32** | | -**IntegerItem** | **int32** | | -**BoolItem** | **bool** | | [default to true] -**ArrayItem** | **[]int32** | | +**StringItem** | Pointer to **string** | | [default to what] +**NumberItem** | Pointer to **float32** | | +**IntegerItem** | Pointer to **int32** | | +**BoolItem** | Pointer to **bool** | | [default to true] +**ArrayItem** | Pointer to **[]int32** | | + +## Methods + +### GetStringItem + +`func (o *TypeHolderDefault) GetStringItem() string` + +GetStringItem returns the StringItem field if non-nil, zero value otherwise. + +### GetStringItemOk + +`func (o *TypeHolderDefault) GetStringItemOk() (string, bool)` + +GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStringItem + +`func (o *TypeHolderDefault) HasStringItem() bool` + +HasStringItem returns a boolean if a field has been set. + +### SetStringItem + +`func (o *TypeHolderDefault) SetStringItem(v string)` + +SetStringItem gets a reference to the given string and assigns it to the StringItem field. + +### GetNumberItem + +`func (o *TypeHolderDefault) GetNumberItem() float32` + +GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. + +### GetNumberItemOk + +`func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool)` + +GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumberItem + +`func (o *TypeHolderDefault) HasNumberItem() bool` + +HasNumberItem returns a boolean if a field has been set. + +### SetNumberItem + +`func (o *TypeHolderDefault) SetNumberItem(v float32)` + +SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. + +### GetIntegerItem + +`func (o *TypeHolderDefault) GetIntegerItem() int32` + +GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. + +### GetIntegerItemOk + +`func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool)` + +GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIntegerItem + +`func (o *TypeHolderDefault) HasIntegerItem() bool` + +HasIntegerItem returns a boolean if a field has been set. + +### SetIntegerItem + +`func (o *TypeHolderDefault) SetIntegerItem(v int32)` + +SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. + +### GetBoolItem + +`func (o *TypeHolderDefault) GetBoolItem() bool` + +GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. + +### GetBoolItemOk + +`func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool)` + +GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBoolItem + +`func (o *TypeHolderDefault) HasBoolItem() bool` + +HasBoolItem returns a boolean if a field has been set. + +### SetBoolItem + +`func (o *TypeHolderDefault) SetBoolItem(v bool)` + +SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. + +### GetArrayItem + +`func (o *TypeHolderDefault) GetArrayItem() []int32` + +GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. + +### GetArrayItemOk + +`func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool)` + +GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayItem + +`func (o *TypeHolderDefault) HasArrayItem() bool` + +HasArrayItem returns a boolean if a field has been set. + +### SetArrayItem + +`func (o *TypeHolderDefault) SetArrayItem(v []int32)` + +SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/TypeHolderExample.md b/samples/client/petstore/go/go-petstore/docs/TypeHolderExample.md index abe85f9799d1..f9a276c529f1 100644 --- a/samples/client/petstore/go/go-petstore/docs/TypeHolderExample.md +++ b/samples/client/petstore/go/go-petstore/docs/TypeHolderExample.md @@ -4,11 +4,139 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**StringItem** | **string** | | -**NumberItem** | **float32** | | -**IntegerItem** | **int32** | | -**BoolItem** | **bool** | | -**ArrayItem** | **[]int32** | | +**StringItem** | Pointer to **string** | | +**NumberItem** | Pointer to **float32** | | +**IntegerItem** | Pointer to **int32** | | +**BoolItem** | Pointer to **bool** | | +**ArrayItem** | Pointer to **[]int32** | | + +## Methods + +### GetStringItem + +`func (o *TypeHolderExample) GetStringItem() string` + +GetStringItem returns the StringItem field if non-nil, zero value otherwise. + +### GetStringItemOk + +`func (o *TypeHolderExample) GetStringItemOk() (string, bool)` + +GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStringItem + +`func (o *TypeHolderExample) HasStringItem() bool` + +HasStringItem returns a boolean if a field has been set. + +### SetStringItem + +`func (o *TypeHolderExample) SetStringItem(v string)` + +SetStringItem gets a reference to the given string and assigns it to the StringItem field. + +### GetNumberItem + +`func (o *TypeHolderExample) GetNumberItem() float32` + +GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. + +### GetNumberItemOk + +`func (o *TypeHolderExample) GetNumberItemOk() (float32, bool)` + +GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNumberItem + +`func (o *TypeHolderExample) HasNumberItem() bool` + +HasNumberItem returns a boolean if a field has been set. + +### SetNumberItem + +`func (o *TypeHolderExample) SetNumberItem(v float32)` + +SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. + +### GetIntegerItem + +`func (o *TypeHolderExample) GetIntegerItem() int32` + +GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. + +### GetIntegerItemOk + +`func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool)` + +GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIntegerItem + +`func (o *TypeHolderExample) HasIntegerItem() bool` + +HasIntegerItem returns a boolean if a field has been set. + +### SetIntegerItem + +`func (o *TypeHolderExample) SetIntegerItem(v int32)` + +SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. + +### GetBoolItem + +`func (o *TypeHolderExample) GetBoolItem() bool` + +GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. + +### GetBoolItemOk + +`func (o *TypeHolderExample) GetBoolItemOk() (bool, bool)` + +GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBoolItem + +`func (o *TypeHolderExample) HasBoolItem() bool` + +HasBoolItem returns a boolean if a field has been set. + +### SetBoolItem + +`func (o *TypeHolderExample) SetBoolItem(v bool)` + +SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. + +### GetArrayItem + +`func (o *TypeHolderExample) GetArrayItem() []int32` + +GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. + +### GetArrayItemOk + +`func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool)` + +GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasArrayItem + +`func (o *TypeHolderExample) HasArrayItem() bool` + +HasArrayItem returns a boolean if a field has been set. + +### SetArrayItem + +`func (o *TypeHolderExample) SetArrayItem(v []int32)` + +SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/User.md b/samples/client/petstore/go/go-petstore/docs/User.md index 7675d7ff701b..8b93a65d8ab7 100644 --- a/samples/client/petstore/go/go-petstore/docs/User.md +++ b/samples/client/petstore/go/go-petstore/docs/User.md @@ -4,14 +4,217 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **int64** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] -**Email** | **string** | | [optional] -**Password** | **string** | | [optional] -**Phone** | **string** | | [optional] -**UserStatus** | **int32** | User Status | [optional] +**Id** | Pointer to **int64** | | [optional] +**Username** | Pointer to **string** | | [optional] +**FirstName** | Pointer to **string** | | [optional] +**LastName** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**Password** | Pointer to **string** | | [optional] +**Phone** | Pointer to **string** | | [optional] +**UserStatus** | Pointer to **int32** | User Status | [optional] + +## Methods + +### GetId + +`func (o *User) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *User) GetIdOk() (int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *User) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *User) SetId(v int64)` + +SetId gets a reference to the given int64 and assigns it to the Id field. + +### GetUsername + +`func (o *User) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *User) GetUsernameOk() (string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUsername + +`func (o *User) HasUsername() bool` + +HasUsername returns a boolean if a field has been set. + +### SetUsername + +`func (o *User) SetUsername(v string)` + +SetUsername gets a reference to the given string and assigns it to the Username field. + +### GetFirstName + +`func (o *User) GetFirstName() string` + +GetFirstName returns the FirstName field if non-nil, zero value otherwise. + +### GetFirstNameOk + +`func (o *User) GetFirstNameOk() (string, bool)` + +GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFirstName + +`func (o *User) HasFirstName() bool` + +HasFirstName returns a boolean if a field has been set. + +### SetFirstName + +`func (o *User) SetFirstName(v string)` + +SetFirstName gets a reference to the given string and assigns it to the FirstName field. + +### GetLastName + +`func (o *User) GetLastName() string` + +GetLastName returns the LastName field if non-nil, zero value otherwise. + +### GetLastNameOk + +`func (o *User) GetLastNameOk() (string, bool)` + +GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasLastName + +`func (o *User) HasLastName() bool` + +HasLastName returns a boolean if a field has been set. + +### SetLastName + +`func (o *User) SetLastName(v string)` + +SetLastName gets a reference to the given string and assigns it to the LastName field. + +### GetEmail + +`func (o *User) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *User) GetEmailOk() (string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEmail + +`func (o *User) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmail + +`func (o *User) SetEmail(v string)` + +SetEmail gets a reference to the given string and assigns it to the Email field. + +### GetPassword + +`func (o *User) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *User) GetPasswordOk() (string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPassword + +`func (o *User) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### SetPassword + +`func (o *User) SetPassword(v string)` + +SetPassword gets a reference to the given string and assigns it to the Password field. + +### GetPhone + +`func (o *User) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *User) GetPhoneOk() (string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPhone + +`func (o *User) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### SetPhone + +`func (o *User) SetPhone(v string)` + +SetPhone gets a reference to the given string and assigns it to the Phone field. + +### GetUserStatus + +`func (o *User) GetUserStatus() int32` + +GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. + +### GetUserStatusOk + +`func (o *User) GetUserStatusOk() (int32, bool)` + +GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUserStatus + +`func (o *User) HasUserStatus() bool` + +HasUserStatus returns a boolean if a field has been set. + +### SetUserStatus + +`func (o *User) SetUserStatus(v int32)` + +SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/docs/XmlItem.md b/samples/client/petstore/go/go-petstore/docs/XmlItem.md index 8a9c2dc0b504..99c95015d5ff 100644 --- a/samples/client/petstore/go/go-petstore/docs/XmlItem.md +++ b/samples/client/petstore/go/go-petstore/docs/XmlItem.md @@ -4,35 +4,763 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AttributeString** | **string** | | [optional] -**AttributeNumber** | **float32** | | [optional] -**AttributeInteger** | **int32** | | [optional] -**AttributeBoolean** | **bool** | | [optional] -**WrappedArray** | **[]int32** | | [optional] -**NameString** | **string** | | [optional] -**NameNumber** | **float32** | | [optional] -**NameInteger** | **int32** | | [optional] -**NameBoolean** | **bool** | | [optional] -**NameArray** | **[]int32** | | [optional] -**NameWrappedArray** | **[]int32** | | [optional] -**PrefixString** | **string** | | [optional] -**PrefixNumber** | **float32** | | [optional] -**PrefixInteger** | **int32** | | [optional] -**PrefixBoolean** | **bool** | | [optional] -**PrefixArray** | **[]int32** | | [optional] -**PrefixWrappedArray** | **[]int32** | | [optional] -**NamespaceString** | **string** | | [optional] -**NamespaceNumber** | **float32** | | [optional] -**NamespaceInteger** | **int32** | | [optional] -**NamespaceBoolean** | **bool** | | [optional] -**NamespaceArray** | **[]int32** | | [optional] -**NamespaceWrappedArray** | **[]int32** | | [optional] -**PrefixNsString** | **string** | | [optional] -**PrefixNsNumber** | **float32** | | [optional] -**PrefixNsInteger** | **int32** | | [optional] -**PrefixNsBoolean** | **bool** | | [optional] -**PrefixNsArray** | **[]int32** | | [optional] -**PrefixNsWrappedArray** | **[]int32** | | [optional] +**AttributeString** | Pointer to **string** | | [optional] +**AttributeNumber** | Pointer to **float32** | | [optional] +**AttributeInteger** | Pointer to **int32** | | [optional] +**AttributeBoolean** | Pointer to **bool** | | [optional] +**WrappedArray** | Pointer to **[]int32** | | [optional] +**NameString** | Pointer to **string** | | [optional] +**NameNumber** | Pointer to **float32** | | [optional] +**NameInteger** | Pointer to **int32** | | [optional] +**NameBoolean** | Pointer to **bool** | | [optional] +**NameArray** | Pointer to **[]int32** | | [optional] +**NameWrappedArray** | Pointer to **[]int32** | | [optional] +**PrefixString** | Pointer to **string** | | [optional] +**PrefixNumber** | Pointer to **float32** | | [optional] +**PrefixInteger** | Pointer to **int32** | | [optional] +**PrefixBoolean** | Pointer to **bool** | | [optional] +**PrefixArray** | Pointer to **[]int32** | | [optional] +**PrefixWrappedArray** | Pointer to **[]int32** | | [optional] +**NamespaceString** | Pointer to **string** | | [optional] +**NamespaceNumber** | Pointer to **float32** | | [optional] +**NamespaceInteger** | Pointer to **int32** | | [optional] +**NamespaceBoolean** | Pointer to **bool** | | [optional] +**NamespaceArray** | Pointer to **[]int32** | | [optional] +**NamespaceWrappedArray** | Pointer to **[]int32** | | [optional] +**PrefixNsString** | Pointer to **string** | | [optional] +**PrefixNsNumber** | Pointer to **float32** | | [optional] +**PrefixNsInteger** | Pointer to **int32** | | [optional] +**PrefixNsBoolean** | Pointer to **bool** | | [optional] +**PrefixNsArray** | Pointer to **[]int32** | | [optional] +**PrefixNsWrappedArray** | Pointer to **[]int32** | | [optional] + +## Methods + +### GetAttributeString + +`func (o *XmlItem) GetAttributeString() string` + +GetAttributeString returns the AttributeString field if non-nil, zero value otherwise. + +### GetAttributeStringOk + +`func (o *XmlItem) GetAttributeStringOk() (string, bool)` + +GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAttributeString + +`func (o *XmlItem) HasAttributeString() bool` + +HasAttributeString returns a boolean if a field has been set. + +### SetAttributeString + +`func (o *XmlItem) SetAttributeString(v string)` + +SetAttributeString gets a reference to the given string and assigns it to the AttributeString field. + +### GetAttributeNumber + +`func (o *XmlItem) GetAttributeNumber() float32` + +GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise. + +### GetAttributeNumberOk + +`func (o *XmlItem) GetAttributeNumberOk() (float32, bool)` + +GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAttributeNumber + +`func (o *XmlItem) HasAttributeNumber() bool` + +HasAttributeNumber returns a boolean if a field has been set. + +### SetAttributeNumber + +`func (o *XmlItem) SetAttributeNumber(v float32)` + +SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field. + +### GetAttributeInteger + +`func (o *XmlItem) GetAttributeInteger() int32` + +GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise. + +### GetAttributeIntegerOk + +`func (o *XmlItem) GetAttributeIntegerOk() (int32, bool)` + +GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAttributeInteger + +`func (o *XmlItem) HasAttributeInteger() bool` + +HasAttributeInteger returns a boolean if a field has been set. + +### SetAttributeInteger + +`func (o *XmlItem) SetAttributeInteger(v int32)` + +SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field. + +### GetAttributeBoolean + +`func (o *XmlItem) GetAttributeBoolean() bool` + +GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise. + +### GetAttributeBooleanOk + +`func (o *XmlItem) GetAttributeBooleanOk() (bool, bool)` + +GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAttributeBoolean + +`func (o *XmlItem) HasAttributeBoolean() bool` + +HasAttributeBoolean returns a boolean if a field has been set. + +### SetAttributeBoolean + +`func (o *XmlItem) SetAttributeBoolean(v bool)` + +SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field. + +### GetWrappedArray + +`func (o *XmlItem) GetWrappedArray() []int32` + +GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise. + +### GetWrappedArrayOk + +`func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool)` + +GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasWrappedArray + +`func (o *XmlItem) HasWrappedArray() bool` + +HasWrappedArray returns a boolean if a field has been set. + +### SetWrappedArray + +`func (o *XmlItem) SetWrappedArray(v []int32)` + +SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field. + +### GetNameString + +`func (o *XmlItem) GetNameString() string` + +GetNameString returns the NameString field if non-nil, zero value otherwise. + +### GetNameStringOk + +`func (o *XmlItem) GetNameStringOk() (string, bool)` + +GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameString + +`func (o *XmlItem) HasNameString() bool` + +HasNameString returns a boolean if a field has been set. + +### SetNameString + +`func (o *XmlItem) SetNameString(v string)` + +SetNameString gets a reference to the given string and assigns it to the NameString field. + +### GetNameNumber + +`func (o *XmlItem) GetNameNumber() float32` + +GetNameNumber returns the NameNumber field if non-nil, zero value otherwise. + +### GetNameNumberOk + +`func (o *XmlItem) GetNameNumberOk() (float32, bool)` + +GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameNumber + +`func (o *XmlItem) HasNameNumber() bool` + +HasNameNumber returns a boolean if a field has been set. + +### SetNameNumber + +`func (o *XmlItem) SetNameNumber(v float32)` + +SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field. + +### GetNameInteger + +`func (o *XmlItem) GetNameInteger() int32` + +GetNameInteger returns the NameInteger field if non-nil, zero value otherwise. + +### GetNameIntegerOk + +`func (o *XmlItem) GetNameIntegerOk() (int32, bool)` + +GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameInteger + +`func (o *XmlItem) HasNameInteger() bool` + +HasNameInteger returns a boolean if a field has been set. + +### SetNameInteger + +`func (o *XmlItem) SetNameInteger(v int32)` + +SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field. + +### GetNameBoolean + +`func (o *XmlItem) GetNameBoolean() bool` + +GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise. + +### GetNameBooleanOk + +`func (o *XmlItem) GetNameBooleanOk() (bool, bool)` + +GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameBoolean + +`func (o *XmlItem) HasNameBoolean() bool` + +HasNameBoolean returns a boolean if a field has been set. + +### SetNameBoolean + +`func (o *XmlItem) SetNameBoolean(v bool)` + +SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field. + +### GetNameArray + +`func (o *XmlItem) GetNameArray() []int32` + +GetNameArray returns the NameArray field if non-nil, zero value otherwise. + +### GetNameArrayOk + +`func (o *XmlItem) GetNameArrayOk() ([]int32, bool)` + +GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameArray + +`func (o *XmlItem) HasNameArray() bool` + +HasNameArray returns a boolean if a field has been set. + +### SetNameArray + +`func (o *XmlItem) SetNameArray(v []int32)` + +SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field. + +### GetNameWrappedArray + +`func (o *XmlItem) GetNameWrappedArray() []int32` + +GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise. + +### GetNameWrappedArrayOk + +`func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool)` + +GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNameWrappedArray + +`func (o *XmlItem) HasNameWrappedArray() bool` + +HasNameWrappedArray returns a boolean if a field has been set. + +### SetNameWrappedArray + +`func (o *XmlItem) SetNameWrappedArray(v []int32)` + +SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field. + +### GetPrefixString + +`func (o *XmlItem) GetPrefixString() string` + +GetPrefixString returns the PrefixString field if non-nil, zero value otherwise. + +### GetPrefixStringOk + +`func (o *XmlItem) GetPrefixStringOk() (string, bool)` + +GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixString + +`func (o *XmlItem) HasPrefixString() bool` + +HasPrefixString returns a boolean if a field has been set. + +### SetPrefixString + +`func (o *XmlItem) SetPrefixString(v string)` + +SetPrefixString gets a reference to the given string and assigns it to the PrefixString field. + +### GetPrefixNumber + +`func (o *XmlItem) GetPrefixNumber() float32` + +GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise. + +### GetPrefixNumberOk + +`func (o *XmlItem) GetPrefixNumberOk() (float32, bool)` + +GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNumber + +`func (o *XmlItem) HasPrefixNumber() bool` + +HasPrefixNumber returns a boolean if a field has been set. + +### SetPrefixNumber + +`func (o *XmlItem) SetPrefixNumber(v float32)` + +SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field. + +### GetPrefixInteger + +`func (o *XmlItem) GetPrefixInteger() int32` + +GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise. + +### GetPrefixIntegerOk + +`func (o *XmlItem) GetPrefixIntegerOk() (int32, bool)` + +GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixInteger + +`func (o *XmlItem) HasPrefixInteger() bool` + +HasPrefixInteger returns a boolean if a field has been set. + +### SetPrefixInteger + +`func (o *XmlItem) SetPrefixInteger(v int32)` + +SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field. + +### GetPrefixBoolean + +`func (o *XmlItem) GetPrefixBoolean() bool` + +GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise. + +### GetPrefixBooleanOk + +`func (o *XmlItem) GetPrefixBooleanOk() (bool, bool)` + +GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixBoolean + +`func (o *XmlItem) HasPrefixBoolean() bool` + +HasPrefixBoolean returns a boolean if a field has been set. + +### SetPrefixBoolean + +`func (o *XmlItem) SetPrefixBoolean(v bool)` + +SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field. + +### GetPrefixArray + +`func (o *XmlItem) GetPrefixArray() []int32` + +GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise. + +### GetPrefixArrayOk + +`func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool)` + +GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixArray + +`func (o *XmlItem) HasPrefixArray() bool` + +HasPrefixArray returns a boolean if a field has been set. + +### SetPrefixArray + +`func (o *XmlItem) SetPrefixArray(v []int32)` + +SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field. + +### GetPrefixWrappedArray + +`func (o *XmlItem) GetPrefixWrappedArray() []int32` + +GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise. + +### GetPrefixWrappedArrayOk + +`func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool)` + +GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixWrappedArray + +`func (o *XmlItem) HasPrefixWrappedArray() bool` + +HasPrefixWrappedArray returns a boolean if a field has been set. + +### SetPrefixWrappedArray + +`func (o *XmlItem) SetPrefixWrappedArray(v []int32)` + +SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field. + +### GetNamespaceString + +`func (o *XmlItem) GetNamespaceString() string` + +GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise. + +### GetNamespaceStringOk + +`func (o *XmlItem) GetNamespaceStringOk() (string, bool)` + +GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceString + +`func (o *XmlItem) HasNamespaceString() bool` + +HasNamespaceString returns a boolean if a field has been set. + +### SetNamespaceString + +`func (o *XmlItem) SetNamespaceString(v string)` + +SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field. + +### GetNamespaceNumber + +`func (o *XmlItem) GetNamespaceNumber() float32` + +GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise. + +### GetNamespaceNumberOk + +`func (o *XmlItem) GetNamespaceNumberOk() (float32, bool)` + +GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceNumber + +`func (o *XmlItem) HasNamespaceNumber() bool` + +HasNamespaceNumber returns a boolean if a field has been set. + +### SetNamespaceNumber + +`func (o *XmlItem) SetNamespaceNumber(v float32)` + +SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field. + +### GetNamespaceInteger + +`func (o *XmlItem) GetNamespaceInteger() int32` + +GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise. + +### GetNamespaceIntegerOk + +`func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool)` + +GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceInteger + +`func (o *XmlItem) HasNamespaceInteger() bool` + +HasNamespaceInteger returns a boolean if a field has been set. + +### SetNamespaceInteger + +`func (o *XmlItem) SetNamespaceInteger(v int32)` + +SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field. + +### GetNamespaceBoolean + +`func (o *XmlItem) GetNamespaceBoolean() bool` + +GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise. + +### GetNamespaceBooleanOk + +`func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool)` + +GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceBoolean + +`func (o *XmlItem) HasNamespaceBoolean() bool` + +HasNamespaceBoolean returns a boolean if a field has been set. + +### SetNamespaceBoolean + +`func (o *XmlItem) SetNamespaceBoolean(v bool)` + +SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field. + +### GetNamespaceArray + +`func (o *XmlItem) GetNamespaceArray() []int32` + +GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise. + +### GetNamespaceArrayOk + +`func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool)` + +GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceArray + +`func (o *XmlItem) HasNamespaceArray() bool` + +HasNamespaceArray returns a boolean if a field has been set. + +### SetNamespaceArray + +`func (o *XmlItem) SetNamespaceArray(v []int32)` + +SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field. + +### GetNamespaceWrappedArray + +`func (o *XmlItem) GetNamespaceWrappedArray() []int32` + +GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise. + +### GetNamespaceWrappedArrayOk + +`func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool)` + +GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNamespaceWrappedArray + +`func (o *XmlItem) HasNamespaceWrappedArray() bool` + +HasNamespaceWrappedArray returns a boolean if a field has been set. + +### SetNamespaceWrappedArray + +`func (o *XmlItem) SetNamespaceWrappedArray(v []int32)` + +SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field. + +### GetPrefixNsString + +`func (o *XmlItem) GetPrefixNsString() string` + +GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise. + +### GetPrefixNsStringOk + +`func (o *XmlItem) GetPrefixNsStringOk() (string, bool)` + +GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsString + +`func (o *XmlItem) HasPrefixNsString() bool` + +HasPrefixNsString returns a boolean if a field has been set. + +### SetPrefixNsString + +`func (o *XmlItem) SetPrefixNsString(v string)` + +SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field. + +### GetPrefixNsNumber + +`func (o *XmlItem) GetPrefixNsNumber() float32` + +GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise. + +### GetPrefixNsNumberOk + +`func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool)` + +GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsNumber + +`func (o *XmlItem) HasPrefixNsNumber() bool` + +HasPrefixNsNumber returns a boolean if a field has been set. + +### SetPrefixNsNumber + +`func (o *XmlItem) SetPrefixNsNumber(v float32)` + +SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field. + +### GetPrefixNsInteger + +`func (o *XmlItem) GetPrefixNsInteger() int32` + +GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise. + +### GetPrefixNsIntegerOk + +`func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool)` + +GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsInteger + +`func (o *XmlItem) HasPrefixNsInteger() bool` + +HasPrefixNsInteger returns a boolean if a field has been set. + +### SetPrefixNsInteger + +`func (o *XmlItem) SetPrefixNsInteger(v int32)` + +SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field. + +### GetPrefixNsBoolean + +`func (o *XmlItem) GetPrefixNsBoolean() bool` + +GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise. + +### GetPrefixNsBooleanOk + +`func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool)` + +GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsBoolean + +`func (o *XmlItem) HasPrefixNsBoolean() bool` + +HasPrefixNsBoolean returns a boolean if a field has been set. + +### SetPrefixNsBoolean + +`func (o *XmlItem) SetPrefixNsBoolean(v bool)` + +SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field. + +### GetPrefixNsArray + +`func (o *XmlItem) GetPrefixNsArray() []int32` + +GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise. + +### GetPrefixNsArrayOk + +`func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool)` + +GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsArray + +`func (o *XmlItem) HasPrefixNsArray() bool` + +HasPrefixNsArray returns a boolean if a field has been set. + +### SetPrefixNsArray + +`func (o *XmlItem) SetPrefixNsArray(v []int32)` + +SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field. + +### GetPrefixNsWrappedArray + +`func (o *XmlItem) GetPrefixNsWrappedArray() []int32` + +GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise. + +### GetPrefixNsWrappedArrayOk + +`func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool)` + +GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPrefixNsWrappedArray + +`func (o *XmlItem) HasPrefixNsWrappedArray() bool` + +HasPrefixNsWrappedArray returns a boolean if a field has been set. + +### SetPrefixNsWrappedArray + +`func (o *XmlItem) SetPrefixNsWrappedArray(v []int32)` + +SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/go/go-petstore/model_200_response.go b/samples/client/petstore/go/go-petstore/model_200_response.go index f918cabaaae2..97ced8c6d195 100644 --- a/samples/client/petstore/go/go-petstore/model_200_response.go +++ b/samples/client/petstore/go/go-petstore/model_200_response.go @@ -8,9 +8,94 @@ */ package petstore +import ( + "encoding/json" +) // Model for testing model name starting with number type Model200Response struct { - Name int32 `json:"name,omitempty"` - Class string `json:"class,omitempty"` + Name *int32 `json:"name,omitempty"` + + Class *string `json:"class,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Model200Response) GetName() int32 { + if o == nil || o.Name == nil { + var ret int32 + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Model200Response) GetNameOk() (int32, bool) { + if o == nil || o.Name == nil { + var ret int32 + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Model200Response) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given int32 and assigns it to the Name field. +func (o *Model200Response) SetName(v int32) { + o.Name = &v +} + +// GetClass returns the Class field if non-nil, zero value otherwise. +func (o *Model200Response) GetClass() string { + if o == nil || o.Class == nil { + var ret string + return ret + } + return *o.Class } + +// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Model200Response) GetClassOk() (string, bool) { + if o == nil || o.Class == nil { + var ret string + return ret, false + } + return *o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Model200Response) HasClass() bool { + if o != nil && o.Class != nil { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Model200Response) SetClass(v string) { + o.Class = &v +} + + +func (o Model200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Class != nil { + toSerialize["class"] = o.Class + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go b/samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go index ca06584a72f7..baa81b92e586 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type AdditionalPropertiesAnyType struct { - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesAnyType) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesAnyType) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesAnyType) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_array.go b/samples/client/petstore/go/go-petstore/model_additional_properties_array.go index 2e71585506f6..0ccbf37442e7 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_array.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_array.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type AdditionalPropertiesArray struct { - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesArray) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesArray) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesArray) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesArray) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesArray) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_boolean.go b/samples/client/petstore/go/go-petstore/model_additional_properties_boolean.go index 09f1ac3b32bc..efa95a8767d6 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_boolean.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_boolean.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type AdditionalPropertiesBoolean struct { - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesBoolean) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesBoolean) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesBoolean) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesBoolean) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go index 2e1845e194f6..534148d11de7 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go @@ -8,17 +8,435 @@ */ package petstore +import ( + "encoding/json" +) type AdditionalPropertiesClass struct { - MapString map[string]string `json:"map_string,omitempty"` - MapNumber map[string]float32 `json:"map_number,omitempty"` - MapInteger map[string]int32 `json:"map_integer,omitempty"` - MapBoolean map[string]bool `json:"map_boolean,omitempty"` - MapArrayInteger map[string][]int32 `json:"map_array_integer,omitempty"` - MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` - MapMapString map[string]map[string]string `json:"map_map_string,omitempty"` - MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` - Anytype1 map[string]interface{} `json:"anytype_1,omitempty"` - Anytype2 map[string]interface{} `json:"anytype_2,omitempty"` - Anytype3 map[string]interface{} `json:"anytype_3,omitempty"` + MapString *map[string]string `json:"map_string,omitempty"` + + MapNumber *map[string]float32 `json:"map_number,omitempty"` + + MapInteger *map[string]int32 `json:"map_integer,omitempty"` + + MapBoolean *map[string]bool `json:"map_boolean,omitempty"` + + MapArrayInteger *map[string][]int32 `json:"map_array_integer,omitempty"` + + MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` + + MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"` + + MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` + + Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"` + + Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"` + + Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"` + +} + +// GetMapString returns the MapString field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapString() map[string]string { + if o == nil || o.MapString == nil { + var ret map[string]string + return ret + } + return *o.MapString +} + +// GetMapStringOk returns a tuple with the MapString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool) { + if o == nil || o.MapString == nil { + var ret map[string]string + return ret, false + } + return *o.MapString, true +} + +// HasMapString returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapString() bool { + if o != nil && o.MapString != nil { + return true + } + + return false +} + +// SetMapString gets a reference to the given map[string]string and assigns it to the MapString field. +func (o *AdditionalPropertiesClass) SetMapString(v map[string]string) { + o.MapString = &v +} + +// GetMapNumber returns the MapNumber field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32 { + if o == nil || o.MapNumber == nil { + var ret map[string]float32 + return ret + } + return *o.MapNumber +} + +// GetMapNumberOk returns a tuple with the MapNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool) { + if o == nil || o.MapNumber == nil { + var ret map[string]float32 + return ret, false + } + return *o.MapNumber, true +} + +// HasMapNumber returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapNumber() bool { + if o != nil && o.MapNumber != nil { + return true + } + + return false +} + +// SetMapNumber gets a reference to the given map[string]float32 and assigns it to the MapNumber field. +func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32) { + o.MapNumber = &v +} + +// GetMapInteger returns the MapInteger field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32 { + if o == nil || o.MapInteger == nil { + var ret map[string]int32 + return ret + } + return *o.MapInteger +} + +// GetMapIntegerOk returns a tuple with the MapInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool) { + if o == nil || o.MapInteger == nil { + var ret map[string]int32 + return ret, false + } + return *o.MapInteger, true +} + +// HasMapInteger returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapInteger() bool { + if o != nil && o.MapInteger != nil { + return true + } + + return false +} + +// SetMapInteger gets a reference to the given map[string]int32 and assigns it to the MapInteger field. +func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32) { + o.MapInteger = &v +} + +// GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool { + if o == nil || o.MapBoolean == nil { + var ret map[string]bool + return ret + } + return *o.MapBoolean +} + +// GetMapBooleanOk returns a tuple with the MapBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool) { + if o == nil || o.MapBoolean == nil { + var ret map[string]bool + return ret, false + } + return *o.MapBoolean, true +} + +// HasMapBoolean returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapBoolean() bool { + if o != nil && o.MapBoolean != nil { + return true + } + + return false +} + +// SetMapBoolean gets a reference to the given map[string]bool and assigns it to the MapBoolean field. +func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool) { + o.MapBoolean = &v +} + +// GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32 { + if o == nil || o.MapArrayInteger == nil { + var ret map[string][]int32 + return ret + } + return *o.MapArrayInteger +} + +// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool) { + if o == nil || o.MapArrayInteger == nil { + var ret map[string][]int32 + return ret, false + } + return *o.MapArrayInteger, true +} + +// HasMapArrayInteger returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapArrayInteger() bool { + if o != nil && o.MapArrayInteger != nil { + return true + } + + return false +} + +// SetMapArrayInteger gets a reference to the given map[string][]int32 and assigns it to the MapArrayInteger field. +func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32) { + o.MapArrayInteger = &v +} + +// GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{} { + if o == nil || o.MapArrayAnytype == nil { + var ret map[string][]map[string]interface{} + return ret + } + return *o.MapArrayAnytype } + +// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool) { + if o == nil || o.MapArrayAnytype == nil { + var ret map[string][]map[string]interface{} + return ret, false + } + return *o.MapArrayAnytype, true +} + +// HasMapArrayAnytype returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool { + if o != nil && o.MapArrayAnytype != nil { + return true + } + + return false +} + +// SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field. +func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{}) { + o.MapArrayAnytype = &v +} + +// GetMapMapString returns the MapMapString field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]string { + if o == nil || o.MapMapString == nil { + var ret map[string]map[string]string + return ret + } + return *o.MapMapString +} + +// GetMapMapStringOk returns a tuple with the MapMapString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool) { + if o == nil || o.MapMapString == nil { + var ret map[string]map[string]string + return ret, false + } + return *o.MapMapString, true +} + +// HasMapMapString returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapMapString() bool { + if o != nil && o.MapMapString != nil { + return true + } + + return false +} + +// SetMapMapString gets a reference to the given map[string]map[string]string and assigns it to the MapMapString field. +func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]string) { + o.MapMapString = &v +} + +// GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{} { + if o == nil || o.MapMapAnytype == nil { + var ret map[string]map[string]map[string]interface{} + return ret + } + return *o.MapMapAnytype +} + +// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool) { + if o == nil || o.MapMapAnytype == nil { + var ret map[string]map[string]map[string]interface{} + return ret, false + } + return *o.MapMapAnytype, true +} + +// HasMapMapAnytype returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool { + if o != nil && o.MapMapAnytype != nil { + return true + } + + return false +} + +// SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field. +func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{}) { + o.MapMapAnytype = &v +} + +// GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { + if o == nil || o.Anytype1 == nil { + var ret map[string]interface{} + return ret + } + return *o.Anytype1 +} + +// GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) { + if o == nil || o.Anytype1 == nil { + var ret map[string]interface{} + return ret, false + } + return *o.Anytype1, true +} + +// HasAnytype1 returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasAnytype1() bool { + if o != nil && o.Anytype1 != nil { + return true + } + + return false +} + +// SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field. +func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) { + o.Anytype1 = &v +} + +// GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { + if o == nil || o.Anytype2 == nil { + var ret map[string]interface{} + return ret + } + return *o.Anytype2 +} + +// GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) { + if o == nil || o.Anytype2 == nil { + var ret map[string]interface{} + return ret, false + } + return *o.Anytype2, true +} + +// HasAnytype2 returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasAnytype2() bool { + if o != nil && o.Anytype2 != nil { + return true + } + + return false +} + +// SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field. +func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) { + o.Anytype2 = &v +} + +// GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { + if o == nil || o.Anytype3 == nil { + var ret map[string]interface{} + return ret + } + return *o.Anytype3 +} + +// GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) { + if o == nil || o.Anytype3 == nil { + var ret map[string]interface{} + return ret, false + } + return *o.Anytype3, true +} + +// HasAnytype3 returns a boolean if a field has been set. +func (o *AdditionalPropertiesClass) HasAnytype3() bool { + if o != nil && o.Anytype3 != nil { + return true + } + + return false +} + +// SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field. +func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) { + o.Anytype3 = &v +} + + +func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MapString != nil { + toSerialize["map_string"] = o.MapString + } + if o.MapNumber != nil { + toSerialize["map_number"] = o.MapNumber + } + if o.MapInteger != nil { + toSerialize["map_integer"] = o.MapInteger + } + if o.MapBoolean != nil { + toSerialize["map_boolean"] = o.MapBoolean + } + if o.MapArrayInteger != nil { + toSerialize["map_array_integer"] = o.MapArrayInteger + } + if o.MapArrayAnytype != nil { + toSerialize["map_array_anytype"] = o.MapArrayAnytype + } + if o.MapMapString != nil { + toSerialize["map_map_string"] = o.MapMapString + } + if o.MapMapAnytype != nil { + toSerialize["map_map_anytype"] = o.MapMapAnytype + } + if o.Anytype1 != nil { + toSerialize["anytype_1"] = o.Anytype1 + } + if o.Anytype2 != nil { + toSerialize["anytype_2"] = o.Anytype2 + } + if o.Anytype3 != nil { + toSerialize["anytype_3"] = o.Anytype3 + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_integer.go b/samples/client/petstore/go/go-petstore/model_additional_properties_integer.go index 2f69fe4b0125..05dea42d5117 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_integer.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_integer.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type AdditionalPropertiesInteger struct { - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesInteger) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesInteger) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesInteger) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesInteger) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_number.go b/samples/client/petstore/go/go-petstore/model_additional_properties_number.go index 900b2ec32cc9..484c9d79ad9f 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_number.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_number.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type AdditionalPropertiesNumber struct { - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesNumber) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesNumber) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesNumber) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesNumber) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_object.go b/samples/client/petstore/go/go-petstore/model_additional_properties_object.go index 99fa6d02fdcc..0482ad8ef17f 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_object.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_object.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type AdditionalPropertiesObject struct { - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesObject) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesObject) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesObject) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesObject) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesObject) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_string.go b/samples/client/petstore/go/go-petstore/model_additional_properties_string.go index 82fe0e4ed30f..561cd0819175 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_string.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_string.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type AdditionalPropertiesString struct { - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *AdditionalPropertiesString) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalPropertiesString) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AdditionalPropertiesString) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false } + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AdditionalPropertiesString) SetName(v string) { + o.Name = &v +} + + +func (o AdditionalPropertiesString) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_animal.go b/samples/client/petstore/go/go-petstore/model_animal.go index 39d0d2d1ec32..897cac1f45db 100644 --- a/samples/client/petstore/go/go-petstore/model_animal.go +++ b/samples/client/petstore/go/go-petstore/model_animal.go @@ -8,8 +8,97 @@ */ package petstore +import ( + "encoding/json" + "errors" +) type Animal struct { - ClassName string `json:"className"` - Color string `json:"color,omitempty"` + ClassName *string `json:"className,omitempty"` + + Color *string `json:"color,omitempty"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Animal) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Animal) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Animal) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Animal) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Animal) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color } + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Animal) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Animal) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Animal) SetColor(v string) { + o.Color = &v +} + + +func (o Animal) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Animal") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_api_response.go b/samples/client/petstore/go/go-petstore/model_api_response.go index 12732fa32c6b..009e99107212 100644 --- a/samples/client/petstore/go/go-petstore/model_api_response.go +++ b/samples/client/petstore/go/go-petstore/model_api_response.go @@ -8,9 +8,131 @@ */ package petstore +import ( + "encoding/json" +) type ApiResponse struct { - Code int32 `json:"code,omitempty"` - Type string `json:"type,omitempty"` - Message string `json:"message,omitempty"` + Code *int32 `json:"code,omitempty"` + + Type *string `json:"type,omitempty"` + + Message *string `json:"message,omitempty"` + +} + +// GetCode returns the Code field if non-nil, zero value otherwise. +func (o *ApiResponse) GetCode() int32 { + if o == nil || o.Code == nil { + var ret int32 + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetCodeOk() (int32, bool) { + if o == nil || o.Code == nil { + var ret int32 + return ret, false + } + return *o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ApiResponse) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *ApiResponse) SetCode(v int32) { + o.Code = &v +} + +// GetType returns the Type field if non-nil, zero value otherwise. +func (o *ApiResponse) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type } + +// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetTypeOk() (string, bool) { + if o == nil || o.Type == nil { + var ret string + return ret, false + } + return *o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ApiResponse) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ApiResponse) SetType(v string) { + o.Type = &v +} + +// GetMessage returns the Message field if non-nil, zero value otherwise. +func (o *ApiResponse) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApiResponse) GetMessageOk() (string, bool) { + if o == nil || o.Message == nil { + var ret string + return ret, false + } + return *o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ApiResponse) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ApiResponse) SetMessage(v string) { + o.Message = &v +} + + +func (o ApiResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Code != nil { + toSerialize["code"] = o.Code + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go b/samples/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go index 8bf700c7eb30..aadebc92a453 100644 --- a/samples/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type ArrayOfArrayOfNumberOnly struct { - ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"` + ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` + +} + +// GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { + if o == nil || o.ArrayArrayNumber == nil { + var ret [][]float32 + return ret + } + return *o.ArrayArrayNumber +} + +// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { + if o == nil || o.ArrayArrayNumber == nil { + var ret [][]float32 + return ret, false + } + return *o.ArrayArrayNumber, true +} + +// HasArrayArrayNumber returns a boolean if a field has been set. +func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool { + if o != nil && o.ArrayArrayNumber != nil { + return true + } + + return false } + +// SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. +func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) { + o.ArrayArrayNumber = &v +} + + +func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayArrayNumber != nil { + toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_array_of_number_only.go b/samples/client/petstore/go/go-petstore/model_array_of_number_only.go index ccb473355caa..418a07d7d623 100644 --- a/samples/client/petstore/go/go-petstore/model_array_of_number_only.go +++ b/samples/client/petstore/go/go-petstore/model_array_of_number_only.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type ArrayOfNumberOnly struct { - ArrayNumber []float32 `json:"ArrayNumber,omitempty"` + ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` + +} + +// GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. +func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { + if o == nil || o.ArrayNumber == nil { + var ret []float32 + return ret + } + return *o.ArrayNumber +} + +// GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { + if o == nil || o.ArrayNumber == nil { + var ret []float32 + return ret, false + } + return *o.ArrayNumber, true +} + +// HasArrayNumber returns a boolean if a field has been set. +func (o *ArrayOfNumberOnly) HasArrayNumber() bool { + if o != nil && o.ArrayNumber != nil { + return true + } + + return false } + +// SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. +func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) { + o.ArrayNumber = &v +} + + +func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayNumber != nil { + toSerialize["ArrayNumber"] = o.ArrayNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_array_test_.go b/samples/client/petstore/go/go-petstore/model_array_test_.go index f8819800934b..8fa143ded804 100644 --- a/samples/client/petstore/go/go-petstore/model_array_test_.go +++ b/samples/client/petstore/go/go-petstore/model_array_test_.go @@ -8,9 +8,131 @@ */ package petstore +import ( + "encoding/json" +) type ArrayTest struct { - ArrayOfString []string `json:"array_of_string,omitempty"` - ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty"` - ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` + ArrayOfString *[]string `json:"array_of_string,omitempty"` + + ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"` + + ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` + +} + +// GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayOfString() []string { + if o == nil || o.ArrayOfString == nil { + var ret []string + return ret + } + return *o.ArrayOfString +} + +// GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { + if o == nil || o.ArrayOfString == nil { + var ret []string + return ret, false + } + return *o.ArrayOfString, true +} + +// HasArrayOfString returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayOfString() bool { + if o != nil && o.ArrayOfString != nil { + return true + } + + return false +} + +// SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. +func (o *ArrayTest) SetArrayOfString(v []string) { + o.ArrayOfString = &v +} + +// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { + if o == nil || o.ArrayArrayOfInteger == nil { + var ret [][]int64 + return ret + } + return *o.ArrayArrayOfInteger } + +// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { + if o == nil || o.ArrayArrayOfInteger == nil { + var ret [][]int64 + return ret, false + } + return *o.ArrayArrayOfInteger, true +} + +// HasArrayArrayOfInteger returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayArrayOfInteger() bool { + if o != nil && o.ArrayArrayOfInteger != nil { + return true + } + + return false +} + +// SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. +func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) { + o.ArrayArrayOfInteger = &v +} + +// GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. +func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { + if o == nil || o.ArrayArrayOfModel == nil { + var ret [][]ReadOnlyFirst + return ret + } + return *o.ArrayArrayOfModel +} + +// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { + if o == nil || o.ArrayArrayOfModel == nil { + var ret [][]ReadOnlyFirst + return ret, false + } + return *o.ArrayArrayOfModel, true +} + +// HasArrayArrayOfModel returns a boolean if a field has been set. +func (o *ArrayTest) HasArrayArrayOfModel() bool { + if o != nil && o.ArrayArrayOfModel != nil { + return true + } + + return false +} + +// SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. +func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) { + o.ArrayArrayOfModel = &v +} + + +func (o ArrayTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ArrayOfString != nil { + toSerialize["array_of_string"] = o.ArrayOfString + } + if o.ArrayArrayOfInteger != nil { + toSerialize["array_array_of_integer"] = o.ArrayArrayOfInteger + } + if o.ArrayArrayOfModel != nil { + toSerialize["array_array_of_model"] = o.ArrayArrayOfModel + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_capitalization.go b/samples/client/petstore/go/go-petstore/model_capitalization.go index 8284ba9c7658..107dd7932e1c 100644 --- a/samples/client/petstore/go/go-petstore/model_capitalization.go +++ b/samples/client/petstore/go/go-petstore/model_capitalization.go @@ -8,13 +8,246 @@ */ package petstore +import ( + "encoding/json" +) type Capitalization struct { - SmallCamel string `json:"smallCamel,omitempty"` - CapitalCamel string `json:"CapitalCamel,omitempty"` - SmallSnake string `json:"small_Snake,omitempty"` - CapitalSnake string `json:"Capital_Snake,omitempty"` - SCAETHFlowPoints string `json:"SCA_ETH_Flow_Points,omitempty"` + SmallCamel *string `json:"smallCamel,omitempty"` + + CapitalCamel *string `json:"CapitalCamel,omitempty"` + + SmallSnake *string `json:"small_Snake,omitempty"` + + CapitalSnake *string `json:"Capital_Snake,omitempty"` + + SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty"` + // Name of the pet - ATT_NAME string `json:"ATT_NAME,omitempty"` + ATT_NAME *string `json:"ATT_NAME,omitempty"` + +} + +// GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. +func (o *Capitalization) GetSmallCamel() string { + if o == nil || o.SmallCamel == nil { + var ret string + return ret + } + return *o.SmallCamel +} + +// GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSmallCamelOk() (string, bool) { + if o == nil || o.SmallCamel == nil { + var ret string + return ret, false + } + return *o.SmallCamel, true +} + +// HasSmallCamel returns a boolean if a field has been set. +func (o *Capitalization) HasSmallCamel() bool { + if o != nil && o.SmallCamel != nil { + return true + } + + return false +} + +// SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field. +func (o *Capitalization) SetSmallCamel(v string) { + o.SmallCamel = &v +} + +// GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. +func (o *Capitalization) GetCapitalCamel() string { + if o == nil || o.CapitalCamel == nil { + var ret string + return ret + } + return *o.CapitalCamel +} + +// GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetCapitalCamelOk() (string, bool) { + if o == nil || o.CapitalCamel == nil { + var ret string + return ret, false + } + return *o.CapitalCamel, true +} + +// HasCapitalCamel returns a boolean if a field has been set. +func (o *Capitalization) HasCapitalCamel() bool { + if o != nil && o.CapitalCamel != nil { + return true + } + + return false +} + +// SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field. +func (o *Capitalization) SetCapitalCamel(v string) { + o.CapitalCamel = &v +} + +// GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. +func (o *Capitalization) GetSmallSnake() string { + if o == nil || o.SmallSnake == nil { + var ret string + return ret + } + return *o.SmallSnake +} + +// GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSmallSnakeOk() (string, bool) { + if o == nil || o.SmallSnake == nil { + var ret string + return ret, false + } + return *o.SmallSnake, true +} + +// HasSmallSnake returns a boolean if a field has been set. +func (o *Capitalization) HasSmallSnake() bool { + if o != nil && o.SmallSnake != nil { + return true + } + + return false +} + +// SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field. +func (o *Capitalization) SetSmallSnake(v string) { + o.SmallSnake = &v } + +// GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. +func (o *Capitalization) GetCapitalSnake() string { + if o == nil || o.CapitalSnake == nil { + var ret string + return ret + } + return *o.CapitalSnake +} + +// GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetCapitalSnakeOk() (string, bool) { + if o == nil || o.CapitalSnake == nil { + var ret string + return ret, false + } + return *o.CapitalSnake, true +} + +// HasCapitalSnake returns a boolean if a field has been set. +func (o *Capitalization) HasCapitalSnake() bool { + if o != nil && o.CapitalSnake != nil { + return true + } + + return false +} + +// SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field. +func (o *Capitalization) SetCapitalSnake(v string) { + o.CapitalSnake = &v +} + +// GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. +func (o *Capitalization) GetSCAETHFlowPoints() string { + if o == nil || o.SCAETHFlowPoints == nil { + var ret string + return ret + } + return *o.SCAETHFlowPoints +} + +// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) { + if o == nil || o.SCAETHFlowPoints == nil { + var ret string + return ret, false + } + return *o.SCAETHFlowPoints, true +} + +// HasSCAETHFlowPoints returns a boolean if a field has been set. +func (o *Capitalization) HasSCAETHFlowPoints() bool { + if o != nil && o.SCAETHFlowPoints != nil { + return true + } + + return false +} + +// SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field. +func (o *Capitalization) SetSCAETHFlowPoints(v string) { + o.SCAETHFlowPoints = &v +} + +// GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. +func (o *Capitalization) GetATT_NAME() string { + if o == nil || o.ATT_NAME == nil { + var ret string + return ret + } + return *o.ATT_NAME +} + +// GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Capitalization) GetATT_NAMEOk() (string, bool) { + if o == nil || o.ATT_NAME == nil { + var ret string + return ret, false + } + return *o.ATT_NAME, true +} + +// HasATT_NAME returns a boolean if a field has been set. +func (o *Capitalization) HasATT_NAME() bool { + if o != nil && o.ATT_NAME != nil { + return true + } + + return false +} + +// SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field. +func (o *Capitalization) SetATT_NAME(v string) { + o.ATT_NAME = &v +} + + +func (o Capitalization) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SmallCamel != nil { + toSerialize["smallCamel"] = o.SmallCamel + } + if o.CapitalCamel != nil { + toSerialize["CapitalCamel"] = o.CapitalCamel + } + if o.SmallSnake != nil { + toSerialize["small_Snake"] = o.SmallSnake + } + if o.CapitalSnake != nil { + toSerialize["Capital_Snake"] = o.CapitalSnake + } + if o.SCAETHFlowPoints != nil { + toSerialize["SCA_ETH_Flow_Points"] = o.SCAETHFlowPoints + } + if o.ATT_NAME != nil { + toSerialize["ATT_NAME"] = o.ATT_NAME + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_cat.go b/samples/client/petstore/go/go-petstore/model_cat.go index 58b3deeb938d..8efbf58fd1e7 100644 --- a/samples/client/petstore/go/go-petstore/model_cat.go +++ b/samples/client/petstore/go/go-petstore/model_cat.go @@ -8,9 +8,135 @@ */ package petstore +import ( + "encoding/json" + "errors" +) type Cat struct { - ClassName string `json:"className"` - Color string `json:"color,omitempty"` - Declawed bool `json:"declawed,omitempty"` + ClassName *string `json:"className,omitempty"` + + Color *string `json:"color,omitempty"` + + Declawed *bool `json:"declawed,omitempty"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Cat) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Cat) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Cat) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Cat) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color } + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Cat) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Cat) SetColor(v string) { + o.Color = &v +} + +// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +func (o *Cat) GetDeclawed() bool { + if o == nil || o.Declawed == nil { + var ret bool + return ret + } + return *o.Declawed +} + +// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Cat) GetDeclawedOk() (bool, bool) { + if o == nil || o.Declawed == nil { + var ret bool + return ret, false + } + return *o.Declawed, true +} + +// HasDeclawed returns a boolean if a field has been set. +func (o *Cat) HasDeclawed() bool { + if o != nil && o.Declawed != nil { + return true + } + + return false +} + +// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +func (o *Cat) SetDeclawed(v bool) { + o.Declawed = &v +} + + +func (o Cat) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Cat") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + if o.Declawed != nil { + toSerialize["declawed"] = o.Declawed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_cat_all_of.go b/samples/client/petstore/go/go-petstore/model_cat_all_of.go index 3c1d802bd411..aaf2c8badb5a 100644 --- a/samples/client/petstore/go/go-petstore/model_cat_all_of.go +++ b/samples/client/petstore/go/go-petstore/model_cat_all_of.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type CatAllOf struct { - Declawed bool `json:"declawed,omitempty"` + Declawed *bool `json:"declawed,omitempty"` + +} + +// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. +func (o *CatAllOf) GetDeclawed() bool { + if o == nil || o.Declawed == nil { + var ret bool + return ret + } + return *o.Declawed +} + +// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CatAllOf) GetDeclawedOk() (bool, bool) { + if o == nil || o.Declawed == nil { + var ret bool + return ret, false + } + return *o.Declawed, true +} + +// HasDeclawed returns a boolean if a field has been set. +func (o *CatAllOf) HasDeclawed() bool { + if o != nil && o.Declawed != nil { + return true + } + + return false } + +// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +func (o *CatAllOf) SetDeclawed(v bool) { + o.Declawed = &v +} + + +func (o CatAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Declawed != nil { + toSerialize["declawed"] = o.Declawed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_category.go b/samples/client/petstore/go/go-petstore/model_category.go index 2f971417ac10..c55d4bd6e99d 100644 --- a/samples/client/petstore/go/go-petstore/model_category.go +++ b/samples/client/petstore/go/go-petstore/model_category.go @@ -8,8 +8,97 @@ */ package petstore +import ( + "encoding/json" + "errors" +) type Category struct { - Id int64 `json:"id,omitempty"` - Name string `json:"name"` + Id *int64 `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Category) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Category) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Category) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Category) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Category) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name } + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Category) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Category) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Category) SetName(v string) { + o.Name = &v +} + + +func (o Category) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Category") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_class_model.go b/samples/client/petstore/go/go-petstore/model_class_model.go index 09c7e891968a..0dcaa2643114 100644 --- a/samples/client/petstore/go/go-petstore/model_class_model.go +++ b/samples/client/petstore/go/go-petstore/model_class_model.go @@ -8,8 +8,56 @@ */ package petstore +import ( + "encoding/json" +) // Model for testing model with \"_class\" property type ClassModel struct { - Class string `json:"_class,omitempty"` + Class *string `json:"_class,omitempty"` + +} + +// GetClass returns the Class field if non-nil, zero value otherwise. +func (o *ClassModel) GetClass() string { + if o == nil || o.Class == nil { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ClassModel) GetClassOk() (string, bool) { + if o == nil || o.Class == nil { + var ret string + return ret, false + } + return *o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *ClassModel) HasClass() bool { + if o != nil && o.Class != nil { + return true + } + + return false } + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *ClassModel) SetClass(v string) { + o.Class = &v +} + + +func (o ClassModel) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Class != nil { + toSerialize["_class"] = o.Class + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_client.go b/samples/client/petstore/go/go-petstore/model_client.go index 3aa61112c4da..72ebd543000b 100644 --- a/samples/client/petstore/go/go-petstore/model_client.go +++ b/samples/client/petstore/go/go-petstore/model_client.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type Client struct { - Client string `json:"client,omitempty"` + Client *string `json:"client,omitempty"` + +} + +// GetClient returns the Client field if non-nil, zero value otherwise. +func (o *Client) GetClient() string { + if o == nil || o.Client == nil { + var ret string + return ret + } + return *o.Client +} + +// GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Client) GetClientOk() (string, bool) { + if o == nil || o.Client == nil { + var ret string + return ret, false + } + return *o.Client, true +} + +// HasClient returns a boolean if a field has been set. +func (o *Client) HasClient() bool { + if o != nil && o.Client != nil { + return true + } + + return false } + +// SetClient gets a reference to the given string and assigns it to the Client field. +func (o *Client) SetClient(v string) { + o.Client = &v +} + + +func (o Client) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Client != nil { + toSerialize["client"] = o.Client + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_dog.go b/samples/client/petstore/go/go-petstore/model_dog.go index 3f791ca1947d..dd9c4e1d67db 100644 --- a/samples/client/petstore/go/go-petstore/model_dog.go +++ b/samples/client/petstore/go/go-petstore/model_dog.go @@ -8,9 +8,135 @@ */ package petstore +import ( + "encoding/json" + "errors" +) type Dog struct { - ClassName string `json:"className"` - Color string `json:"color,omitempty"` - Breed string `json:"breed,omitempty"` + ClassName *string `json:"className,omitempty"` + + Color *string `json:"color,omitempty"` + + Breed *string `json:"breed,omitempty"` + +} + +// GetClassName returns the ClassName field if non-nil, zero value otherwise. +func (o *Dog) GetClassName() string { + if o == nil || o.ClassName == nil { + var ret string + return ret + } + return *o.ClassName +} + +// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetClassNameOk() (string, bool) { + if o == nil || o.ClassName == nil { + var ret string + return ret, false + } + return *o.ClassName, true +} + +// HasClassName returns a boolean if a field has been set. +func (o *Dog) HasClassName() bool { + if o != nil && o.ClassName != nil { + return true + } + + return false +} + +// SetClassName gets a reference to the given string and assigns it to the ClassName field. +func (o *Dog) SetClassName(v string) { + o.ClassName = &v +} + +// GetColor returns the Color field if non-nil, zero value otherwise. +func (o *Dog) GetColor() string { + if o == nil || o.Color == nil { + var ret string + return ret + } + return *o.Color } + +// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetColorOk() (string, bool) { + if o == nil || o.Color == nil { + var ret string + return ret, false + } + return *o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Dog) HasColor() bool { + if o != nil && o.Color != nil { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Dog) SetColor(v string) { + o.Color = &v +} + +// GetBreed returns the Breed field if non-nil, zero value otherwise. +func (o *Dog) GetBreed() string { + if o == nil || o.Breed == nil { + var ret string + return ret + } + return *o.Breed +} + +// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Dog) GetBreedOk() (string, bool) { + if o == nil || o.Breed == nil { + var ret string + return ret, false + } + return *o.Breed, true +} + +// HasBreed returns a boolean if a field has been set. +func (o *Dog) HasBreed() bool { + if o != nil && o.Breed != nil { + return true + } + + return false +} + +// SetBreed gets a reference to the given string and assigns it to the Breed field. +func (o *Dog) SetBreed(v string) { + o.Breed = &v +} + + +func (o Dog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ClassName == nil { + return nil, errors.New("ClassName is required and not nullable, but was not set on Dog") + } + if o.ClassName != nil { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + if o.Breed != nil { + toSerialize["breed"] = o.Breed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_dog_all_of.go b/samples/client/petstore/go/go-petstore/model_dog_all_of.go index a0db0aba4b53..9dd6d964f025 100644 --- a/samples/client/petstore/go/go-petstore/model_dog_all_of.go +++ b/samples/client/petstore/go/go-petstore/model_dog_all_of.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type DogAllOf struct { - Breed string `json:"breed,omitempty"` + Breed *string `json:"breed,omitempty"` + +} + +// GetBreed returns the Breed field if non-nil, zero value otherwise. +func (o *DogAllOf) GetBreed() string { + if o == nil || o.Breed == nil { + var ret string + return ret + } + return *o.Breed +} + +// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *DogAllOf) GetBreedOk() (string, bool) { + if o == nil || o.Breed == nil { + var ret string + return ret, false + } + return *o.Breed, true +} + +// HasBreed returns a boolean if a field has been set. +func (o *DogAllOf) HasBreed() bool { + if o != nil && o.Breed != nil { + return true + } + + return false } + +// SetBreed gets a reference to the given string and assigns it to the Breed field. +func (o *DogAllOf) SetBreed(v string) { + o.Breed = &v +} + + +func (o DogAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Breed != nil { + toSerialize["breed"] = o.Breed + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_enum_arrays.go b/samples/client/petstore/go/go-petstore/model_enum_arrays.go index ab4dce92ebbc..b52471416a8e 100644 --- a/samples/client/petstore/go/go-petstore/model_enum_arrays.go +++ b/samples/client/petstore/go/go-petstore/model_enum_arrays.go @@ -8,8 +8,93 @@ */ package petstore +import ( + "encoding/json" +) type EnumArrays struct { - JustSymbol string `json:"just_symbol,omitempty"` - ArrayEnum []string `json:"array_enum,omitempty"` + JustSymbol *string `json:"just_symbol,omitempty"` + + ArrayEnum *[]string `json:"array_enum,omitempty"` + +} + +// GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. +func (o *EnumArrays) GetJustSymbol() string { + if o == nil || o.JustSymbol == nil { + var ret string + return ret + } + return *o.JustSymbol +} + +// GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumArrays) GetJustSymbolOk() (string, bool) { + if o == nil || o.JustSymbol == nil { + var ret string + return ret, false + } + return *o.JustSymbol, true +} + +// HasJustSymbol returns a boolean if a field has been set. +func (o *EnumArrays) HasJustSymbol() bool { + if o != nil && o.JustSymbol != nil { + return true + } + + return false +} + +// SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field. +func (o *EnumArrays) SetJustSymbol(v string) { + o.JustSymbol = &v +} + +// GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. +func (o *EnumArrays) GetArrayEnum() []string { + if o == nil || o.ArrayEnum == nil { + var ret []string + return ret + } + return *o.ArrayEnum } + +// GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { + if o == nil || o.ArrayEnum == nil { + var ret []string + return ret, false + } + return *o.ArrayEnum, true +} + +// HasArrayEnum returns a boolean if a field has been set. +func (o *EnumArrays) HasArrayEnum() bool { + if o != nil && o.ArrayEnum != nil { + return true + } + + return false +} + +// SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. +func (o *EnumArrays) SetArrayEnum(v []string) { + o.ArrayEnum = &v +} + + +func (o EnumArrays) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.JustSymbol != nil { + toSerialize["just_symbol"] = o.JustSymbol + } + if o.ArrayEnum != nil { + toSerialize["array_enum"] = o.ArrayEnum + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_enum_class.go b/samples/client/petstore/go/go-petstore/model_enum_class.go index 534ce4328817..b52d1095424b 100644 --- a/samples/client/petstore/go/go-petstore/model_enum_class.go +++ b/samples/client/petstore/go/go-petstore/model_enum_class.go @@ -15,4 +15,5 @@ const ( ABC EnumClass = "_abc" EFG EnumClass = "-efg" XYZ EnumClass = "(xyz)" -) \ No newline at end of file +) + diff --git a/samples/client/petstore/go/go-petstore/model_enum_test_.go b/samples/client/petstore/go/go-petstore/model_enum_test_.go index f85f31501a01..1e9f8a449e97 100644 --- a/samples/client/petstore/go/go-petstore/model_enum_test_.go +++ b/samples/client/petstore/go/go-petstore/model_enum_test_.go @@ -8,11 +8,211 @@ */ package petstore +import ( + "encoding/json" + "errors" +) type EnumTest struct { - EnumString string `json:"enum_string,omitempty"` - EnumStringRequired string `json:"enum_string_required"` - EnumInteger int32 `json:"enum_integer,omitempty"` - EnumNumber float64 `json:"enum_number,omitempty"` - OuterEnum OuterEnum `json:"outerEnum,omitempty"` + EnumString *string `json:"enum_string,omitempty"` + + EnumStringRequired *string `json:"enum_string_required,omitempty"` + + EnumInteger *int32 `json:"enum_integer,omitempty"` + + EnumNumber *float64 `json:"enum_number,omitempty"` + + OuterEnum *OuterEnum `json:"outerEnum,omitempty"` + +} + +// GetEnumString returns the EnumString field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumString() string { + if o == nil || o.EnumString == nil { + var ret string + return ret + } + return *o.EnumString +} + +// GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumStringOk() (string, bool) { + if o == nil || o.EnumString == nil { + var ret string + return ret, false + } + return *o.EnumString, true +} + +// HasEnumString returns a boolean if a field has been set. +func (o *EnumTest) HasEnumString() bool { + if o != nil && o.EnumString != nil { + return true + } + + return false +} + +// SetEnumString gets a reference to the given string and assigns it to the EnumString field. +func (o *EnumTest) SetEnumString(v string) { + o.EnumString = &v } + +// GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumStringRequired() string { + if o == nil || o.EnumStringRequired == nil { + var ret string + return ret + } + return *o.EnumStringRequired +} + +// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumStringRequiredOk() (string, bool) { + if o == nil || o.EnumStringRequired == nil { + var ret string + return ret, false + } + return *o.EnumStringRequired, true +} + +// HasEnumStringRequired returns a boolean if a field has been set. +func (o *EnumTest) HasEnumStringRequired() bool { + if o != nil && o.EnumStringRequired != nil { + return true + } + + return false +} + +// SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field. +func (o *EnumTest) SetEnumStringRequired(v string) { + o.EnumStringRequired = &v +} + +// GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumInteger() int32 { + if o == nil || o.EnumInteger == nil { + var ret int32 + return ret + } + return *o.EnumInteger +} + +// GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumIntegerOk() (int32, bool) { + if o == nil || o.EnumInteger == nil { + var ret int32 + return ret, false + } + return *o.EnumInteger, true +} + +// HasEnumInteger returns a boolean if a field has been set. +func (o *EnumTest) HasEnumInteger() bool { + if o != nil && o.EnumInteger != nil { + return true + } + + return false +} + +// SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field. +func (o *EnumTest) SetEnumInteger(v int32) { + o.EnumInteger = &v +} + +// GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. +func (o *EnumTest) GetEnumNumber() float64 { + if o == nil || o.EnumNumber == nil { + var ret float64 + return ret + } + return *o.EnumNumber +} + +// GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumNumberOk() (float64, bool) { + if o == nil || o.EnumNumber == nil { + var ret float64 + return ret, false + } + return *o.EnumNumber, true +} + +// HasEnumNumber returns a boolean if a field has been set. +func (o *EnumTest) HasEnumNumber() bool { + if o != nil && o.EnumNumber != nil { + return true + } + + return false +} + +// SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field. +func (o *EnumTest) SetEnumNumber(v float64) { + o.EnumNumber = &v +} + +// GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. +func (o *EnumTest) GetOuterEnum() OuterEnum { + if o == nil || o.OuterEnum == nil { + var ret OuterEnum + return ret + } + return *o.OuterEnum +} + +// GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) { + if o == nil || o.OuterEnum == nil { + var ret OuterEnum + return ret, false + } + return *o.OuterEnum, true +} + +// HasOuterEnum returns a boolean if a field has been set. +func (o *EnumTest) HasOuterEnum() bool { + if o != nil && o.OuterEnum != nil { + return true + } + + return false +} + +// SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. +func (o *EnumTest) SetOuterEnum(v OuterEnum) { + o.OuterEnum = &v +} + + +func (o EnumTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.EnumString != nil { + toSerialize["enum_string"] = o.EnumString + } + if o.EnumStringRequired == nil { + return nil, errors.New("EnumStringRequired is required and not nullable, but was not set on EnumTest") + } + if o.EnumStringRequired != nil { + toSerialize["enum_string_required"] = o.EnumStringRequired + } + if o.EnumInteger != nil { + toSerialize["enum_integer"] = o.EnumInteger + } + if o.EnumNumber != nil { + toSerialize["enum_number"] = o.EnumNumber + } + if o.OuterEnum != nil { + toSerialize["outerEnum"] = o.OuterEnum + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_file.go b/samples/client/petstore/go/go-petstore/model_file.go index 2782ccc9a2aa..4968739ef45b 100644 --- a/samples/client/petstore/go/go-petstore/model_file.go +++ b/samples/client/petstore/go/go-petstore/model_file.go @@ -8,9 +8,57 @@ */ package petstore +import ( + "encoding/json" +) // Must be named `File` for test. type File struct { // Test capitalization - SourceURI string `json:"sourceURI,omitempty"` + SourceURI *string `json:"sourceURI,omitempty"` + +} + +// GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. +func (o *File) GetSourceURI() string { + if o == nil || o.SourceURI == nil { + var ret string + return ret + } + return *o.SourceURI +} + +// GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *File) GetSourceURIOk() (string, bool) { + if o == nil || o.SourceURI == nil { + var ret string + return ret, false + } + return *o.SourceURI, true +} + +// HasSourceURI returns a boolean if a field has been set. +func (o *File) HasSourceURI() bool { + if o != nil && o.SourceURI != nil { + return true + } + + return false } + +// SetSourceURI gets a reference to the given string and assigns it to the SourceURI field. +func (o *File) SetSourceURI(v string) { + o.SourceURI = &v +} + + +func (o File) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SourceURI != nil { + toSerialize["sourceURI"] = o.SourceURI + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_file_schema_test_class.go b/samples/client/petstore/go/go-petstore/model_file_schema_test_class.go index 487f766c6492..16cd67f29d31 100644 --- a/samples/client/petstore/go/go-petstore/model_file_schema_test_class.go +++ b/samples/client/petstore/go/go-petstore/model_file_schema_test_class.go @@ -8,8 +8,93 @@ */ package petstore +import ( + "encoding/json" +) type FileSchemaTestClass struct { - File File `json:"file,omitempty"` - Files []File `json:"files,omitempty"` + File *File `json:"file,omitempty"` + + Files *[]File `json:"files,omitempty"` + +} + +// GetFile returns the File field if non-nil, zero value otherwise. +func (o *FileSchemaTestClass) GetFile() File { + if o == nil || o.File == nil { + var ret File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FileSchemaTestClass) GetFileOk() (File, bool) { + if o == nil || o.File == nil { + var ret File + return ret, false + } + return *o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *FileSchemaTestClass) HasFile() bool { + if o != nil && o.File != nil { + return true + } + + return false +} + +// SetFile gets a reference to the given File and assigns it to the File field. +func (o *FileSchemaTestClass) SetFile(v File) { + o.File = &v +} + +// GetFiles returns the Files field if non-nil, zero value otherwise. +func (o *FileSchemaTestClass) GetFiles() []File { + if o == nil || o.Files == nil { + var ret []File + return ret + } + return *o.Files } + +// GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { + if o == nil || o.Files == nil { + var ret []File + return ret, false + } + return *o.Files, true +} + +// HasFiles returns a boolean if a field has been set. +func (o *FileSchemaTestClass) HasFiles() bool { + if o != nil && o.Files != nil { + return true + } + + return false +} + +// SetFiles gets a reference to the given []File and assigns it to the Files field. +func (o *FileSchemaTestClass) SetFiles(v []File) { + o.Files = &v +} + + +func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.File != nil { + toSerialize["file"] = o.File + } + if o.Files != nil { + toSerialize["files"] = o.Files + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_format_test_.go b/samples/client/petstore/go/go-petstore/model_format_test_.go index d723bdfee39e..5532e92477f3 100644 --- a/samples/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go/go-petstore/model_format_test_.go @@ -11,20 +11,523 @@ package petstore import ( "os" "time" + "encoding/json" + "errors" ) type FormatTest struct { - Integer int32 `json:"integer,omitempty"` - Int32 int32 `json:"int32,omitempty"` - Int64 int64 `json:"int64,omitempty"` - Number float32 `json:"number"` - Float float32 `json:"float,omitempty"` - Double float64 `json:"double,omitempty"` - String string `json:"string,omitempty"` - Byte string `json:"byte"` - Binary *os.File `json:"binary,omitempty"` - Date string `json:"date"` - DateTime time.Time `json:"dateTime,omitempty"` - Uuid string `json:"uuid,omitempty"` - Password string `json:"password"` + Integer *int32 `json:"integer,omitempty"` + + Int32 *int32 `json:"int32,omitempty"` + + Int64 *int64 `json:"int64,omitempty"` + + Number *float32 `json:"number,omitempty"` + + Float *float32 `json:"float,omitempty"` + + Double *float64 `json:"double,omitempty"` + + String *string `json:"string,omitempty"` + + Byte *string `json:"byte,omitempty"` + + Binary **os.File `json:"binary,omitempty"` + + Date *string `json:"date,omitempty"` + + DateTime *time.Time `json:"dateTime,omitempty"` + + Uuid *string `json:"uuid,omitempty"` + + Password *string `json:"password,omitempty"` + +} + +// GetInteger returns the Integer field if non-nil, zero value otherwise. +func (o *FormatTest) GetInteger() int32 { + if o == nil || o.Integer == nil { + var ret int32 + return ret + } + return *o.Integer +} + +// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetIntegerOk() (int32, bool) { + if o == nil || o.Integer == nil { + var ret int32 + return ret, false + } + return *o.Integer, true +} + +// HasInteger returns a boolean if a field has been set. +func (o *FormatTest) HasInteger() bool { + if o != nil && o.Integer != nil { + return true + } + + return false +} + +// SetInteger gets a reference to the given int32 and assigns it to the Integer field. +func (o *FormatTest) SetInteger(v int32) { + o.Integer = &v +} + +// GetInt32 returns the Int32 field if non-nil, zero value otherwise. +func (o *FormatTest) GetInt32() int32 { + if o == nil || o.Int32 == nil { + var ret int32 + return ret + } + return *o.Int32 +} + +// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetInt32Ok() (int32, bool) { + if o == nil || o.Int32 == nil { + var ret int32 + return ret, false + } + return *o.Int32, true +} + +// HasInt32 returns a boolean if a field has been set. +func (o *FormatTest) HasInt32() bool { + if o != nil && o.Int32 != nil { + return true + } + + return false +} + +// SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. +func (o *FormatTest) SetInt32(v int32) { + o.Int32 = &v +} + +// GetInt64 returns the Int64 field if non-nil, zero value otherwise. +func (o *FormatTest) GetInt64() int64 { + if o == nil || o.Int64 == nil { + var ret int64 + return ret + } + return *o.Int64 +} + +// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetInt64Ok() (int64, bool) { + if o == nil || o.Int64 == nil { + var ret int64 + return ret, false + } + return *o.Int64, true +} + +// HasInt64 returns a boolean if a field has been set. +func (o *FormatTest) HasInt64() bool { + if o != nil && o.Int64 != nil { + return true + } + + return false +} + +// SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. +func (o *FormatTest) SetInt64(v int64) { + o.Int64 = &v +} + +// GetNumber returns the Number field if non-nil, zero value otherwise. +func (o *FormatTest) GetNumber() float32 { + if o == nil || o.Number == nil { + var ret float32 + return ret + } + return *o.Number +} + +// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetNumberOk() (float32, bool) { + if o == nil || o.Number == nil { + var ret float32 + return ret, false + } + return *o.Number, true +} + +// HasNumber returns a boolean if a field has been set. +func (o *FormatTest) HasNumber() bool { + if o != nil && o.Number != nil { + return true + } + + return false +} + +// SetNumber gets a reference to the given float32 and assigns it to the Number field. +func (o *FormatTest) SetNumber(v float32) { + o.Number = &v +} + +// GetFloat returns the Float field if non-nil, zero value otherwise. +func (o *FormatTest) GetFloat() float32 { + if o == nil || o.Float == nil { + var ret float32 + return ret + } + return *o.Float } + +// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetFloatOk() (float32, bool) { + if o == nil || o.Float == nil { + var ret float32 + return ret, false + } + return *o.Float, true +} + +// HasFloat returns a boolean if a field has been set. +func (o *FormatTest) HasFloat() bool { + if o != nil && o.Float != nil { + return true + } + + return false +} + +// SetFloat gets a reference to the given float32 and assigns it to the Float field. +func (o *FormatTest) SetFloat(v float32) { + o.Float = &v +} + +// GetDouble returns the Double field if non-nil, zero value otherwise. +func (o *FormatTest) GetDouble() float64 { + if o == nil || o.Double == nil { + var ret float64 + return ret + } + return *o.Double +} + +// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDoubleOk() (float64, bool) { + if o == nil || o.Double == nil { + var ret float64 + return ret, false + } + return *o.Double, true +} + +// HasDouble returns a boolean if a field has been set. +func (o *FormatTest) HasDouble() bool { + if o != nil && o.Double != nil { + return true + } + + return false +} + +// SetDouble gets a reference to the given float64 and assigns it to the Double field. +func (o *FormatTest) SetDouble(v float64) { + o.Double = &v +} + +// GetString returns the String field if non-nil, zero value otherwise. +func (o *FormatTest) GetString() string { + if o == nil || o.String == nil { + var ret string + return ret + } + return *o.String +} + +// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetStringOk() (string, bool) { + if o == nil || o.String == nil { + var ret string + return ret, false + } + return *o.String, true +} + +// HasString returns a boolean if a field has been set. +func (o *FormatTest) HasString() bool { + if o != nil && o.String != nil { + return true + } + + return false +} + +// SetString gets a reference to the given string and assigns it to the String field. +func (o *FormatTest) SetString(v string) { + o.String = &v +} + +// GetByte returns the Byte field if non-nil, zero value otherwise. +func (o *FormatTest) GetByte() string { + if o == nil || o.Byte == nil { + var ret string + return ret + } + return *o.Byte +} + +// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetByteOk() (string, bool) { + if o == nil || o.Byte == nil { + var ret string + return ret, false + } + return *o.Byte, true +} + +// HasByte returns a boolean if a field has been set. +func (o *FormatTest) HasByte() bool { + if o != nil && o.Byte != nil { + return true + } + + return false +} + +// SetByte gets a reference to the given string and assigns it to the Byte field. +func (o *FormatTest) SetByte(v string) { + o.Byte = &v +} + +// GetBinary returns the Binary field if non-nil, zero value otherwise. +func (o *FormatTest) GetBinary() *os.File { + if o == nil || o.Binary == nil { + var ret *os.File + return ret + } + return *o.Binary +} + +// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetBinaryOk() (*os.File, bool) { + if o == nil || o.Binary == nil { + var ret *os.File + return ret, false + } + return *o.Binary, true +} + +// HasBinary returns a boolean if a field has been set. +func (o *FormatTest) HasBinary() bool { + if o != nil && o.Binary != nil { + return true + } + + return false +} + +// SetBinary gets a reference to the given *os.File and assigns it to the Binary field. +func (o *FormatTest) SetBinary(v *os.File) { + o.Binary = &v +} + +// GetDate returns the Date field if non-nil, zero value otherwise. +func (o *FormatTest) GetDate() string { + if o == nil || o.Date == nil { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDateOk() (string, bool) { + if o == nil || o.Date == nil { + var ret string + return ret, false + } + return *o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *FormatTest) HasDate() bool { + if o != nil && o.Date != nil { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *FormatTest) SetDate(v string) { + o.Date = &v +} + +// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +func (o *FormatTest) GetDateTime() time.Time { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret + } + return *o.DateTime +} + +// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDateTimeOk() (time.Time, bool) { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret, false + } + return *o.DateTime, true +} + +// HasDateTime returns a boolean if a field has been set. +func (o *FormatTest) HasDateTime() bool { + if o != nil && o.DateTime != nil { + return true + } + + return false +} + +// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +func (o *FormatTest) SetDateTime(v time.Time) { + o.DateTime = &v +} + +// GetUuid returns the Uuid field if non-nil, zero value otherwise. +func (o *FormatTest) GetUuid() string { + if o == nil || o.Uuid == nil { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetUuidOk() (string, bool) { + if o == nil || o.Uuid == nil { + var ret string + return ret, false + } + return *o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *FormatTest) HasUuid() bool { + if o != nil && o.Uuid != nil { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *FormatTest) SetUuid(v string) { + o.Uuid = &v +} + +// GetPassword returns the Password field if non-nil, zero value otherwise. +func (o *FormatTest) GetPassword() string { + if o == nil || o.Password == nil { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FormatTest) GetPasswordOk() (string, bool) { + if o == nil || o.Password == nil { + var ret string + return ret, false + } + return *o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *FormatTest) HasPassword() bool { + if o != nil && o.Password != nil { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *FormatTest) SetPassword(v string) { + o.Password = &v +} + + +func (o FormatTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Integer != nil { + toSerialize["integer"] = o.Integer + } + if o.Int32 != nil { + toSerialize["int32"] = o.Int32 + } + if o.Int64 != nil { + toSerialize["int64"] = o.Int64 + } + if o.Number == nil { + return nil, errors.New("Number is required and not nullable, but was not set on FormatTest") + } + if o.Number != nil { + toSerialize["number"] = o.Number + } + if o.Float != nil { + toSerialize["float"] = o.Float + } + if o.Double != nil { + toSerialize["double"] = o.Double + } + if o.String != nil { + toSerialize["string"] = o.String + } + if o.Byte == nil { + return nil, errors.New("Byte is required and not nullable, but was not set on FormatTest") + } + if o.Byte != nil { + toSerialize["byte"] = o.Byte + } + if o.Binary != nil { + toSerialize["binary"] = o.Binary + } + if o.Date == nil { + return nil, errors.New("Date is required and not nullable, but was not set on FormatTest") + } + if o.Date != nil { + toSerialize["date"] = o.Date + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Uuid != nil { + toSerialize["uuid"] = o.Uuid + } + if o.Password == nil { + return nil, errors.New("Password is required and not nullable, but was not set on FormatTest") + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_has_only_read_only.go b/samples/client/petstore/go/go-petstore/model_has_only_read_only.go index 1cf0e4f530d4..1b03286159ef 100644 --- a/samples/client/petstore/go/go-petstore/model_has_only_read_only.go +++ b/samples/client/petstore/go/go-petstore/model_has_only_read_only.go @@ -8,8 +8,93 @@ */ package petstore +import ( + "encoding/json" +) type HasOnlyReadOnly struct { - Bar string `json:"bar,omitempty"` - Foo string `json:"foo,omitempty"` + Bar *string `json:"bar,omitempty"` + + Foo *string `json:"foo,omitempty"` + +} + +// GetBar returns the Bar field if non-nil, zero value otherwise. +func (o *HasOnlyReadOnly) GetBar() string { + if o == nil || o.Bar == nil { + var ret string + return ret + } + return *o.Bar +} + +// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *HasOnlyReadOnly) GetBarOk() (string, bool) { + if o == nil || o.Bar == nil { + var ret string + return ret, false + } + return *o.Bar, true +} + +// HasBar returns a boolean if a field has been set. +func (o *HasOnlyReadOnly) HasBar() bool { + if o != nil && o.Bar != nil { + return true + } + + return false +} + +// SetBar gets a reference to the given string and assigns it to the Bar field. +func (o *HasOnlyReadOnly) SetBar(v string) { + o.Bar = &v +} + +// GetFoo returns the Foo field if non-nil, zero value otherwise. +func (o *HasOnlyReadOnly) GetFoo() string { + if o == nil || o.Foo == nil { + var ret string + return ret + } + return *o.Foo } + +// GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *HasOnlyReadOnly) GetFooOk() (string, bool) { + if o == nil || o.Foo == nil { + var ret string + return ret, false + } + return *o.Foo, true +} + +// HasFoo returns a boolean if a field has been set. +func (o *HasOnlyReadOnly) HasFoo() bool { + if o != nil && o.Foo != nil { + return true + } + + return false +} + +// SetFoo gets a reference to the given string and assigns it to the Foo field. +func (o *HasOnlyReadOnly) SetFoo(v string) { + o.Foo = &v +} + + +func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Bar != nil { + toSerialize["bar"] = o.Bar + } + if o.Foo != nil { + toSerialize["foo"] = o.Foo + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_list.go b/samples/client/petstore/go/go-petstore/model_list.go index 12f3bd3f6600..5c9d4df5c950 100644 --- a/samples/client/petstore/go/go-petstore/model_list.go +++ b/samples/client/petstore/go/go-petstore/model_list.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type List struct { - Var123List string `json:"123-list,omitempty"` + Var123List *string `json:"123-list,omitempty"` + +} + +// GetVar123List returns the Var123List field if non-nil, zero value otherwise. +func (o *List) GetVar123List() string { + if o == nil || o.Var123List == nil { + var ret string + return ret + } + return *o.Var123List +} + +// GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *List) GetVar123ListOk() (string, bool) { + if o == nil || o.Var123List == nil { + var ret string + return ret, false + } + return *o.Var123List, true +} + +// HasVar123List returns a boolean if a field has been set. +func (o *List) HasVar123List() bool { + if o != nil && o.Var123List != nil { + return true + } + + return false } + +// SetVar123List gets a reference to the given string and assigns it to the Var123List field. +func (o *List) SetVar123List(v string) { + o.Var123List = &v +} + + +func (o List) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Var123List != nil { + toSerialize["123-list"] = o.Var123List + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_map_test_.go b/samples/client/petstore/go/go-petstore/model_map_test_.go index 830e760fe314..3ae7b22b887b 100644 --- a/samples/client/petstore/go/go-petstore/model_map_test_.go +++ b/samples/client/petstore/go/go-petstore/model_map_test_.go @@ -8,10 +8,169 @@ */ package petstore +import ( + "encoding/json" +) type MapTest struct { - MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty"` - MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty"` - DirectMap map[string]bool `json:"direct_map,omitempty"` - IndirectMap map[string]bool `json:"indirect_map,omitempty"` + MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty"` + + MapOfEnumString *map[string]string `json:"map_of_enum_string,omitempty"` + + DirectMap *map[string]bool `json:"direct_map,omitempty"` + + IndirectMap *map[string]bool `json:"indirect_map,omitempty"` + +} + +// GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. +func (o *MapTest) GetMapMapOfString() map[string]map[string]string { + if o == nil || o.MapMapOfString == nil { + var ret map[string]map[string]string + return ret + } + return *o.MapMapOfString } + +// GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool) { + if o == nil || o.MapMapOfString == nil { + var ret map[string]map[string]string + return ret, false + } + return *o.MapMapOfString, true +} + +// HasMapMapOfString returns a boolean if a field has been set. +func (o *MapTest) HasMapMapOfString() bool { + if o != nil && o.MapMapOfString != nil { + return true + } + + return false +} + +// SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field. +func (o *MapTest) SetMapMapOfString(v map[string]map[string]string) { + o.MapMapOfString = &v +} + +// GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. +func (o *MapTest) GetMapOfEnumString() map[string]string { + if o == nil || o.MapOfEnumString == nil { + var ret map[string]string + return ret + } + return *o.MapOfEnumString +} + +// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool) { + if o == nil || o.MapOfEnumString == nil { + var ret map[string]string + return ret, false + } + return *o.MapOfEnumString, true +} + +// HasMapOfEnumString returns a boolean if a field has been set. +func (o *MapTest) HasMapOfEnumString() bool { + if o != nil && o.MapOfEnumString != nil { + return true + } + + return false +} + +// SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field. +func (o *MapTest) SetMapOfEnumString(v map[string]string) { + o.MapOfEnumString = &v +} + +// GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. +func (o *MapTest) GetDirectMap() map[string]bool { + if o == nil || o.DirectMap == nil { + var ret map[string]bool + return ret + } + return *o.DirectMap +} + +// GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetDirectMapOk() (map[string]bool, bool) { + if o == nil || o.DirectMap == nil { + var ret map[string]bool + return ret, false + } + return *o.DirectMap, true +} + +// HasDirectMap returns a boolean if a field has been set. +func (o *MapTest) HasDirectMap() bool { + if o != nil && o.DirectMap != nil { + return true + } + + return false +} + +// SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field. +func (o *MapTest) SetDirectMap(v map[string]bool) { + o.DirectMap = &v +} + +// GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. +func (o *MapTest) GetIndirectMap() map[string]bool { + if o == nil || o.IndirectMap == nil { + var ret map[string]bool + return ret + } + return *o.IndirectMap +} + +// GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool) { + if o == nil || o.IndirectMap == nil { + var ret map[string]bool + return ret, false + } + return *o.IndirectMap, true +} + +// HasIndirectMap returns a boolean if a field has been set. +func (o *MapTest) HasIndirectMap() bool { + if o != nil && o.IndirectMap != nil { + return true + } + + return false +} + +// SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field. +func (o *MapTest) SetIndirectMap(v map[string]bool) { + o.IndirectMap = &v +} + + +func (o MapTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MapMapOfString != nil { + toSerialize["map_map_of_string"] = o.MapMapOfString + } + if o.MapOfEnumString != nil { + toSerialize["map_of_enum_string"] = o.MapOfEnumString + } + if o.DirectMap != nil { + toSerialize["direct_map"] = o.DirectMap + } + if o.IndirectMap != nil { + toSerialize["indirect_map"] = o.IndirectMap + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go index 0ad92e96f8ec..5dd3d1d02068 100644 --- a/samples/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -10,10 +10,130 @@ package petstore import ( "time" + "encoding/json" ) type MixedPropertiesAndAdditionalPropertiesClass struct { - Uuid string `json:"uuid,omitempty"` - DateTime time.Time `json:"dateTime,omitempty"` - Map map[string]Animal `json:"map,omitempty"` + Uuid *string `json:"uuid,omitempty"` + + DateTime *time.Time `json:"dateTime,omitempty"` + + Map *map[string]Animal `json:"map,omitempty"` + +} + +// GetUuid returns the Uuid field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { + if o == nil || o.Uuid == nil { + var ret string + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { + if o == nil || o.Uuid == nil { + var ret string + return ret, false + } + return *o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool { + if o != nil && o.Uuid != nil { + return true + } + + return false +} + +// SetUuid gets a reference to the given string and assigns it to the Uuid field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) { + o.Uuid = &v +} + +// GetDateTime returns the DateTime field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret + } + return *o.DateTime } + +// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool) { + if o == nil || o.DateTime == nil { + var ret time.Time + return ret, false + } + return *o.DateTime, true +} + +// HasDateTime returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool { + if o != nil && o.DateTime != nil { + return true + } + + return false +} + +// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time) { + o.DateTime = &v +} + +// GetMap returns the Map field if non-nil, zero value otherwise. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal { + if o == nil || o.Map == nil { + var ret map[string]Animal + return ret + } + return *o.Map +} + +// GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool) { + if o == nil || o.Map == nil { + var ret map[string]Animal + return ret, false + } + return *o.Map, true +} + +// HasMap returns a boolean if a field has been set. +func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool { + if o != nil && o.Map != nil { + return true + } + + return false +} + +// SetMap gets a reference to the given map[string]Animal and assigns it to the Map field. +func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal) { + o.Map = &v +} + + +func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Uuid != nil { + toSerialize["uuid"] = o.Uuid + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Map != nil { + toSerialize["map"] = o.Map + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_name.go b/samples/client/petstore/go/go-petstore/model_name.go index dde1b92eb6ab..1a0addae441b 100644 --- a/samples/client/petstore/go/go-petstore/model_name.go +++ b/samples/client/petstore/go/go-petstore/model_name.go @@ -8,11 +8,174 @@ */ package petstore +import ( + "encoding/json" + "errors" +) // Model for testing model name same as property name type Name struct { - Name int32 `json:"name"` - SnakeCase int32 `json:"snake_case,omitempty"` - Property string `json:"property,omitempty"` - Var123Number int32 `json:"123Number,omitempty"` + Name *int32 `json:"name,omitempty"` + + SnakeCase *int32 `json:"snake_case,omitempty"` + + Property *string `json:"property,omitempty"` + + Var123Number *int32 `json:"123Number,omitempty"` + +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Name) GetName() int32 { + if o == nil || o.Name == nil { + var ret int32 + return ret + } + return *o.Name } + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetNameOk() (int32, bool) { + if o == nil || o.Name == nil { + var ret int32 + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Name) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given int32 and assigns it to the Name field. +func (o *Name) SetName(v int32) { + o.Name = &v +} + +// GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. +func (o *Name) GetSnakeCase() int32 { + if o == nil || o.SnakeCase == nil { + var ret int32 + return ret + } + return *o.SnakeCase +} + +// GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetSnakeCaseOk() (int32, bool) { + if o == nil || o.SnakeCase == nil { + var ret int32 + return ret, false + } + return *o.SnakeCase, true +} + +// HasSnakeCase returns a boolean if a field has been set. +func (o *Name) HasSnakeCase() bool { + if o != nil && o.SnakeCase != nil { + return true + } + + return false +} + +// SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field. +func (o *Name) SetSnakeCase(v int32) { + o.SnakeCase = &v +} + +// GetProperty returns the Property field if non-nil, zero value otherwise. +func (o *Name) GetProperty() string { + if o == nil || o.Property == nil { + var ret string + return ret + } + return *o.Property +} + +// GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetPropertyOk() (string, bool) { + if o == nil || o.Property == nil { + var ret string + return ret, false + } + return *o.Property, true +} + +// HasProperty returns a boolean if a field has been set. +func (o *Name) HasProperty() bool { + if o != nil && o.Property != nil { + return true + } + + return false +} + +// SetProperty gets a reference to the given string and assigns it to the Property field. +func (o *Name) SetProperty(v string) { + o.Property = &v +} + +// GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. +func (o *Name) GetVar123Number() int32 { + if o == nil || o.Var123Number == nil { + var ret int32 + return ret + } + return *o.Var123Number +} + +// GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Name) GetVar123NumberOk() (int32, bool) { + if o == nil || o.Var123Number == nil { + var ret int32 + return ret, false + } + return *o.Var123Number, true +} + +// HasVar123Number returns a boolean if a field has been set. +func (o *Name) HasVar123Number() bool { + if o != nil && o.Var123Number != nil { + return true + } + + return false +} + +// SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field. +func (o *Name) SetVar123Number(v int32) { + o.Var123Number = &v +} + + +func (o Name) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Name") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.SnakeCase != nil { + toSerialize["snake_case"] = o.SnakeCase + } + if o.Property != nil { + toSerialize["property"] = o.Property + } + if o.Var123Number != nil { + toSerialize["123Number"] = o.Var123Number + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_number_only.go b/samples/client/petstore/go/go-petstore/model_number_only.go index 7a2fd5fd8f6d..47d69c607e21 100644 --- a/samples/client/petstore/go/go-petstore/model_number_only.go +++ b/samples/client/petstore/go/go-petstore/model_number_only.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type NumberOnly struct { - JustNumber float32 `json:"JustNumber,omitempty"` + JustNumber *float32 `json:"JustNumber,omitempty"` + +} + +// GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. +func (o *NumberOnly) GetJustNumber() float32 { + if o == nil || o.JustNumber == nil { + var ret float32 + return ret + } + return *o.JustNumber +} + +// GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NumberOnly) GetJustNumberOk() (float32, bool) { + if o == nil || o.JustNumber == nil { + var ret float32 + return ret, false + } + return *o.JustNumber, true +} + +// HasJustNumber returns a boolean if a field has been set. +func (o *NumberOnly) HasJustNumber() bool { + if o != nil && o.JustNumber != nil { + return true + } + + return false } + +// SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field. +func (o *NumberOnly) SetJustNumber(v float32) { + o.JustNumber = &v +} + + +func (o NumberOnly) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.JustNumber != nil { + toSerialize["JustNumber"] = o.JustNumber + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_order.go b/samples/client/petstore/go/go-petstore/model_order.go index c81d67ae0fa4..75d9299386da 100644 --- a/samples/client/petstore/go/go-petstore/model_order.go +++ b/samples/client/petstore/go/go-petstore/model_order.go @@ -10,14 +10,245 @@ package petstore import ( "time" + "encoding/json" ) type Order struct { - Id int64 `json:"id,omitempty"` - PetId int64 `json:"petId,omitempty"` - Quantity int32 `json:"quantity,omitempty"` - ShipDate time.Time `json:"shipDate,omitempty"` + Id *int64 `json:"id,omitempty"` + + PetId *int64 `json:"petId,omitempty"` + + Quantity *int32 `json:"quantity,omitempty"` + + ShipDate *time.Time `json:"shipDate,omitempty"` + // Order Status - Status string `json:"status,omitempty"` - Complete bool `json:"complete,omitempty"` + Status *string `json:"status,omitempty"` + + Complete *bool `json:"complete,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Order) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Order) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Order) SetId(v int64) { + o.Id = &v +} + +// GetPetId returns the PetId field if non-nil, zero value otherwise. +func (o *Order) GetPetId() int64 { + if o == nil || o.PetId == nil { + var ret int64 + return ret + } + return *o.PetId +} + +// GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetPetIdOk() (int64, bool) { + if o == nil || o.PetId == nil { + var ret int64 + return ret, false + } + return *o.PetId, true +} + +// HasPetId returns a boolean if a field has been set. +func (o *Order) HasPetId() bool { + if o != nil && o.PetId != nil { + return true + } + + return false +} + +// SetPetId gets a reference to the given int64 and assigns it to the PetId field. +func (o *Order) SetPetId(v int64) { + o.PetId = &v +} + +// GetQuantity returns the Quantity field if non-nil, zero value otherwise. +func (o *Order) GetQuantity() int32 { + if o == nil || o.Quantity == nil { + var ret int32 + return ret + } + return *o.Quantity +} + +// GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetQuantityOk() (int32, bool) { + if o == nil || o.Quantity == nil { + var ret int32 + return ret, false + } + return *o.Quantity, true +} + +// HasQuantity returns a boolean if a field has been set. +func (o *Order) HasQuantity() bool { + if o != nil && o.Quantity != nil { + return true + } + + return false +} + +// SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. +func (o *Order) SetQuantity(v int32) { + o.Quantity = &v } + +// GetShipDate returns the ShipDate field if non-nil, zero value otherwise. +func (o *Order) GetShipDate() time.Time { + if o == nil || o.ShipDate == nil { + var ret time.Time + return ret + } + return *o.ShipDate +} + +// GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetShipDateOk() (time.Time, bool) { + if o == nil || o.ShipDate == nil { + var ret time.Time + return ret, false + } + return *o.ShipDate, true +} + +// HasShipDate returns a boolean if a field has been set. +func (o *Order) HasShipDate() bool { + if o != nil && o.ShipDate != nil { + return true + } + + return false +} + +// SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field. +func (o *Order) SetShipDate(v time.Time) { + o.ShipDate = &v +} + +// GetStatus returns the Status field if non-nil, zero value otherwise. +func (o *Order) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetStatusOk() (string, bool) { + if o == nil || o.Status == nil { + var ret string + return ret, false + } + return *o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Order) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Order) SetStatus(v string) { + o.Status = &v +} + +// GetComplete returns the Complete field if non-nil, zero value otherwise. +func (o *Order) GetComplete() bool { + if o == nil || o.Complete == nil { + var ret bool + return ret + } + return *o.Complete +} + +// GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Order) GetCompleteOk() (bool, bool) { + if o == nil || o.Complete == nil { + var ret bool + return ret, false + } + return *o.Complete, true +} + +// HasComplete returns a boolean if a field has been set. +func (o *Order) HasComplete() bool { + if o != nil && o.Complete != nil { + return true + } + + return false +} + +// SetComplete gets a reference to the given bool and assigns it to the Complete field. +func (o *Order) SetComplete(v bool) { + o.Complete = &v +} + + +func (o Order) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.PetId != nil { + toSerialize["petId"] = o.PetId + } + if o.Quantity != nil { + toSerialize["quantity"] = o.Quantity + } + if o.ShipDate != nil { + toSerialize["shipDate"] = o.ShipDate + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Complete != nil { + toSerialize["complete"] = o.Complete + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_outer_composite.go b/samples/client/petstore/go/go-petstore/model_outer_composite.go index 0ebb526267e8..83723a9b8ef1 100644 --- a/samples/client/petstore/go/go-petstore/model_outer_composite.go +++ b/samples/client/petstore/go/go-petstore/model_outer_composite.go @@ -8,9 +8,131 @@ */ package petstore +import ( + "encoding/json" +) type OuterComposite struct { - MyNumber float32 `json:"my_number,omitempty"` - MyString string `json:"my_string,omitempty"` - MyBoolean bool `json:"my_boolean,omitempty"` + MyNumber *float32 `json:"my_number,omitempty"` + + MyString *string `json:"my_string,omitempty"` + + MyBoolean *bool `json:"my_boolean,omitempty"` + +} + +// GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyNumber() float32 { + if o == nil || o.MyNumber == nil { + var ret float32 + return ret + } + return *o.MyNumber +} + +// GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyNumberOk() (float32, bool) { + if o == nil || o.MyNumber == nil { + var ret float32 + return ret, false + } + return *o.MyNumber, true +} + +// HasMyNumber returns a boolean if a field has been set. +func (o *OuterComposite) HasMyNumber() bool { + if o != nil && o.MyNumber != nil { + return true + } + + return false +} + +// SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field. +func (o *OuterComposite) SetMyNumber(v float32) { + o.MyNumber = &v +} + +// GetMyString returns the MyString field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyString() string { + if o == nil || o.MyString == nil { + var ret string + return ret + } + return *o.MyString } + +// GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyStringOk() (string, bool) { + if o == nil || o.MyString == nil { + var ret string + return ret, false + } + return *o.MyString, true +} + +// HasMyString returns a boolean if a field has been set. +func (o *OuterComposite) HasMyString() bool { + if o != nil && o.MyString != nil { + return true + } + + return false +} + +// SetMyString gets a reference to the given string and assigns it to the MyString field. +func (o *OuterComposite) SetMyString(v string) { + o.MyString = &v +} + +// GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. +func (o *OuterComposite) GetMyBoolean() bool { + if o == nil || o.MyBoolean == nil { + var ret bool + return ret + } + return *o.MyBoolean +} + +// GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *OuterComposite) GetMyBooleanOk() (bool, bool) { + if o == nil || o.MyBoolean == nil { + var ret bool + return ret, false + } + return *o.MyBoolean, true +} + +// HasMyBoolean returns a boolean if a field has been set. +func (o *OuterComposite) HasMyBoolean() bool { + if o != nil && o.MyBoolean != nil { + return true + } + + return false +} + +// SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field. +func (o *OuterComposite) SetMyBoolean(v bool) { + o.MyBoolean = &v +} + + +func (o OuterComposite) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MyNumber != nil { + toSerialize["my_number"] = o.MyNumber + } + if o.MyString != nil { + toSerialize["my_string"] = o.MyString + } + if o.MyBoolean != nil { + toSerialize["my_boolean"] = o.MyBoolean + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_outer_enum.go b/samples/client/petstore/go/go-petstore/model_outer_enum.go index 903d31e82690..131a07c71a8e 100644 --- a/samples/client/petstore/go/go-petstore/model_outer_enum.go +++ b/samples/client/petstore/go/go-petstore/model_outer_enum.go @@ -15,4 +15,5 @@ const ( PLACED OuterEnum = "placed" APPROVED OuterEnum = "approved" DELIVERED OuterEnum = "delivered" -) \ No newline at end of file +) + diff --git a/samples/client/petstore/go/go-petstore/model_pet.go b/samples/client/petstore/go/go-petstore/model_pet.go index 4930dbb92e8e..1216b0e799e1 100644 --- a/samples/client/petstore/go/go-petstore/model_pet.go +++ b/samples/client/petstore/go/go-petstore/model_pet.go @@ -8,13 +8,253 @@ */ package petstore +import ( + "encoding/json" + "errors" +) type Pet struct { - Id int64 `json:"id,omitempty"` - Category Category `json:"category,omitempty"` - Name string `json:"name"` - PhotoUrls []string `json:"photoUrls"` - Tags []Tag `json:"tags,omitempty"` + Id *int64 `json:"id,omitempty"` + + Category *Category `json:"category,omitempty"` + + Name *string `json:"name,omitempty"` + + PhotoUrls *[]string `json:"photoUrls,omitempty"` + + Tags *[]Tag `json:"tags,omitempty"` + // pet status in the store - Status string `json:"status,omitempty"` + Status *string `json:"status,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Pet) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Pet) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Pet) SetId(v int64) { + o.Id = &v +} + +// GetCategory returns the Category field if non-nil, zero value otherwise. +func (o *Pet) GetCategory() Category { + if o == nil || o.Category == nil { + var ret Category + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetCategoryOk() (Category, bool) { + if o == nil || o.Category == nil { + var ret Category + return ret, false + } + return *o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *Pet) HasCategory() bool { + if o != nil && o.Category != nil { + return true + } + + return false +} + +// SetCategory gets a reference to the given Category and assigns it to the Category field. +func (o *Pet) SetCategory(v Category) { + o.Category = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Pet) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Pet) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Pet) SetName(v string) { + o.Name = &v } + +// GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. +func (o *Pet) GetPhotoUrls() []string { + if o == nil || o.PhotoUrls == nil { + var ret []string + return ret + } + return *o.PhotoUrls +} + +// GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { + if o == nil || o.PhotoUrls == nil { + var ret []string + return ret, false + } + return *o.PhotoUrls, true +} + +// HasPhotoUrls returns a boolean if a field has been set. +func (o *Pet) HasPhotoUrls() bool { + if o != nil && o.PhotoUrls != nil { + return true + } + + return false +} + +// SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field. +func (o *Pet) SetPhotoUrls(v []string) { + o.PhotoUrls = &v +} + +// GetTags returns the Tags field if non-nil, zero value otherwise. +func (o *Pet) GetTags() []Tag { + if o == nil || o.Tags == nil { + var ret []Tag + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetTagsOk() ([]Tag, bool) { + if o == nil || o.Tags == nil { + var ret []Tag + return ret, false + } + return *o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Pet) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []Tag and assigns it to the Tags field. +func (o *Pet) SetTags(v []Tag) { + o.Tags = &v +} + +// GetStatus returns the Status field if non-nil, zero value otherwise. +func (o *Pet) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetStatusOk() (string, bool) { + if o == nil || o.Status == nil { + var ret string + return ret, false + } + return *o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Pet) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Pet) SetStatus(v string) { + o.Status = &v +} + + +func (o Pet) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Category != nil { + toSerialize["category"] = o.Category + } + if o.Name == nil { + return nil, errors.New("Name is required and not nullable, but was not set on Pet") + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.PhotoUrls == nil { + return nil, errors.New("PhotoUrls is required and not nullable, but was not set on Pet") + } + if o.PhotoUrls != nil { + toSerialize["photoUrls"] = o.PhotoUrls + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_read_only_first.go b/samples/client/petstore/go/go-petstore/model_read_only_first.go index 6b22163900b0..5c92010e8d0c 100644 --- a/samples/client/petstore/go/go-petstore/model_read_only_first.go +++ b/samples/client/petstore/go/go-petstore/model_read_only_first.go @@ -8,8 +8,93 @@ */ package petstore +import ( + "encoding/json" +) type ReadOnlyFirst struct { - Bar string `json:"bar,omitempty"` - Baz string `json:"baz,omitempty"` + Bar *string `json:"bar,omitempty"` + + Baz *string `json:"baz,omitempty"` + +} + +// GetBar returns the Bar field if non-nil, zero value otherwise. +func (o *ReadOnlyFirst) GetBar() string { + if o == nil || o.Bar == nil { + var ret string + return ret + } + return *o.Bar +} + +// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ReadOnlyFirst) GetBarOk() (string, bool) { + if o == nil || o.Bar == nil { + var ret string + return ret, false + } + return *o.Bar, true +} + +// HasBar returns a boolean if a field has been set. +func (o *ReadOnlyFirst) HasBar() bool { + if o != nil && o.Bar != nil { + return true + } + + return false +} + +// SetBar gets a reference to the given string and assigns it to the Bar field. +func (o *ReadOnlyFirst) SetBar(v string) { + o.Bar = &v +} + +// GetBaz returns the Baz field if non-nil, zero value otherwise. +func (o *ReadOnlyFirst) GetBaz() string { + if o == nil || o.Baz == nil { + var ret string + return ret + } + return *o.Baz } + +// GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ReadOnlyFirst) GetBazOk() (string, bool) { + if o == nil || o.Baz == nil { + var ret string + return ret, false + } + return *o.Baz, true +} + +// HasBaz returns a boolean if a field has been set. +func (o *ReadOnlyFirst) HasBaz() bool { + if o != nil && o.Baz != nil { + return true + } + + return false +} + +// SetBaz gets a reference to the given string and assigns it to the Baz field. +func (o *ReadOnlyFirst) SetBaz(v string) { + o.Baz = &v +} + + +func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Bar != nil { + toSerialize["bar"] = o.Bar + } + if o.Baz != nil { + toSerialize["baz"] = o.Baz + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_return.go b/samples/client/petstore/go/go-petstore/model_return.go index 7851dd851d31..e53cc31b5f58 100644 --- a/samples/client/petstore/go/go-petstore/model_return.go +++ b/samples/client/petstore/go/go-petstore/model_return.go @@ -8,8 +8,56 @@ */ package petstore +import ( + "encoding/json" +) // Model for testing reserved words type Return struct { - Return int32 `json:"return,omitempty"` + Return *int32 `json:"return,omitempty"` + +} + +// GetReturn returns the Return field if non-nil, zero value otherwise. +func (o *Return) GetReturn() int32 { + if o == nil || o.Return == nil { + var ret int32 + return ret + } + return *o.Return +} + +// GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Return) GetReturnOk() (int32, bool) { + if o == nil || o.Return == nil { + var ret int32 + return ret, false + } + return *o.Return, true +} + +// HasReturn returns a boolean if a field has been set. +func (o *Return) HasReturn() bool { + if o != nil && o.Return != nil { + return true + } + + return false } + +// SetReturn gets a reference to the given int32 and assigns it to the Return field. +func (o *Return) SetReturn(v int32) { + o.Return = &v +} + + +func (o Return) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Return != nil { + toSerialize["return"] = o.Return + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_special_model_name.go b/samples/client/petstore/go/go-petstore/model_special_model_name.go index f906e91987dc..7e940165d9b6 100644 --- a/samples/client/petstore/go/go-petstore/model_special_model_name.go +++ b/samples/client/petstore/go/go-petstore/model_special_model_name.go @@ -8,7 +8,55 @@ */ package petstore +import ( + "encoding/json" +) type SpecialModelName struct { - SpecialPropertyName int64 `json:"$special[property.name],omitempty"` + SpecialPropertyName *int64 `json:"$special[property.name],omitempty"` + +} + +// GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. +func (o *SpecialModelName) GetSpecialPropertyName() int64 { + if o == nil || o.SpecialPropertyName == nil { + var ret int64 + return ret + } + return *o.SpecialPropertyName +} + +// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) { + if o == nil || o.SpecialPropertyName == nil { + var ret int64 + return ret, false + } + return *o.SpecialPropertyName, true +} + +// HasSpecialPropertyName returns a boolean if a field has been set. +func (o *SpecialModelName) HasSpecialPropertyName() bool { + if o != nil && o.SpecialPropertyName != nil { + return true + } + + return false } + +// SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field. +func (o *SpecialModelName) SetSpecialPropertyName(v int64) { + o.SpecialPropertyName = &v +} + + +func (o SpecialModelName) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.SpecialPropertyName != nil { + toSerialize["$special[property.name]"] = o.SpecialPropertyName + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_tag.go b/samples/client/petstore/go/go-petstore/model_tag.go index 37a2b63d4451..dc4053da9bde 100644 --- a/samples/client/petstore/go/go-petstore/model_tag.go +++ b/samples/client/petstore/go/go-petstore/model_tag.go @@ -8,8 +8,93 @@ */ package petstore +import ( + "encoding/json" +) type Tag struct { - Id int64 `json:"id,omitempty"` - Name string `json:"name,omitempty"` + Id *int64 `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *Tag) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Tag) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Tag) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field if non-nil, zero value otherwise. +func (o *Tag) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name } + +// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Tag) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Tag) SetName(v string) { + o.Name = &v +} + + +func (o Tag) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_type_holder_default.go b/samples/client/petstore/go/go-petstore/model_type_holder_default.go index 68e1218ec951..f1fcc93dd8ad 100644 --- a/samples/client/petstore/go/go-petstore/model_type_holder_default.go +++ b/samples/client/petstore/go/go-petstore/model_type_holder_default.go @@ -8,11 +8,223 @@ */ package petstore +import ( + "encoding/json" + "errors" +) type TypeHolderDefault struct { - StringItem string `json:"string_item"` - NumberItem float32 `json:"number_item"` - IntegerItem int32 `json:"integer_item"` - BoolItem bool `json:"bool_item"` - ArrayItem []int32 `json:"array_item"` + StringItem *string `json:"string_item,omitempty"` + + NumberItem *float32 `json:"number_item,omitempty"` + + IntegerItem *int32 `json:"integer_item,omitempty"` + + BoolItem *bool `json:"bool_item,omitempty"` + + ArrayItem *[]int32 `json:"array_item,omitempty"` + +} + +// GetStringItem returns the StringItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetStringItem() string { + if o == nil || o.StringItem == nil { + var ret string + return ret + } + return *o.StringItem +} + +// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetStringItemOk() (string, bool) { + if o == nil || o.StringItem == nil { + var ret string + return ret, false + } + return *o.StringItem, true +} + +// HasStringItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasStringItem() bool { + if o != nil && o.StringItem != nil { + return true + } + + return false +} + +// SetStringItem gets a reference to the given string and assigns it to the StringItem field. +func (o *TypeHolderDefault) SetStringItem(v string) { + o.StringItem = &v } + +// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetNumberItem() float32 { + if o == nil || o.NumberItem == nil { + var ret float32 + return ret + } + return *o.NumberItem +} + +// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool) { + if o == nil || o.NumberItem == nil { + var ret float32 + return ret, false + } + return *o.NumberItem, true +} + +// HasNumberItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasNumberItem() bool { + if o != nil && o.NumberItem != nil { + return true + } + + return false +} + +// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +func (o *TypeHolderDefault) SetNumberItem(v float32) { + o.NumberItem = &v +} + +// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetIntegerItem() int32 { + if o == nil || o.IntegerItem == nil { + var ret int32 + return ret + } + return *o.IntegerItem +} + +// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool) { + if o == nil || o.IntegerItem == nil { + var ret int32 + return ret, false + } + return *o.IntegerItem, true +} + +// HasIntegerItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasIntegerItem() bool { + if o != nil && o.IntegerItem != nil { + return true + } + + return false +} + +// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. +func (o *TypeHolderDefault) SetIntegerItem(v int32) { + o.IntegerItem = &v +} + +// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetBoolItem() bool { + if o == nil || o.BoolItem == nil { + var ret bool + return ret + } + return *o.BoolItem +} + +// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool) { + if o == nil || o.BoolItem == nil { + var ret bool + return ret, false + } + return *o.BoolItem, true +} + +// HasBoolItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasBoolItem() bool { + if o != nil && o.BoolItem != nil { + return true + } + + return false +} + +// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. +func (o *TypeHolderDefault) SetBoolItem(v bool) { + o.BoolItem = &v +} + +// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. +func (o *TypeHolderDefault) GetArrayItem() []int32 { + if o == nil || o.ArrayItem == nil { + var ret []int32 + return ret + } + return *o.ArrayItem +} + +// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool) { + if o == nil || o.ArrayItem == nil { + var ret []int32 + return ret, false + } + return *o.ArrayItem, true +} + +// HasArrayItem returns a boolean if a field has been set. +func (o *TypeHolderDefault) HasArrayItem() bool { + if o != nil && o.ArrayItem != nil { + return true + } + + return false +} + +// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. +func (o *TypeHolderDefault) SetArrayItem(v []int32) { + o.ArrayItem = &v +} + + +func (o TypeHolderDefault) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.StringItem == nil { + return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.StringItem != nil { + toSerialize["string_item"] = o.StringItem + } + if o.NumberItem == nil { + return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.NumberItem != nil { + toSerialize["number_item"] = o.NumberItem + } + if o.IntegerItem == nil { + return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.IntegerItem != nil { + toSerialize["integer_item"] = o.IntegerItem + } + if o.BoolItem == nil { + return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.BoolItem != nil { + toSerialize["bool_item"] = o.BoolItem + } + if o.ArrayItem == nil { + return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderDefault") + } + if o.ArrayItem != nil { + toSerialize["array_item"] = o.ArrayItem + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_type_holder_example.go b/samples/client/petstore/go/go-petstore/model_type_holder_example.go index e129bb6a765f..0fe346c7cd1e 100644 --- a/samples/client/petstore/go/go-petstore/model_type_holder_example.go +++ b/samples/client/petstore/go/go-petstore/model_type_holder_example.go @@ -8,11 +8,223 @@ */ package petstore +import ( + "encoding/json" + "errors" +) type TypeHolderExample struct { - StringItem string `json:"string_item"` - NumberItem float32 `json:"number_item"` - IntegerItem int32 `json:"integer_item"` - BoolItem bool `json:"bool_item"` - ArrayItem []int32 `json:"array_item"` + StringItem *string `json:"string_item,omitempty"` + + NumberItem *float32 `json:"number_item,omitempty"` + + IntegerItem *int32 `json:"integer_item,omitempty"` + + BoolItem *bool `json:"bool_item,omitempty"` + + ArrayItem *[]int32 `json:"array_item,omitempty"` + +} + +// GetStringItem returns the StringItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetStringItem() string { + if o == nil || o.StringItem == nil { + var ret string + return ret + } + return *o.StringItem +} + +// GetStringItemOk returns a tuple with the StringItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetStringItemOk() (string, bool) { + if o == nil || o.StringItem == nil { + var ret string + return ret, false + } + return *o.StringItem, true +} + +// HasStringItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasStringItem() bool { + if o != nil && o.StringItem != nil { + return true + } + + return false +} + +// SetStringItem gets a reference to the given string and assigns it to the StringItem field. +func (o *TypeHolderExample) SetStringItem(v string) { + o.StringItem = &v } + +// GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetNumberItem() float32 { + if o == nil || o.NumberItem == nil { + var ret float32 + return ret + } + return *o.NumberItem +} + +// GetNumberItemOk returns a tuple with the NumberItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetNumberItemOk() (float32, bool) { + if o == nil || o.NumberItem == nil { + var ret float32 + return ret, false + } + return *o.NumberItem, true +} + +// HasNumberItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasNumberItem() bool { + if o != nil && o.NumberItem != nil { + return true + } + + return false +} + +// SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +func (o *TypeHolderExample) SetNumberItem(v float32) { + o.NumberItem = &v +} + +// GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetIntegerItem() int32 { + if o == nil || o.IntegerItem == nil { + var ret int32 + return ret + } + return *o.IntegerItem +} + +// GetIntegerItemOk returns a tuple with the IntegerItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool) { + if o == nil || o.IntegerItem == nil { + var ret int32 + return ret, false + } + return *o.IntegerItem, true +} + +// HasIntegerItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasIntegerItem() bool { + if o != nil && o.IntegerItem != nil { + return true + } + + return false +} + +// SetIntegerItem gets a reference to the given int32 and assigns it to the IntegerItem field. +func (o *TypeHolderExample) SetIntegerItem(v int32) { + o.IntegerItem = &v +} + +// GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetBoolItem() bool { + if o == nil || o.BoolItem == nil { + var ret bool + return ret + } + return *o.BoolItem +} + +// GetBoolItemOk returns a tuple with the BoolItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetBoolItemOk() (bool, bool) { + if o == nil || o.BoolItem == nil { + var ret bool + return ret, false + } + return *o.BoolItem, true +} + +// HasBoolItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasBoolItem() bool { + if o != nil && o.BoolItem != nil { + return true + } + + return false +} + +// SetBoolItem gets a reference to the given bool and assigns it to the BoolItem field. +func (o *TypeHolderExample) SetBoolItem(v bool) { + o.BoolItem = &v +} + +// GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetArrayItem() []int32 { + if o == nil || o.ArrayItem == nil { + var ret []int32 + return ret + } + return *o.ArrayItem +} + +// GetArrayItemOk returns a tuple with the ArrayItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool) { + if o == nil || o.ArrayItem == nil { + var ret []int32 + return ret, false + } + return *o.ArrayItem, true +} + +// HasArrayItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasArrayItem() bool { + if o != nil && o.ArrayItem != nil { + return true + } + + return false +} + +// SetArrayItem gets a reference to the given []int32 and assigns it to the ArrayItem field. +func (o *TypeHolderExample) SetArrayItem(v []int32) { + o.ArrayItem = &v +} + + +func (o TypeHolderExample) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.StringItem == nil { + return nil, errors.New("StringItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.StringItem != nil { + toSerialize["string_item"] = o.StringItem + } + if o.NumberItem == nil { + return nil, errors.New("NumberItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.NumberItem != nil { + toSerialize["number_item"] = o.NumberItem + } + if o.IntegerItem == nil { + return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.IntegerItem != nil { + toSerialize["integer_item"] = o.IntegerItem + } + if o.BoolItem == nil { + return nil, errors.New("BoolItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.BoolItem != nil { + toSerialize["bool_item"] = o.BoolItem + } + if o.ArrayItem == nil { + return nil, errors.New("ArrayItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.ArrayItem != nil { + toSerialize["array_item"] = o.ArrayItem + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_user.go b/samples/client/petstore/go/go-petstore/model_user.go index caff75ebc2c5..925f82d582be 100644 --- a/samples/client/petstore/go/go-petstore/model_user.go +++ b/samples/client/petstore/go/go-petstore/model_user.go @@ -8,15 +8,322 @@ */ package petstore +import ( + "encoding/json" +) type User struct { - Id int64 `json:"id,omitempty"` - Username string `json:"username,omitempty"` - FirstName string `json:"firstName,omitempty"` - LastName string `json:"lastName,omitempty"` - Email string `json:"email,omitempty"` - Password string `json:"password,omitempty"` - Phone string `json:"phone,omitempty"` + Id *int64 `json:"id,omitempty"` + + Username *string `json:"username,omitempty"` + + FirstName *string `json:"firstName,omitempty"` + + LastName *string `json:"lastName,omitempty"` + + Email *string `json:"email,omitempty"` + + Password *string `json:"password,omitempty"` + + Phone *string `json:"phone,omitempty"` + // User Status - UserStatus int32 `json:"userStatus,omitempty"` + UserStatus *int32 `json:"userStatus,omitempty"` + +} + +// GetId returns the Id field if non-nil, zero value otherwise. +func (o *User) GetId() int64 { + if o == nil || o.Id == nil { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (int64, bool) { + if o == nil || o.Id == nil { + var ret int64 + return ret, false + } + return *o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *User) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *User) SetId(v int64) { + o.Id = &v } + +// GetUsername returns the Username field if non-nil, zero value otherwise. +func (o *User) GetUsername() string { + if o == nil || o.Username == nil { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (string, bool) { + if o == nil || o.Username == nil { + var ret string + return ret, false + } + return *o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && o.Username != nil { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *User) SetUsername(v string) { + o.Username = &v +} + +// GetFirstName returns the FirstName field if non-nil, zero value otherwise. +func (o *User) GetFirstName() string { + if o == nil || o.FirstName == nil { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetFirstNameOk() (string, bool) { + if o == nil || o.FirstName == nil { + var ret string + return ret, false + } + return *o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *User) HasFirstName() bool { + if o != nil && o.FirstName != nil { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *User) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field if non-nil, zero value otherwise. +func (o *User) GetLastName() string { + if o == nil || o.LastName == nil { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastNameOk() (string, bool) { + if o == nil || o.LastName == nil { + var ret string + return ret, false + } + return *o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *User) HasLastName() bool { + if o != nil && o.LastName != nil { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *User) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field if non-nil, zero value otherwise. +func (o *User) GetEmail() string { + if o == nil || o.Email == nil { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetEmailOk() (string, bool) { + if o == nil || o.Email == nil { + var ret string + return ret, false + } + return *o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *User) HasEmail() bool { + if o != nil && o.Email != nil { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *User) SetEmail(v string) { + o.Email = &v +} + +// GetPassword returns the Password field if non-nil, zero value otherwise. +func (o *User) GetPassword() string { + if o == nil || o.Password == nil { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordOk() (string, bool) { + if o == nil || o.Password == nil { + var ret string + return ret, false + } + return *o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && o.Password != nil { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v string) { + o.Password = &v +} + +// GetPhone returns the Phone field if non-nil, zero value otherwise. +func (o *User) GetPhone() string { + if o == nil || o.Phone == nil { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPhoneOk() (string, bool) { + if o == nil || o.Phone == nil { + var ret string + return ret, false + } + return *o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *User) HasPhone() bool { + if o != nil && o.Phone != nil { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *User) SetPhone(v string) { + o.Phone = &v +} + +// GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. +func (o *User) GetUserStatus() int32 { + if o == nil || o.UserStatus == nil { + var ret int32 + return ret + } + return *o.UserStatus +} + +// GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUserStatusOk() (int32, bool) { + if o == nil || o.UserStatus == nil { + var ret int32 + return ret, false + } + return *o.UserStatus, true +} + +// HasUserStatus returns a boolean if a field has been set. +func (o *User) HasUserStatus() bool { + if o != nil && o.UserStatus != nil { + return true + } + + return false +} + +// SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field. +func (o *User) SetUserStatus(v int32) { + o.UserStatus = &v +} + + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Username != nil { + toSerialize["username"] = o.Username + } + if o.FirstName != nil { + toSerialize["firstName"] = o.FirstName + } + if o.LastName != nil { + toSerialize["lastName"] = o.LastName + } + if o.Email != nil { + toSerialize["email"] = o.Email + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + if o.Phone != nil { + toSerialize["phone"] = o.Phone + } + if o.UserStatus != nil { + toSerialize["userStatus"] = o.UserStatus + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/model_xml_item.go b/samples/client/petstore/go/go-petstore/model_xml_item.go index a623bda5c742..2f0f8f89c47e 100644 --- a/samples/client/petstore/go/go-petstore/model_xml_item.go +++ b/samples/client/petstore/go/go-petstore/model_xml_item.go @@ -8,35 +8,1119 @@ */ package petstore +import ( + "encoding/json" +) type XmlItem struct { - AttributeString string `json:"attribute_string,omitempty"` - AttributeNumber float32 `json:"attribute_number,omitempty"` - AttributeInteger int32 `json:"attribute_integer,omitempty"` - AttributeBoolean bool `json:"attribute_boolean,omitempty"` - WrappedArray []int32 `json:"wrapped_array,omitempty"` - NameString string `json:"name_string,omitempty"` - NameNumber float32 `json:"name_number,omitempty"` - NameInteger int32 `json:"name_integer,omitempty"` - NameBoolean bool `json:"name_boolean,omitempty"` - NameArray []int32 `json:"name_array,omitempty"` - NameWrappedArray []int32 `json:"name_wrapped_array,omitempty"` - PrefixString string `json:"prefix_string,omitempty"` - PrefixNumber float32 `json:"prefix_number,omitempty"` - PrefixInteger int32 `json:"prefix_integer,omitempty"` - PrefixBoolean bool `json:"prefix_boolean,omitempty"` - PrefixArray []int32 `json:"prefix_array,omitempty"` - PrefixWrappedArray []int32 `json:"prefix_wrapped_array,omitempty"` - NamespaceString string `json:"namespace_string,omitempty"` - NamespaceNumber float32 `json:"namespace_number,omitempty"` - NamespaceInteger int32 `json:"namespace_integer,omitempty"` - NamespaceBoolean bool `json:"namespace_boolean,omitempty"` - NamespaceArray []int32 `json:"namespace_array,omitempty"` - NamespaceWrappedArray []int32 `json:"namespace_wrapped_array,omitempty"` - PrefixNsString string `json:"prefix_ns_string,omitempty"` - PrefixNsNumber float32 `json:"prefix_ns_number,omitempty"` - PrefixNsInteger int32 `json:"prefix_ns_integer,omitempty"` - PrefixNsBoolean bool `json:"prefix_ns_boolean,omitempty"` - PrefixNsArray []int32 `json:"prefix_ns_array,omitempty"` - PrefixNsWrappedArray []int32 `json:"prefix_ns_wrapped_array,omitempty"` + AttributeString *string `json:"attribute_string,omitempty"` + + AttributeNumber *float32 `json:"attribute_number,omitempty"` + + AttributeInteger *int32 `json:"attribute_integer,omitempty"` + + AttributeBoolean *bool `json:"attribute_boolean,omitempty"` + + WrappedArray *[]int32 `json:"wrapped_array,omitempty"` + + NameString *string `json:"name_string,omitempty"` + + NameNumber *float32 `json:"name_number,omitempty"` + + NameInteger *int32 `json:"name_integer,omitempty"` + + NameBoolean *bool `json:"name_boolean,omitempty"` + + NameArray *[]int32 `json:"name_array,omitempty"` + + NameWrappedArray *[]int32 `json:"name_wrapped_array,omitempty"` + + PrefixString *string `json:"prefix_string,omitempty"` + + PrefixNumber *float32 `json:"prefix_number,omitempty"` + + PrefixInteger *int32 `json:"prefix_integer,omitempty"` + + PrefixBoolean *bool `json:"prefix_boolean,omitempty"` + + PrefixArray *[]int32 `json:"prefix_array,omitempty"` + + PrefixWrappedArray *[]int32 `json:"prefix_wrapped_array,omitempty"` + + NamespaceString *string `json:"namespace_string,omitempty"` + + NamespaceNumber *float32 `json:"namespace_number,omitempty"` + + NamespaceInteger *int32 `json:"namespace_integer,omitempty"` + + NamespaceBoolean *bool `json:"namespace_boolean,omitempty"` + + NamespaceArray *[]int32 `json:"namespace_array,omitempty"` + + NamespaceWrappedArray *[]int32 `json:"namespace_wrapped_array,omitempty"` + + PrefixNsString *string `json:"prefix_ns_string,omitempty"` + + PrefixNsNumber *float32 `json:"prefix_ns_number,omitempty"` + + PrefixNsInteger *int32 `json:"prefix_ns_integer,omitempty"` + + PrefixNsBoolean *bool `json:"prefix_ns_boolean,omitempty"` + + PrefixNsArray *[]int32 `json:"prefix_ns_array,omitempty"` + + PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty"` + +} + +// GetAttributeString returns the AttributeString field if non-nil, zero value otherwise. +func (o *XmlItem) GetAttributeString() string { + if o == nil || o.AttributeString == nil { + var ret string + return ret + } + return *o.AttributeString +} + +// GetAttributeStringOk returns a tuple with the AttributeString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetAttributeStringOk() (string, bool) { + if o == nil || o.AttributeString == nil { + var ret string + return ret, false + } + return *o.AttributeString, true +} + +// HasAttributeString returns a boolean if a field has been set. +func (o *XmlItem) HasAttributeString() bool { + if o != nil && o.AttributeString != nil { + return true + } + + return false +} + +// SetAttributeString gets a reference to the given string and assigns it to the AttributeString field. +func (o *XmlItem) SetAttributeString(v string) { + o.AttributeString = &v +} + +// GetAttributeNumber returns the AttributeNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetAttributeNumber() float32 { + if o == nil || o.AttributeNumber == nil { + var ret float32 + return ret + } + return *o.AttributeNumber +} + +// GetAttributeNumberOk returns a tuple with the AttributeNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetAttributeNumberOk() (float32, bool) { + if o == nil || o.AttributeNumber == nil { + var ret float32 + return ret, false + } + return *o.AttributeNumber, true +} + +// HasAttributeNumber returns a boolean if a field has been set. +func (o *XmlItem) HasAttributeNumber() bool { + if o != nil && o.AttributeNumber != nil { + return true + } + + return false +} + +// SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field. +func (o *XmlItem) SetAttributeNumber(v float32) { + o.AttributeNumber = &v +} + +// GetAttributeInteger returns the AttributeInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetAttributeInteger() int32 { + if o == nil || o.AttributeInteger == nil { + var ret int32 + return ret + } + return *o.AttributeInteger +} + +// GetAttributeIntegerOk returns a tuple with the AttributeInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetAttributeIntegerOk() (int32, bool) { + if o == nil || o.AttributeInteger == nil { + var ret int32 + return ret, false + } + return *o.AttributeInteger, true +} + +// HasAttributeInteger returns a boolean if a field has been set. +func (o *XmlItem) HasAttributeInteger() bool { + if o != nil && o.AttributeInteger != nil { + return true + } + + return false +} + +// SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field. +func (o *XmlItem) SetAttributeInteger(v int32) { + o.AttributeInteger = &v +} + +// GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetAttributeBoolean() bool { + if o == nil || o.AttributeBoolean == nil { + var ret bool + return ret + } + return *o.AttributeBoolean +} + +// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetAttributeBooleanOk() (bool, bool) { + if o == nil || o.AttributeBoolean == nil { + var ret bool + return ret, false + } + return *o.AttributeBoolean, true +} + +// HasAttributeBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasAttributeBoolean() bool { + if o != nil && o.AttributeBoolean != nil { + return true + } + + return false +} + +// SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field. +func (o *XmlItem) SetAttributeBoolean(v bool) { + o.AttributeBoolean = &v +} + +// GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetWrappedArray() []int32 { + if o == nil || o.WrappedArray == nil { + var ret []int32 + return ret + } + return *o.WrappedArray +} + +// GetWrappedArrayOk returns a tuple with the WrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) { + if o == nil || o.WrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.WrappedArray, true +} + +// HasWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasWrappedArray() bool { + if o != nil && o.WrappedArray != nil { + return true + } + + return false +} + +// SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field. +func (o *XmlItem) SetWrappedArray(v []int32) { + o.WrappedArray = &v +} + +// GetNameString returns the NameString field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameString() string { + if o == nil || o.NameString == nil { + var ret string + return ret + } + return *o.NameString +} + +// GetNameStringOk returns a tuple with the NameString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameStringOk() (string, bool) { + if o == nil || o.NameString == nil { + var ret string + return ret, false + } + return *o.NameString, true +} + +// HasNameString returns a boolean if a field has been set. +func (o *XmlItem) HasNameString() bool { + if o != nil && o.NameString != nil { + return true + } + + return false +} + +// SetNameString gets a reference to the given string and assigns it to the NameString field. +func (o *XmlItem) SetNameString(v string) { + o.NameString = &v +} + +// GetNameNumber returns the NameNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameNumber() float32 { + if o == nil || o.NameNumber == nil { + var ret float32 + return ret + } + return *o.NameNumber +} + +// GetNameNumberOk returns a tuple with the NameNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameNumberOk() (float32, bool) { + if o == nil || o.NameNumber == nil { + var ret float32 + return ret, false + } + return *o.NameNumber, true +} + +// HasNameNumber returns a boolean if a field has been set. +func (o *XmlItem) HasNameNumber() bool { + if o != nil && o.NameNumber != nil { + return true + } + + return false +} + +// SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field. +func (o *XmlItem) SetNameNumber(v float32) { + o.NameNumber = &v +} + +// GetNameInteger returns the NameInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameInteger() int32 { + if o == nil || o.NameInteger == nil { + var ret int32 + return ret + } + return *o.NameInteger +} + +// GetNameIntegerOk returns a tuple with the NameInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameIntegerOk() (int32, bool) { + if o == nil || o.NameInteger == nil { + var ret int32 + return ret, false + } + return *o.NameInteger, true +} + +// HasNameInteger returns a boolean if a field has been set. +func (o *XmlItem) HasNameInteger() bool { + if o != nil && o.NameInteger != nil { + return true + } + + return false +} + +// SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field. +func (o *XmlItem) SetNameInteger(v int32) { + o.NameInteger = &v +} + +// GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameBoolean() bool { + if o == nil || o.NameBoolean == nil { + var ret bool + return ret + } + return *o.NameBoolean +} + +// GetNameBooleanOk returns a tuple with the NameBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameBooleanOk() (bool, bool) { + if o == nil || o.NameBoolean == nil { + var ret bool + return ret, false + } + return *o.NameBoolean, true +} + +// HasNameBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasNameBoolean() bool { + if o != nil && o.NameBoolean != nil { + return true + } + + return false +} + +// SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field. +func (o *XmlItem) SetNameBoolean(v bool) { + o.NameBoolean = &v +} + +// GetNameArray returns the NameArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameArray() []int32 { + if o == nil || o.NameArray == nil { + var ret []int32 + return ret + } + return *o.NameArray +} + +// GetNameArrayOk returns a tuple with the NameArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameArrayOk() ([]int32, bool) { + if o == nil || o.NameArray == nil { + var ret []int32 + return ret, false + } + return *o.NameArray, true +} + +// HasNameArray returns a boolean if a field has been set. +func (o *XmlItem) HasNameArray() bool { + if o != nil && o.NameArray != nil { + return true + } + + return false +} + +// SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field. +func (o *XmlItem) SetNameArray(v []int32) { + o.NameArray = &v +} + +// GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetNameWrappedArray() []int32 { + if o == nil || o.NameWrappedArray == nil { + var ret []int32 + return ret + } + return *o.NameWrappedArray +} + +// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) { + if o == nil || o.NameWrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.NameWrappedArray, true +} + +// HasNameWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasNameWrappedArray() bool { + if o != nil && o.NameWrappedArray != nil { + return true + } + + return false +} + +// SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field. +func (o *XmlItem) SetNameWrappedArray(v []int32) { + o.NameWrappedArray = &v +} + +// GetPrefixString returns the PrefixString field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixString() string { + if o == nil || o.PrefixString == nil { + var ret string + return ret + } + return *o.PrefixString +} + +// GetPrefixStringOk returns a tuple with the PrefixString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixStringOk() (string, bool) { + if o == nil || o.PrefixString == nil { + var ret string + return ret, false + } + return *o.PrefixString, true +} + +// HasPrefixString returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixString() bool { + if o != nil && o.PrefixString != nil { + return true + } + + return false +} + +// SetPrefixString gets a reference to the given string and assigns it to the PrefixString field. +func (o *XmlItem) SetPrefixString(v string) { + o.PrefixString = &v +} + +// GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNumber() float32 { + if o == nil || o.PrefixNumber == nil { + var ret float32 + return ret + } + return *o.PrefixNumber +} + +// GetPrefixNumberOk returns a tuple with the PrefixNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNumberOk() (float32, bool) { + if o == nil || o.PrefixNumber == nil { + var ret float32 + return ret, false + } + return *o.PrefixNumber, true +} + +// HasPrefixNumber returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNumber() bool { + if o != nil && o.PrefixNumber != nil { + return true + } + + return false +} + +// SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field. +func (o *XmlItem) SetPrefixNumber(v float32) { + o.PrefixNumber = &v +} + +// GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixInteger() int32 { + if o == nil || o.PrefixInteger == nil { + var ret int32 + return ret + } + return *o.PrefixInteger } + +// GetPrefixIntegerOk returns a tuple with the PrefixInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixIntegerOk() (int32, bool) { + if o == nil || o.PrefixInteger == nil { + var ret int32 + return ret, false + } + return *o.PrefixInteger, true +} + +// HasPrefixInteger returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixInteger() bool { + if o != nil && o.PrefixInteger != nil { + return true + } + + return false +} + +// SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field. +func (o *XmlItem) SetPrefixInteger(v int32) { + o.PrefixInteger = &v +} + +// GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixBoolean() bool { + if o == nil || o.PrefixBoolean == nil { + var ret bool + return ret + } + return *o.PrefixBoolean +} + +// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixBooleanOk() (bool, bool) { + if o == nil || o.PrefixBoolean == nil { + var ret bool + return ret, false + } + return *o.PrefixBoolean, true +} + +// HasPrefixBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixBoolean() bool { + if o != nil && o.PrefixBoolean != nil { + return true + } + + return false +} + +// SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field. +func (o *XmlItem) SetPrefixBoolean(v bool) { + o.PrefixBoolean = &v +} + +// GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixArray() []int32 { + if o == nil || o.PrefixArray == nil { + var ret []int32 + return ret + } + return *o.PrefixArray +} + +// GetPrefixArrayOk returns a tuple with the PrefixArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) { + if o == nil || o.PrefixArray == nil { + var ret []int32 + return ret, false + } + return *o.PrefixArray, true +} + +// HasPrefixArray returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixArray() bool { + if o != nil && o.PrefixArray != nil { + return true + } + + return false +} + +// SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field. +func (o *XmlItem) SetPrefixArray(v []int32) { + o.PrefixArray = &v +} + +// GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixWrappedArray() []int32 { + if o == nil || o.PrefixWrappedArray == nil { + var ret []int32 + return ret + } + return *o.PrefixWrappedArray +} + +// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) { + if o == nil || o.PrefixWrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.PrefixWrappedArray, true +} + +// HasPrefixWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixWrappedArray() bool { + if o != nil && o.PrefixWrappedArray != nil { + return true + } + + return false +} + +// SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field. +func (o *XmlItem) SetPrefixWrappedArray(v []int32) { + o.PrefixWrappedArray = &v +} + +// GetNamespaceString returns the NamespaceString field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceString() string { + if o == nil || o.NamespaceString == nil { + var ret string + return ret + } + return *o.NamespaceString +} + +// GetNamespaceStringOk returns a tuple with the NamespaceString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceStringOk() (string, bool) { + if o == nil || o.NamespaceString == nil { + var ret string + return ret, false + } + return *o.NamespaceString, true +} + +// HasNamespaceString returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceString() bool { + if o != nil && o.NamespaceString != nil { + return true + } + + return false +} + +// SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field. +func (o *XmlItem) SetNamespaceString(v string) { + o.NamespaceString = &v +} + +// GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceNumber() float32 { + if o == nil || o.NamespaceNumber == nil { + var ret float32 + return ret + } + return *o.NamespaceNumber +} + +// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceNumberOk() (float32, bool) { + if o == nil || o.NamespaceNumber == nil { + var ret float32 + return ret, false + } + return *o.NamespaceNumber, true +} + +// HasNamespaceNumber returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceNumber() bool { + if o != nil && o.NamespaceNumber != nil { + return true + } + + return false +} + +// SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field. +func (o *XmlItem) SetNamespaceNumber(v float32) { + o.NamespaceNumber = &v +} + +// GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceInteger() int32 { + if o == nil || o.NamespaceInteger == nil { + var ret int32 + return ret + } + return *o.NamespaceInteger +} + +// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool) { + if o == nil || o.NamespaceInteger == nil { + var ret int32 + return ret, false + } + return *o.NamespaceInteger, true +} + +// HasNamespaceInteger returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceInteger() bool { + if o != nil && o.NamespaceInteger != nil { + return true + } + + return false +} + +// SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field. +func (o *XmlItem) SetNamespaceInteger(v int32) { + o.NamespaceInteger = &v +} + +// GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceBoolean() bool { + if o == nil || o.NamespaceBoolean == nil { + var ret bool + return ret + } + return *o.NamespaceBoolean +} + +// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool) { + if o == nil || o.NamespaceBoolean == nil { + var ret bool + return ret, false + } + return *o.NamespaceBoolean, true +} + +// HasNamespaceBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceBoolean() bool { + if o != nil && o.NamespaceBoolean != nil { + return true + } + + return false +} + +// SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field. +func (o *XmlItem) SetNamespaceBoolean(v bool) { + o.NamespaceBoolean = &v +} + +// GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceArray() []int32 { + if o == nil || o.NamespaceArray == nil { + var ret []int32 + return ret + } + return *o.NamespaceArray +} + +// GetNamespaceArrayOk returns a tuple with the NamespaceArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) { + if o == nil || o.NamespaceArray == nil { + var ret []int32 + return ret, false + } + return *o.NamespaceArray, true +} + +// HasNamespaceArray returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceArray() bool { + if o != nil && o.NamespaceArray != nil { + return true + } + + return false +} + +// SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field. +func (o *XmlItem) SetNamespaceArray(v []int32) { + o.NamespaceArray = &v +} + +// GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetNamespaceWrappedArray() []int32 { + if o == nil || o.NamespaceWrappedArray == nil { + var ret []int32 + return ret + } + return *o.NamespaceWrappedArray +} + +// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { + if o == nil || o.NamespaceWrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.NamespaceWrappedArray, true +} + +// HasNamespaceWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasNamespaceWrappedArray() bool { + if o != nil && o.NamespaceWrappedArray != nil { + return true + } + + return false +} + +// SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field. +func (o *XmlItem) SetNamespaceWrappedArray(v []int32) { + o.NamespaceWrappedArray = &v +} + +// GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsString() string { + if o == nil || o.PrefixNsString == nil { + var ret string + return ret + } + return *o.PrefixNsString +} + +// GetPrefixNsStringOk returns a tuple with the PrefixNsString field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsStringOk() (string, bool) { + if o == nil || o.PrefixNsString == nil { + var ret string + return ret, false + } + return *o.PrefixNsString, true +} + +// HasPrefixNsString returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsString() bool { + if o != nil && o.PrefixNsString != nil { + return true + } + + return false +} + +// SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field. +func (o *XmlItem) SetPrefixNsString(v string) { + o.PrefixNsString = &v +} + +// GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsNumber() float32 { + if o == nil || o.PrefixNsNumber == nil { + var ret float32 + return ret + } + return *o.PrefixNsNumber +} + +// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool) { + if o == nil || o.PrefixNsNumber == nil { + var ret float32 + return ret, false + } + return *o.PrefixNsNumber, true +} + +// HasPrefixNsNumber returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsNumber() bool { + if o != nil && o.PrefixNsNumber != nil { + return true + } + + return false +} + +// SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field. +func (o *XmlItem) SetPrefixNsNumber(v float32) { + o.PrefixNsNumber = &v +} + +// GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsInteger() int32 { + if o == nil || o.PrefixNsInteger == nil { + var ret int32 + return ret + } + return *o.PrefixNsInteger +} + +// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool) { + if o == nil || o.PrefixNsInteger == nil { + var ret int32 + return ret, false + } + return *o.PrefixNsInteger, true +} + +// HasPrefixNsInteger returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsInteger() bool { + if o != nil && o.PrefixNsInteger != nil { + return true + } + + return false +} + +// SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field. +func (o *XmlItem) SetPrefixNsInteger(v int32) { + o.PrefixNsInteger = &v +} + +// GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsBoolean() bool { + if o == nil || o.PrefixNsBoolean == nil { + var ret bool + return ret + } + return *o.PrefixNsBoolean +} + +// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool) { + if o == nil || o.PrefixNsBoolean == nil { + var ret bool + return ret, false + } + return *o.PrefixNsBoolean, true +} + +// HasPrefixNsBoolean returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsBoolean() bool { + if o != nil && o.PrefixNsBoolean != nil { + return true + } + + return false +} + +// SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field. +func (o *XmlItem) SetPrefixNsBoolean(v bool) { + o.PrefixNsBoolean = &v +} + +// GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsArray() []int32 { + if o == nil || o.PrefixNsArray == nil { + var ret []int32 + return ret + } + return *o.PrefixNsArray +} + +// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) { + if o == nil || o.PrefixNsArray == nil { + var ret []int32 + return ret, false + } + return *o.PrefixNsArray, true +} + +// HasPrefixNsArray returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsArray() bool { + if o != nil && o.PrefixNsArray != nil { + return true + } + + return false +} + +// SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field. +func (o *XmlItem) SetPrefixNsArray(v []int32) { + o.PrefixNsArray = &v +} + +// GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero value otherwise. +func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { + if o == nil || o.PrefixNsWrappedArray == nil { + var ret []int32 + return ret + } + return *o.PrefixNsWrappedArray +} + +// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { + if o == nil || o.PrefixNsWrappedArray == nil { + var ret []int32 + return ret, false + } + return *o.PrefixNsWrappedArray, true +} + +// HasPrefixNsWrappedArray returns a boolean if a field has been set. +func (o *XmlItem) HasPrefixNsWrappedArray() bool { + if o != nil && o.PrefixNsWrappedArray != nil { + return true + } + + return false +} + +// SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field. +func (o *XmlItem) SetPrefixNsWrappedArray(v []int32) { + o.PrefixNsWrappedArray = &v +} + + +func (o XmlItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AttributeString != nil { + toSerialize["attribute_string"] = o.AttributeString + } + if o.AttributeNumber != nil { + toSerialize["attribute_number"] = o.AttributeNumber + } + if o.AttributeInteger != nil { + toSerialize["attribute_integer"] = o.AttributeInteger + } + if o.AttributeBoolean != nil { + toSerialize["attribute_boolean"] = o.AttributeBoolean + } + if o.WrappedArray != nil { + toSerialize["wrapped_array"] = o.WrappedArray + } + if o.NameString != nil { + toSerialize["name_string"] = o.NameString + } + if o.NameNumber != nil { + toSerialize["name_number"] = o.NameNumber + } + if o.NameInteger != nil { + toSerialize["name_integer"] = o.NameInteger + } + if o.NameBoolean != nil { + toSerialize["name_boolean"] = o.NameBoolean + } + if o.NameArray != nil { + toSerialize["name_array"] = o.NameArray + } + if o.NameWrappedArray != nil { + toSerialize["name_wrapped_array"] = o.NameWrappedArray + } + if o.PrefixString != nil { + toSerialize["prefix_string"] = o.PrefixString + } + if o.PrefixNumber != nil { + toSerialize["prefix_number"] = o.PrefixNumber + } + if o.PrefixInteger != nil { + toSerialize["prefix_integer"] = o.PrefixInteger + } + if o.PrefixBoolean != nil { + toSerialize["prefix_boolean"] = o.PrefixBoolean + } + if o.PrefixArray != nil { + toSerialize["prefix_array"] = o.PrefixArray + } + if o.PrefixWrappedArray != nil { + toSerialize["prefix_wrapped_array"] = o.PrefixWrappedArray + } + if o.NamespaceString != nil { + toSerialize["namespace_string"] = o.NamespaceString + } + if o.NamespaceNumber != nil { + toSerialize["namespace_number"] = o.NamespaceNumber + } + if o.NamespaceInteger != nil { + toSerialize["namespace_integer"] = o.NamespaceInteger + } + if o.NamespaceBoolean != nil { + toSerialize["namespace_boolean"] = o.NamespaceBoolean + } + if o.NamespaceArray != nil { + toSerialize["namespace_array"] = o.NamespaceArray + } + if o.NamespaceWrappedArray != nil { + toSerialize["namespace_wrapped_array"] = o.NamespaceWrappedArray + } + if o.PrefixNsString != nil { + toSerialize["prefix_ns_string"] = o.PrefixNsString + } + if o.PrefixNsNumber != nil { + toSerialize["prefix_ns_number"] = o.PrefixNsNumber + } + if o.PrefixNsInteger != nil { + toSerialize["prefix_ns_integer"] = o.PrefixNsInteger + } + if o.PrefixNsBoolean != nil { + toSerialize["prefix_ns_boolean"] = o.PrefixNsBoolean + } + if o.PrefixNsArray != nil { + toSerialize["prefix_ns_array"] = o.PrefixNsArray + } + if o.PrefixNsWrappedArray != nil { + toSerialize["prefix_ns_wrapped_array"] = o.PrefixNsWrappedArray + } + return json.Marshal(toSerialize) +} + + diff --git a/samples/client/petstore/go/go-petstore/utils.go b/samples/client/petstore/go/go-petstore/utils.go new file mode 100644 index 000000000000..16e082948a42 --- /dev/null +++ b/samples/client/petstore/go/go-petstore/utils.go @@ -0,0 +1,39 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * API version: 1.0.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package petstore + +import "time" + +// Bool is a helper routine that returns a pointer to given integer value. +func Bool(v bool) *bool { return &v } + +// Int is a helper routine that returns a pointer to given integer value. +func Int(v int) *int { return &v } + +// Int32 is a helper routine that returns a pointer to given integer value. +func Int32(v int32) *int32 { return &v } + +// Int64 is a helper routine that returns a pointer to given integer value. +func Int64(v int64) *int64 { return &v } + +// Float is a helper routine that returns a pointer to given float value. +func Float(v float32) *float32 { return &v } + +// Float32 is a helper routine that returns a pointer to given float value. +func Float32(v float32) *float32 { return &v } + +// Float64 is a helper routine that returns a pointer to given float value. +func Float64(v float64) *float64 { return &v } + +// String is a helper routine that returns a pointer to given string value. +func String(v string) *string { return &v } + +// Time is helper routine that returns a pointer to given Time value. +func Time(v time.Time) *time.Time { return &v } \ No newline at end of file diff --git a/samples/client/petstore/go/pet_api_test.go b/samples/client/petstore/go/pet_api_test.go index 969fab1f667a..8d88e63b7fc4 100644 --- a/samples/client/petstore/go/pet_api_test.go +++ b/samples/client/petstore/go/pet_api_test.go @@ -28,8 +28,9 @@ func TestMain(m *testing.M) { } func TestAddPet(t *testing.T) { - newPet := (sw.Pet{Id: 12830, Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "pending", Tags: []sw.Tag{sw.Tag{Id: 1, Name: "tag2"}}}) + newPet := (sw.Pet{Id: sw.Int64(12830), Name: sw.String("gopher"), + PhotoUrls: &[]string{"http://1.com", "http://2.com"}, Status: sw.String("pending"), + Tags: &[]sw.Tag{sw.Tag{Id: sw.Int64(1), Name: sw.String("tag2")}}}) r, err := client.PetApi.AddPet(context.Background(), newPet) @@ -86,8 +87,8 @@ func TestUpdatePetWithForm(t *testing.T) { t.Log(r) } - // get the pet with id 12830 from server to verify the update - isPetCorrect(t, 12830, "golang", "available") + // get the pet with id 12830 from server to verify the update + isPetCorrect(t, 12830, "golang", "available") } func TestFindPetsByTag(t *testing.T) { @@ -103,8 +104,8 @@ func TestFindPetsByTag(t *testing.T) { assert := assert.New(t) for i := 0; i < len(resp); i++ { - if resp[i].Id == 12830 { - assert.Equal(resp[i].Status, "available", "Pet status should be `pending`") + if *resp[i].Id == 12830 { + assert.Equal(*resp[i].Status, "available", "Pet status should be `pending`") found = true } } @@ -131,7 +132,7 @@ func TestFindPetsByStatus(t *testing.T) { } else { assert := assert.New(t) for i := 0; i < len(resp); i++ { - assert.Equal(resp[i].Status, "available", "Pet status should be `available`") + assert.Equal(*resp[i].Status, "available", "Pet status should be `available`") } } @@ -284,9 +285,9 @@ func isPetCorrect(t *testing.T, id int64, name string, status string) { if err != nil { t.Fatalf("Error while getting pet by id: %v", err) } else { - assert.Equal(resp.Id, int64(id), "Pet id should be equal") - assert.Equal(resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) - assert.Equal(resp.Status, status, fmt.Sprintf("Pet status should be %s", status)) + assert.Equal(*resp.Id, int64(id), "Pet id should be equal") + assert.Equal(*resp.Name, name, fmt.Sprintf("Pet name should be %s", name)) + assert.Equal(*resp.Status, status, fmt.Sprintf("Pet status should be %s", status)) //t.Log(resp) } @@ -294,4 +295,3 @@ func isPetCorrect(t *testing.T, id int64, name string, status string) { t.Log(r) } } - diff --git a/samples/client/petstore/go/store_api_test.go b/samples/client/petstore/go/store_api_test.go index 3088adf7b40d..686d555e586a 100644 --- a/samples/client/petstore/go/store_api_test.go +++ b/samples/client/petstore/go/store_api_test.go @@ -11,12 +11,12 @@ import ( func TestPlaceOrder(t *testing.T) { newOrder := sw.Order{ - Id: 0, - PetId: 0, - Quantity: 0, - ShipDate: time.Now().UTC(), - Status: "placed", - Complete: false} + Id: sw.Int64(0), + PetId: sw.Int64(0), + Quantity: sw.Int32(0), + ShipDate: sw.Time(time.Now().UTC()), + Status: sw.String("placed"), + Complete: sw.Bool(false)} _, r, err := client.StoreApi.PlaceOrder(context.Background(), newOrder) diff --git a/samples/client/petstore/go/user_api_test.go b/samples/client/petstore/go/user_api_test.go index 012c608fab6b..ef4784399dc3 100644 --- a/samples/client/petstore/go/user_api_test.go +++ b/samples/client/petstore/go/user_api_test.go @@ -11,14 +11,14 @@ import ( func TestCreateUser(t *testing.T) { newUser := sw.User{ - Id: 1000, - FirstName: "gopher", - LastName: "lang", - Username: "gopher", - Password: "lang", - Email: "lang@test.com", - Phone: "5101112222", - UserStatus: 1} + Id: sw.Int64(1000), + FirstName: sw.String("gopher"), + LastName: sw.String("lang"), + Username: sw.String("gopher"), + Password: sw.String("lang"), + Email: sw.String("lang@test.com"), + Phone: sw.String("5101112222"), + UserStatus: sw.Int32(1)} apiResponse, err := client.UserApi.CreateUser(context.Background(), newUser) @@ -34,24 +34,24 @@ func TestCreateUser(t *testing.T) { func TestCreateUsersWithArrayInput(t *testing.T) { newUsers := []sw.User{ sw.User{ - Id: int64(1001), - FirstName: "gopher1", - LastName: "lang1", - Username: "gopher1", - Password: "lang1", - Email: "lang1@test.com", - Phone: "5101112222", - UserStatus: int32(1), + Id: sw.Int64(1001), + FirstName: sw.String("gopher1"), + LastName: sw.String("lang1"), + Username: sw.String("gopher1"), + Password: sw.String("lang1"), + Email: sw.String("lang1@test.com"), + Phone: sw.String("5101112222"), + UserStatus: sw.Int32(1), }, sw.User{ - Id: int64(1002), - FirstName: "gopher2", - LastName: "lang2", - Username: "gopher2", - Password: "lang2", - Email: "lang2@test.com", - Phone: "5101112222", - UserStatus: int32(1), + Id: sw.Int64(1002), + FirstName: sw.String("gopher2"), + LastName: sw.String("lang2"), + Username: sw.String("gopher2"), + Password: sw.String("lang2"), + Email: sw.String("lang2@test.com"), + Phone: sw.String("5101112222"), + UserStatus: sw.Int32(1), }, } @@ -84,9 +84,9 @@ func TestGetUserByName(t *testing.T) { if err != nil { t.Fatalf("Error while getting user by id: %v", err) } else { - assert.Equal(resp.Id, int64(1000), "User id should be equal") - assert.Equal(resp.Username, "gopher", "User name should be gopher") - assert.Equal(resp.LastName, "lang", "Last name should be lang") + assert.Equal(*resp.Id, int64(1000), "User id should be equal") + assert.Equal(*resp.Username, "gopher", "User name should be gopher") + assert.Equal(*resp.LastName, "lang", "Last name should be lang") //t.Log(resp) } if apiResponse.StatusCode != 200 { @@ -113,14 +113,14 @@ func TestUpdateUser(t *testing.T) { assert := assert.New(t) newUser := sw.User{ - Id: 1000, - FirstName: "gopher20", - LastName: "lang20", - Username: "gopher", - Password: "lang", - Email: "lang@test.com", - Phone: "5101112222", - UserStatus: 1} + Id: sw.Int64(1000), + FirstName: sw.String("gopher20"), + LastName: sw.String("lang20"), + Username: sw.String("gopher"), + Password: sw.String("lang"), + Email: sw.String("lang@test.com"), + Phone: sw.String("5101112222"), + UserStatus: sw.Int32(1)} apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher", newUser) if err != nil { @@ -135,9 +135,9 @@ func TestUpdateUser(t *testing.T) { if err != nil { t.Fatalf("Error while getting user by id: %v", err) } else { - assert.Equal(resp.Id, int64(1000), "User id should be equal") - assert.Equal(resp.FirstName, "gopher20", "User name should be gopher") - assert.Equal(resp.Password, "lang", "User name should be the same") + assert.Equal(*resp.Id, int64(1000), "User id should be equal") + assert.Equal(*resp.FirstName, "gopher20", "User name should be gopher") + assert.Equal(*resp.Password, "lang", "User name should be the same") } }