diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java index 25cab60eba26..234256e1f324 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java @@ -151,6 +151,11 @@ public CodegenProperty fromProperty(String name, Schema p) { @Override public Map postProcessModels(Map objs) { + // The superclass determines the list of required golang imports. The actual list of imports + // depends on which types are used, some of which are changed in the code below (but then preserved + // and used through x-basetype in templates). So super.postProcessModels + // must be invoked at the beginning of this method. + objs = super.postProcessModels(objs); List> models = (List>) objs.get("models"); for (Map m : models) { @@ -162,6 +167,7 @@ public Map postProcessModels(Map objs) { } for (CodegenProperty param : model.vars) { + param.vendorExtensions.put("x-basetype", param.dataType); if (!param.isNullable || param.isMapContainer || param.isListContainer) { continue; } @@ -178,11 +184,6 @@ public Map postProcessModels(Map objs) { } } } - - // The superclass determines the list of required golang imports. The actual list of imports - // depends on which types are used, which is done in the code above. So super.postProcessModels - // must be invoked at the end of this method. - objs = super.postProcessModels(objs); return objs; } diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache index d7737fc33fbb..d1953408833d 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache @@ -3,7 +3,6 @@ package {{packageName}} {{#models}} import ( - "bytes" "encoding/json" {{#imports}} "{{import}}" @@ -30,7 +29,7 @@ const ( // {{classname}}{{#description}} {{{description}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} type {{classname}} struct { {{#vendorExtensions.x-is-one-of-interface}} - {{classname}}Interface interface { {{#discriminator}}{{propertyGetter}}() {{propertyType}}{{/discriminator}} } + {{classname}}Interface interface { {{#discriminator}}{{propertyGetter}}() {{propertyType}}{{/discriminator}} } {{/vendorExtensions.x-is-one-of-interface}} {{^vendorExtensions.x-is-one-of-interface}} {{#parent}} @@ -44,7 +43,7 @@ type {{classname}} struct { {{#description}} // {{{description}}} {{/description}} - {{name}} {{^required}}*{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` + {{name}} {{^required}}{{^isNullable}}*{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` {{/vars}} {{/vendorExtensions.x-is-one-of-interface}} } @@ -57,80 +56,160 @@ type {{classname}} struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}} { - this := {{classname}}{} + this := {{classname}}{} {{#vars}} {{#required}} - this.{{name}} = {{nameInCamelCase}} + this.{{name}} = {{nameInCamelCase}} {{/required}} {{^required}} {{#defaultValue}} {{^isContainer}} - var {{nameInCamelCase}} {{{dataType}}} = {{#isNullable}}{{{dataType}}}{Value: {{/isNullable}}{{{.}}}{{#isNullable}} }{{/isNullable}} - this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}} +{{#isNullable}} + var {{nameInCamelCase}} {{{datatypeWithEnum}}} = {{{.}}} + this.{{name}} = *New{{{dataType}}}(&{{nameInCamelCase}}) +{{/isNullable}} +{{^isNullable}} + var {{nameInCamelCase}} {{{dataType}}} = {{{.}}} + this.{{name}} = &{{nameInCamelCase}} +{{/isNullable}} {{/isContainer}} {{/defaultValue}} {{/required}} {{/vars}} - return &this + return &this } // New{{classname}}WithDefaults instantiates a new {{classname}} object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func New{{classname}}WithDefaults() *{{classname}} { - this := {{classname}}{} + this := {{classname}}{} {{#vars}} {{#defaultValue}} {{^isContainer}} - var {{nameInCamelCase}} {{{dataType}}} = {{#isNullable}}{{{dataType}}}{Value: {{/isNullable}}{{{.}}}{{#isNullable}} }{{/isNullable}} - this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}} +{{#isNullable}} +{{!we use datatypeWithEnum here, since it will represent the non-nullable name of the datatype, e.g. int64 for NullableInt64}} + var {{nameInCamelCase}} {{{datatypeWithEnum}}} = {{{.}}} + this.{{name}} = *New{{{dataType}}}(&{{nameInCamelCase}}) +{{/isNullable}} +{{^isNullable}} + var {{nameInCamelCase}} {{{dataType}}} = {{{.}}} + this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}} +{{/isNullable}} {{/isContainer}} {{/defaultValue}} {{/vars}} - return &this + return &this } {{#vars}} {{#required}} // Get{{name}} returns the {{name}} field value -func (o *{{classname}}) Get{{name}}() {{dataType}} { - if o == nil { - var ret {{dataType}} +{{#isNullable}} +// If the value is explicit nil, the zero value for {{vendorExtensions.x-basetype}} will be returned +{{/isNullable}} +func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-basetype}} { + if o == nil {{#isNullable}}{{^isContainer}}|| o.{{name}}.Get() == nil{{/isContainer}}{{/isNullable}} { + var ret {{vendorExtensions.x-basetype}} return ret } +{{#isNullable}} +{{#isContainer}} return o.{{name}} +{{/isContainer}} +{{^isContainer}} + return *o.{{name}}.Get() +{{/isContainer}} +{{/isNullable}} +{{^isNullable}} + return o.{{name}} +{{/isNullable}} +} + +// Get{{name}}Ok returns a tuple with the {{name}} field value +// and a boolean to check if the value has been set. +{{#isNullable}} +// NOTE: If the value is an explicit nil, `nil, true` will be returned +{{/isNullable}} +func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-basetype}}, bool) { + if o == nil {{#isNullable}}{{#isContainer}}|| o.{{name}} == nil{{/isContainer}}{{/isNullable}} { + return nil, false + } +{{#isNullable}} +{{#isContainer}} + return &o.{{name}}, true +{{/isContainer}} +{{^isContainer}} + return o.{{name}}.Get(), o.{{name}}.IsSet() +{{/isContainer}} +{{/isNullable}} +{{^isNullable}} + return &o.{{name}}, true +{{/isNullable}} } // Set{{name}} sets field value -func (o *{{classname}}) Set{{name}}(v {{dataType}}) { +func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-basetype}}) { +{{#isNullable}} +{{#isContainer}} + o.{{name}} = v +{{/isContainer}} +{{^isContainer}} + o.{{name}}.Set(&v) +{{/isContainer}} +{{/isNullable}} +{{^isNullable}} o.{{name}} = v +{{/isNullable}} } {{/required}} {{^required}} -// Get{{name}} returns the {{name}} field value if set, zero value otherwise. -func (o *{{classname}}) Get{{name}}() {{dataType}} { - if o == nil || o.{{name}} == nil { - var ret {{dataType}} +// Get{{name}} returns the {{name}} field value if set, zero value otherwise{{#isNullable}} (both if not set or set to explicit null){{/isNullable}}. +func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-basetype}} { + if o == nil {{^isNullable}}|| o.{{name}} == nil{{/isNullable}}{{#isNullable}}{{^isContainer}}|| o.{{name}}.Get() == nil{{/isContainer}}{{/isNullable}} { + var ret {{vendorExtensions.x-basetype}} return ret } +{{#isNullable}} +{{#isContainer}} + return o.{{name}} +{{/isContainer}} +{{^isContainer}} + return *o.{{name}}.Get() +{{/isContainer}} +{{/isNullable}} +{{^isNullable}} return *o.{{name}} +{{/isNullable}} } -// Get{{name}}Ok returns a tuple with the {{name}} field value if set, zero value otherwise +// Get{{name}}Ok returns a tuple with the {{name}} field value if set, nil 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 +{{#isNullable}} +// NOTE: If the value is an explicit nil, `nil, true` will be returned +{{/isNullable}} +func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-basetype}}, bool) { + if o == nil {{^isNullable}}|| o.{{name}} == nil{{/isNullable}}{{#isNullable}}{{#isContainer}}|| o.{{name}} == nil{{/isContainer}}{{/isNullable}} { + return nil, false } - return *o.{{name}}, true +{{#isNullable}} +{{#isContainer}} + return &o.{{name}}, true +{{/isContainer}} +{{^isContainer}} + return o.{{name}}.Get(), o.{{name}}.IsSet() +{{/isContainer}} +{{/isNullable}} +{{^isNullable}} + return o.{{name}}, true +{{/isNullable}} } // Has{{name}} returns a boolean if a field has been set. func (o *{{classname}}) Has{{name}}() bool { - if o != nil && o.{{name}} != nil { + if o != nil && {{^isNullable}}o.{{name}} != nil{{/isNullable}}{{#isNullable}}{{#isContainer}}o.{{name}} != nil{{/isContainer}}{{^isContainer}}o.{{name}}.IsSet(){{/isContainer}}{{/isNullable}} { return true } @@ -138,86 +217,161 @@ func (o *{{classname}}) Has{{name}}() bool { } // Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field. -func (o *{{classname}}) Set{{name}}(v {{dataType}}) { +func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-basetype}}) { +{{#isNullable}} +{{#isContainer}} + o.{{name}} = v +{{/isContainer}} +{{^isContainer}} + o.{{name}}.Set(&v) +{{/isContainer}} +{{/isNullable}} +{{^isNullable}} o.{{name}} = &v +{{/isNullable}} +} +{{#isNullable}} +{{^isContainer}} +// Set{{name}}Nil sets the value for {{name}} to be an explicit nil +func (o *{{classname}}) Set{{name}}Nil() { + o.{{name}}.Set(nil) } +// Unset{{name}} ensures that no value is present for {{name}}, not even an explicit nil +func (o *{{classname}}) Unset{{name}}() { + o.{{name}}.Unset() +} +{{/isContainer}} +{{/isNullable}} + {{/required}} {{/vars}} +func (o {{classname}}) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + {{#parent}} + {{^isMapModel}} + serialized{{parent}}, err{{parent}} := json.Marshal(o.{{parent}}) + if err{{parent}} != nil { + return []byte{}, err{{parent}} + } + err{{parent}} = json.Unmarshal([]byte(serialized{{parent}}), &toSerialize) + if err{{parent}} != nil { + return []byte{}, err{{parent}} + } + {{/isMapModel}} + {{/parent}} + {{#vars}} + {{! if argument is nullable, only serialize it if it is set}} + {{#isNullable}} + {{#isContainer}} + {{! support for container fields is not ideal at this point because of lack of Nullable* types}} + if o.{{name}} != nil { + toSerialize["{{baseName}}"] = o.{{name}} + } + {{/isContainer}} + {{^isContainer}} + if {{#required}}true{{/required}}{{^required}}o.{{name}}.IsSet(){{/required}} { + toSerialize["{{baseName}}"] = o.{{name}}.Get() + } + {{/isContainer}} + {{/isNullable}} + {{! if argument is not nullable, don't set it if it is nil}} + {{^isNullable}} + if {{#required}}true{{/required}}{{^required}}o.{{name}} != nil{{/required}} { + toSerialize["{{baseName}}"] = o.{{name}} + } + {{/isNullable}} + {{/vars}} + return json.Marshal(toSerialize) +} + {{/vendorExtensions.x-is-one-of-interface}} {{#vendorExtensions.x-is-one-of-interface}} -func (s *{{classname}}) MarshalJSON() ([]byte, error) { - return json.Marshal(s.{{classname}}Interface) +func (s {{classname}}) MarshalJSON() ([]byte, error) { + return json.Marshal(s.{{classname}}Interface) } func (s *{{classname}}) UnmarshalJSON(src []byte) error { - var err error - {{#discriminator}} - var unmarshaled map[string]interface{} - err = json.Unmarshal(src, &unmarshaled) - if err != nil { - return err - } - if v, ok := unmarshaled["{{discriminator.propertyBaseName}}"]; ok { - switch v { - {{#discriminator.mappedModels}} - case "{{mappingName}}": - var result *{{modelName}} = &{{modelName}}{} - err = json.Unmarshal(src, result) - if err != nil { - return err - } - s.{{classname}}Interface = result - return nil - {{/discriminator.mappedModels}} - default: - return fmt.Errorf("No oneOf model has '{{discriminator.propertyBaseName}}' equal to %s", v) - } - } else { - return fmt.Errorf("Discriminator property '{{discriminator.propertyBaseName}}' not found in unmarshaled payload: %+v", unmarshaled) - } - {{/discriminator}} - {{^discriminator}} - {{#oneOf}} - var unmarshaled{{{.}}} *{{{.}}} = &{{{.}}}{} - err = json.Unmarshal(src, unmarshaled{{{.}}}) - if err == nil { - s.{{classname}}Interface = unmarshaled{{{.}}} - return nil - } - {{/oneOf}} - return fmt.Errorf("No oneOf model could be deserialized from payload: %s", string(src)) - {{/discriminator}} + var err error + {{#discriminator}} + var unmarshaled map[string]interface{} + err = json.Unmarshal(src, &unmarshaled) + if err != nil { + return err + } + if v, ok := unmarshaled["{{discriminator.propertyBaseName}}"]; ok { + switch v { + {{#discriminator.mappedModels}} + case "{{mappingName}}": + var result *{{modelName}} = &{{modelName}}{} + err = json.Unmarshal(src, result) + if err != nil { + return err + } + s.{{classname}}Interface = result + return nil + {{/discriminator.mappedModels}} + default: + return fmt.Errorf("No oneOf model has '{{discriminator.propertyBaseName}}' equal to %s", v) + } + } else { + return fmt.Errorf("Discriminator property '{{discriminator.propertyBaseName}}' not found in unmarshaled payload: %+v", unmarshaled) + } + {{/discriminator}} + {{^discriminator}} + {{#oneOf}} + var unmarshaled{{{.}}} *{{{.}}} = &{{{.}}}{} + err = json.Unmarshal(src, unmarshaled{{{.}}}) + if err == nil { + s.{{classname}}Interface = unmarshaled{{{.}}} + return nil + } + {{/oneOf}} + return fmt.Errorf("No oneOf model could be deserialized from payload: %s", string(src)) + {{/discriminator}} } {{/vendorExtensions.x-is-one-of-interface}} {{#vendorExtensions.x-implements}} // As{{{.}}} wraps this instance of {{classname}} in {{{.}}} func (s *{{classname}}) As{{{.}}}() {{{.}}} { - return {{{.}}}{ {{{.}}}Interface: s } + return {{{.}}}{ {{{.}}}Interface: s } } {{/vendorExtensions.x-implements}} {{/isEnum}} type Nullable{{{classname}}} struct { - Value {{{classname}}} - ExplicitNull bool + value *{{{classname}}} + isSet bool +} + +func (v Nullable{{classname}}) Get() *{{classname}} { + return v.value +} + +func (v *Nullable{{classname}}) Set(val *{{classname}}) { + v.value = val + v.isSet = true +} + +func (v Nullable{{classname}}) IsSet() bool { + return v.isSet +} + +func (v *Nullable{{classname}}) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullable{{classname}}(val *{{classname}}) *Nullable{{classname}} { + return &Nullable{{classname}}{value: val, isSet: true} } func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache index d65510b0e74b..4065b6d06609 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model_doc.mustache @@ -36,37 +36,42 @@ but it doesn't guarantee that properties required by API are set {{#vars}} ### Get{{name}} -`func (o *{{classname}}) Get{{name}}() {{dataType}}` +`func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-basetype}}` Get{{name}} returns the {{name}} field if non-nil, zero value otherwise. ### Get{{name}}Ok -`func (o *{{classname}}) Get{{name}}Ok() ({{dataType}}, bool)` +`func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-basetype}}, 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. +### Set{{name}} + +`func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-basetype}})` + +Set{{name}} sets {{name}} field to given value. + +{{^required}} ### Has{{name}} `func (o *{{classname}}) Has{{name}}() bool` Has{{name}} returns a boolean if a field has been set. +{{/required}} -### Set{{name}} - -`func (o *{{classname}}) Set{{name}}(v {{dataType}})` +{{#isNullable}} +### Set{{name}}Nil -Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field. +`func (o *{{classname}}) Set{{name}}Nil(b bool)` -{{#isNullable}} -### Set{{name}}ExplicitNull + Set{{name}}Nil sets the value for {{name}} to be an explicit nil -`func (o *{{classname}}) Set{{name}}ExplicitNull(b bool)` +### Unset{{name}} +`func (o *{{classname}}) Unset{{name}}()` -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 +Unset{{name}} ensures that no value is present for {{name}}, not even an explicit nil {{/isNullable}} {{/vars}} {{#vendorExtensions.x-implements}} diff --git a/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache b/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache index 4502401b6ea4..89e00e0267be 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/utils.mustache @@ -2,14 +2,10 @@ package {{packageName}} import ( - "bytes" - "encoding/json" - "errors" - "time" + "encoding/json" + "time" ) -var ErrInvalidNullable = errors.New("nullable cannot have non-zero Value and ExplicitNull simultaneously") - // PtrBool is a helper routine that returns a pointer to given integer value. func PtrBool(v bool) *bool { return &v } @@ -35,202 +31,296 @@ func PtrString(v string) *string { return &v } func PtrTime(v time.Time) *time.Time { return &v } type NullableBool struct { - Value bool - ExplicitNull bool + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} } func (v NullableBool) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableBool) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt struct { - Value int - ExplicitNull bool + value *int + isSet bool } -func (v NullableInt) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } +func (v NullableInt) Get() *int { + return v.value } +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} -func (v *NullableInt) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} - return json.Unmarshal(src, &v.Value) +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt32 struct { - Value int32 - ExplicitNull bool + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} } func (v NullableInt32) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInt32) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt64 struct { - Value int64 - ExplicitNull bool + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} } func (v NullableInt64) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInt64) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableFloat32 struct { - Value float32 - ExplicitNull bool + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} } func (v NullableFloat32) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0.0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableFloat64 struct { - Value float64 - ExplicitNull bool + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} } func (v NullableFloat64) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0.0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableString struct { - Value string - ExplicitNull bool + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} } func (v NullableString) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != "": - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableString) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableTime struct { - Value time.Time - ExplicitNull bool + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} } func (v NullableTime) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && !v.Value.IsZero(): - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return v.Value.MarshalJSON() - } + return v.value.MarshalJSON() } func (v *NullableTime) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) -} \ No newline at end of file + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md index d88443418365..bcce58bb763e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesAnyType.md @@ -33,22 +33,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *AdditionalPropertiesAnyType) HasName() bool` +`func (o *AdditionalPropertiesAnyType) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *AdditionalPropertiesAnyType) SetName(v string)` +`func (o *AdditionalPropertiesAnyType) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/AdditionalPropertiesArray.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md index abf35273f07b..9b01a34cbbfa 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesArray.md @@ -33,22 +33,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *AdditionalPropertiesArray) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *AdditionalPropertiesArray) HasName() bool` +`func (o *AdditionalPropertiesArray) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *AdditionalPropertiesArray) SetName(v string)` +`func (o *AdditionalPropertiesArray) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md index 96c7719026b4..da3ebcea97e5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesBoolean.md @@ -33,22 +33,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *AdditionalPropertiesBoolean) HasName() bool` +`func (o *AdditionalPropertiesBoolean) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *AdditionalPropertiesBoolean) SetName(v string)` +`func (o *AdditionalPropertiesBoolean) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index e682a1bcff7a..2f6d0c688fc9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -43,22 +43,22 @@ GetMapString returns the MapString field if non-nil, zero value otherwise. ### GetMapStringOk -`func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool)` +`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 +### SetMapString -`func (o *AdditionalPropertiesClass) HasMapString() bool` +`func (o *AdditionalPropertiesClass) SetMapString(v map[string]string)` -HasMapString returns a boolean if a field has been set. +SetMapString sets MapString field to given value. -### SetMapString +### HasMapString -`func (o *AdditionalPropertiesClass) SetMapString(v map[string]string)` +`func (o *AdditionalPropertiesClass) HasMapString() bool` -SetMapString gets a reference to the given map[string]string and assigns it to the MapString field. +HasMapString returns a boolean if a field has been set. ### GetMapNumber @@ -68,22 +68,22 @@ GetMapNumber returns the MapNumber field if non-nil, zero value otherwise. ### GetMapNumberOk -`func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool)` +`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 +### SetMapNumber -`func (o *AdditionalPropertiesClass) HasMapNumber() bool` +`func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32)` -HasMapNumber returns a boolean if a field has been set. +SetMapNumber sets MapNumber field to given value. -### SetMapNumber +### HasMapNumber -`func (o *AdditionalPropertiesClass) SetMapNumber(v map[string]float32)` +`func (o *AdditionalPropertiesClass) HasMapNumber() bool` -SetMapNumber gets a reference to the given map[string]float32 and assigns it to the MapNumber field. +HasMapNumber returns a boolean if a field has been set. ### GetMapInteger @@ -93,22 +93,22 @@ GetMapInteger returns the MapInteger field if non-nil, zero value otherwise. ### GetMapIntegerOk -`func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool)` +`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 +### SetMapInteger -`func (o *AdditionalPropertiesClass) HasMapInteger() bool` +`func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32)` -HasMapInteger returns a boolean if a field has been set. +SetMapInteger sets MapInteger field to given value. -### SetMapInteger +### HasMapInteger -`func (o *AdditionalPropertiesClass) SetMapInteger(v map[string]int32)` +`func (o *AdditionalPropertiesClass) HasMapInteger() bool` -SetMapInteger gets a reference to the given map[string]int32 and assigns it to the MapInteger field. +HasMapInteger returns a boolean if a field has been set. ### GetMapBoolean @@ -118,22 +118,22 @@ GetMapBoolean returns the MapBoolean field if non-nil, zero value otherwise. ### GetMapBooleanOk -`func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool)` +`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 +### SetMapBoolean -`func (o *AdditionalPropertiesClass) HasMapBoolean() bool` +`func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool)` -HasMapBoolean returns a boolean if a field has been set. +SetMapBoolean sets MapBoolean field to given value. -### SetMapBoolean +### HasMapBoolean -`func (o *AdditionalPropertiesClass) SetMapBoolean(v map[string]bool)` +`func (o *AdditionalPropertiesClass) HasMapBoolean() bool` -SetMapBoolean gets a reference to the given map[string]bool and assigns it to the MapBoolean field. +HasMapBoolean returns a boolean if a field has been set. ### GetMapArrayInteger @@ -143,22 +143,22 @@ GetMapArrayInteger returns the MapArrayInteger field if non-nil, zero value othe ### GetMapArrayIntegerOk -`func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool)` +`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 +### SetMapArrayInteger -`func (o *AdditionalPropertiesClass) HasMapArrayInteger() bool` +`func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32)` -HasMapArrayInteger returns a boolean if a field has been set. +SetMapArrayInteger sets MapArrayInteger field to given value. -### SetMapArrayInteger +### HasMapArrayInteger -`func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32)` +`func (o *AdditionalPropertiesClass) HasMapArrayInteger() bool` -SetMapArrayInteger gets a reference to the given map[string][]int32 and assigns it to the MapArrayInteger field. +HasMapArrayInteger returns a boolean if a field has been set. ### GetMapArrayAnytype @@ -168,22 +168,22 @@ GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value othe ### GetMapArrayAnytypeOk -`func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool)` +`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 +### SetMapArrayAnytype -`func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool` +`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{})` -HasMapArrayAnytype returns a boolean if a field has been set. +SetMapArrayAnytype sets MapArrayAnytype field to given value. -### SetMapArrayAnytype +### HasMapArrayAnytype -`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{})` +`func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool` -SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field. +HasMapArrayAnytype returns a boolean if a field has been set. ### GetMapMapString @@ -193,22 +193,22 @@ GetMapMapString returns the MapMapString field if non-nil, zero value otherwise. ### GetMapMapStringOk -`func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool)` +`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 +### SetMapMapString -`func (o *AdditionalPropertiesClass) HasMapMapString() bool` +`func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]string)` -HasMapMapString returns a boolean if a field has been set. +SetMapMapString sets MapMapString field to given value. -### SetMapMapString +### HasMapMapString -`func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]string)` +`func (o *AdditionalPropertiesClass) HasMapMapString() bool` -SetMapMapString gets a reference to the given map[string]map[string]string and assigns it to the MapMapString field. +HasMapMapString returns a boolean if a field has been set. ### GetMapMapAnytype @@ -218,22 +218,22 @@ GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwis ### GetMapMapAnytypeOk -`func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool)` +`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 +### SetMapMapAnytype -`func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool` +`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{})` -HasMapMapAnytype returns a boolean if a field has been set. +SetMapMapAnytype sets MapMapAnytype field to given value. -### SetMapMapAnytype +### HasMapMapAnytype -`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{})` +`func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool` -SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field. +HasMapMapAnytype returns a boolean if a field has been set. ### GetAnytype1 @@ -243,22 +243,22 @@ GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. ### GetAnytype1Ok -`func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool)` +`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 +### SetAnytype1 -`func (o *AdditionalPropertiesClass) HasAnytype1() bool` +`func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{})` -HasAnytype1 returns a boolean if a field has been set. +SetAnytype1 sets Anytype1 field to given value. -### SetAnytype1 +### HasAnytype1 -`func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{})` +`func (o *AdditionalPropertiesClass) HasAnytype1() bool` -SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field. +HasAnytype1 returns a boolean if a field has been set. ### GetAnytype2 @@ -268,22 +268,22 @@ GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. ### GetAnytype2Ok -`func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool)` +`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 +### SetAnytype2 -`func (o *AdditionalPropertiesClass) HasAnytype2() bool` +`func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{})` -HasAnytype2 returns a boolean if a field has been set. +SetAnytype2 sets Anytype2 field to given value. -### SetAnytype2 +### HasAnytype2 -`func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{})` +`func (o *AdditionalPropertiesClass) HasAnytype2() bool` -SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field. +HasAnytype2 returns a boolean if a field has been set. ### GetAnytype3 @@ -293,22 +293,22 @@ GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. ### GetAnytype3Ok -`func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool)` +`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 +### SetAnytype3 -`func (o *AdditionalPropertiesClass) HasAnytype3() bool` +`func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{})` -HasAnytype3 returns a boolean if a field has been set. +SetAnytype3 sets Anytype3 field to given value. -### SetAnytype3 +### HasAnytype3 -`func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{})` +`func (o *AdditionalPropertiesClass) HasAnytype3() bool` -SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field. +HasAnytype3 returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md index 8ce65eab96b2..68d29ef339ab 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesInteger.md @@ -33,22 +33,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *AdditionalPropertiesInteger) HasName() bool` +`func (o *AdditionalPropertiesInteger) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *AdditionalPropertiesInteger) SetName(v string)` +`func (o *AdditionalPropertiesInteger) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md index 18f9a942e999..53fb9c858c00 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesNumber.md @@ -33,22 +33,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *AdditionalPropertiesNumber) HasName() bool` +`func (o *AdditionalPropertiesNumber) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *AdditionalPropertiesNumber) SetName(v string)` +`func (o *AdditionalPropertiesNumber) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/AdditionalPropertiesObject.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md index 0d511d3bf0e3..8444c1279418 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesObject.md @@ -33,22 +33,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *AdditionalPropertiesObject) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *AdditionalPropertiesObject) HasName() bool` +`func (o *AdditionalPropertiesObject) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *AdditionalPropertiesObject) SetName(v string)` +`func (o *AdditionalPropertiesObject) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/AdditionalPropertiesString.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md index 6533cd5f7342..6a95762122b1 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesString.md @@ -33,22 +33,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *AdditionalPropertiesString) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *AdditionalPropertiesString) HasName() bool` +`func (o *AdditionalPropertiesString) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *AdditionalPropertiesString) SetName(v string)` +`func (o *AdditionalPropertiesString) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Animal.md b/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md index 8bccff5eb4d0..dd124c1d2615 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Animal.md @@ -34,22 +34,17 @@ GetClassName returns the ClassName field if non-nil, zero value otherwise. ### GetClassNameOk -`func (o *Animal) GetClassNameOk() (string, bool)` +`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. +SetClassName sets ClassName field to given value. + ### GetColor @@ -59,22 +54,22 @@ GetColor returns the Color field if non-nil, zero value otherwise. ### GetColorOk -`func (o *Animal) GetColorOk() (string, bool)` +`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 +### SetColor -`func (o *Animal) HasColor() bool` +`func (o *Animal) SetColor(v string)` -HasColor returns a boolean if a field has been set. +SetColor sets Color field to given value. -### SetColor +### HasColor -`func (o *Animal) SetColor(v string)` +`func (o *Animal) HasColor() bool` -SetColor gets a reference to the given string and assigns it to the Color field. +HasColor returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/ApiResponse.md b/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md index aeb34407fa41..877dacb4293c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md @@ -35,22 +35,22 @@ GetCode returns the Code field if non-nil, zero value otherwise. ### GetCodeOk -`func (o *ApiResponse) GetCodeOk() (int32, bool)` +`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 +### SetCode -`func (o *ApiResponse) HasCode() bool` +`func (o *ApiResponse) SetCode(v int32)` -HasCode returns a boolean if a field has been set. +SetCode sets Code field to given value. -### SetCode +### HasCode -`func (o *ApiResponse) SetCode(v int32)` +`func (o *ApiResponse) HasCode() bool` -SetCode gets a reference to the given int32 and assigns it to the Code field. +HasCode returns a boolean if a field has been set. ### GetType @@ -60,22 +60,22 @@ GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *ApiResponse) GetTypeOk() (string, bool)` +`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 +### SetType -`func (o *ApiResponse) HasType() bool` +`func (o *ApiResponse) SetType(v string)` -HasType returns a boolean if a field has been set. +SetType sets Type field to given value. -### SetType +### HasType -`func (o *ApiResponse) SetType(v string)` +`func (o *ApiResponse) HasType() bool` -SetType gets a reference to the given string and assigns it to the Type field. +HasType returns a boolean if a field has been set. ### GetMessage @@ -85,22 +85,22 @@ GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk -`func (o *ApiResponse) GetMessageOk() (string, bool)` +`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 +### SetMessage -`func (o *ApiResponse) HasMessage() bool` +`func (o *ApiResponse) SetMessage(v string)` -HasMessage returns a boolean if a field has been set. +SetMessage sets Message field to given value. -### SetMessage +### HasMessage -`func (o *ApiResponse) SetMessage(v string)` +`func (o *ApiResponse) HasMessage() bool` -SetMessage gets a reference to the given string and assigns it to the Message field. +HasMessage returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md index 882bdf15eab4..cb46da598b12 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md @@ -33,22 +33,22 @@ GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value ot ### GetArrayArrayNumberOk -`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool)` +`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 +### SetArrayArrayNumber -`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool` +`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)` -HasArrayArrayNumber returns a boolean if a field has been set. +SetArrayArrayNumber sets ArrayArrayNumber field to given value. -### SetArrayArrayNumber +### HasArrayArrayNumber -`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)` +`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool` -SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. +HasArrayArrayNumber returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/ArrayOfNumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md index 7355a0ce13ef..f0aaaa443b37 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md @@ -33,22 +33,22 @@ GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. ### GetArrayNumberOk -`func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool)` +`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 +### SetArrayNumber -`func (o *ArrayOfNumberOnly) HasArrayNumber() bool` +`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)` -HasArrayNumber returns a boolean if a field has been set. +SetArrayNumber sets ArrayNumber field to given value. -### SetArrayNumber +### HasArrayNumber -`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)` +`func (o *ArrayOfNumberOnly) HasArrayNumber() bool` -SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. +HasArrayNumber returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/ArrayTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md index e2b623a24127..a0f8d7528c30 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md @@ -35,22 +35,22 @@ GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwis ### GetArrayOfStringOk -`func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool)` +`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 +### SetArrayOfString -`func (o *ArrayTest) HasArrayOfString() bool` +`func (o *ArrayTest) SetArrayOfString(v []string)` -HasArrayOfString returns a boolean if a field has been set. +SetArrayOfString sets ArrayOfString field to given value. -### SetArrayOfString +### HasArrayOfString -`func (o *ArrayTest) SetArrayOfString(v []string)` +`func (o *ArrayTest) HasArrayOfString() bool` -SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. +HasArrayOfString returns a boolean if a field has been set. ### GetArrayArrayOfInteger @@ -60,22 +60,22 @@ GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero va ### GetArrayArrayOfIntegerOk -`func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool)` +`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 +### SetArrayArrayOfInteger -`func (o *ArrayTest) HasArrayArrayOfInteger() bool` +`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)` -HasArrayArrayOfInteger returns a boolean if a field has been set. +SetArrayArrayOfInteger sets ArrayArrayOfInteger field to given value. -### SetArrayArrayOfInteger +### HasArrayArrayOfInteger -`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)` +`func (o *ArrayTest) HasArrayArrayOfInteger() bool` -SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. +HasArrayArrayOfInteger returns a boolean if a field has been set. ### GetArrayArrayOfModel @@ -85,22 +85,22 @@ GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value ### GetArrayArrayOfModelOk -`func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool)` +`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 +### SetArrayArrayOfModel -`func (o *ArrayTest) HasArrayArrayOfModel() bool` +`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)` -HasArrayArrayOfModel returns a boolean if a field has been set. +SetArrayArrayOfModel sets ArrayArrayOfModel field to given value. -### SetArrayArrayOfModel +### HasArrayArrayOfModel -`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)` +`func (o *ArrayTest) HasArrayArrayOfModel() bool` -SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. +HasArrayArrayOfModel returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/BigCat.md b/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md index 86ca5fd22b62..fb9db9299397 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/BigCat.md @@ -33,22 +33,22 @@ GetKind returns the Kind field if non-nil, zero value otherwise. ### GetKindOk -`func (o *BigCat) GetKindOk() (string, bool)` +`func (o *BigCat) GetKindOk() (*string, bool)` GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasKind +### SetKind -`func (o *BigCat) HasKind() bool` +`func (o *BigCat) SetKind(v string)` -HasKind returns a boolean if a field has been set. +SetKind sets Kind field to given value. -### SetKind +### HasKind -`func (o *BigCat) SetKind(v string)` +`func (o *BigCat) HasKind() bool` -SetKind gets a reference to the given string and assigns it to the Kind field. +HasKind returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/BigCatAllOf.md b/samples/client/petstore/go-experimental/go-petstore/docs/BigCatAllOf.md index bc15e3fc18fd..b237a6b2144d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/BigCatAllOf.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/BigCatAllOf.md @@ -33,22 +33,22 @@ GetKind returns the Kind field if non-nil, zero value otherwise. ### GetKindOk -`func (o *BigCatAllOf) GetKindOk() (string, bool)` +`func (o *BigCatAllOf) GetKindOk() (*string, bool)` GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasKind +### SetKind -`func (o *BigCatAllOf) HasKind() bool` +`func (o *BigCatAllOf) SetKind(v string)` -HasKind returns a boolean if a field has been set. +SetKind sets Kind field to given value. -### SetKind +### HasKind -`func (o *BigCatAllOf) SetKind(v string)` +`func (o *BigCatAllOf) HasKind() bool` -SetKind gets a reference to the given string and assigns it to the Kind field. +HasKind returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Capitalization.md b/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md index 45c74e979030..3f37bb13e001 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Capitalization.md @@ -38,22 +38,22 @@ GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. ### GetSmallCamelOk -`func (o *Capitalization) GetSmallCamelOk() (string, bool)` +`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 +### SetSmallCamel -`func (o *Capitalization) HasSmallCamel() bool` +`func (o *Capitalization) SetSmallCamel(v string)` -HasSmallCamel returns a boolean if a field has been set. +SetSmallCamel sets SmallCamel field to given value. -### SetSmallCamel +### HasSmallCamel -`func (o *Capitalization) SetSmallCamel(v string)` +`func (o *Capitalization) HasSmallCamel() bool` -SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field. +HasSmallCamel returns a boolean if a field has been set. ### GetCapitalCamel @@ -63,22 +63,22 @@ GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. ### GetCapitalCamelOk -`func (o *Capitalization) GetCapitalCamelOk() (string, bool)` +`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 +### SetCapitalCamel -`func (o *Capitalization) HasCapitalCamel() bool` +`func (o *Capitalization) SetCapitalCamel(v string)` -HasCapitalCamel returns a boolean if a field has been set. +SetCapitalCamel sets CapitalCamel field to given value. -### SetCapitalCamel +### HasCapitalCamel -`func (o *Capitalization) SetCapitalCamel(v string)` +`func (o *Capitalization) HasCapitalCamel() bool` -SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field. +HasCapitalCamel returns a boolean if a field has been set. ### GetSmallSnake @@ -88,22 +88,22 @@ GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. ### GetSmallSnakeOk -`func (o *Capitalization) GetSmallSnakeOk() (string, bool)` +`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 +### SetSmallSnake -`func (o *Capitalization) HasSmallSnake() bool` +`func (o *Capitalization) SetSmallSnake(v string)` -HasSmallSnake returns a boolean if a field has been set. +SetSmallSnake sets SmallSnake field to given value. -### SetSmallSnake +### HasSmallSnake -`func (o *Capitalization) SetSmallSnake(v string)` +`func (o *Capitalization) HasSmallSnake() bool` -SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field. +HasSmallSnake returns a boolean if a field has been set. ### GetCapitalSnake @@ -113,22 +113,22 @@ GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. ### GetCapitalSnakeOk -`func (o *Capitalization) GetCapitalSnakeOk() (string, bool)` +`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 +### SetCapitalSnake -`func (o *Capitalization) HasCapitalSnake() bool` +`func (o *Capitalization) SetCapitalSnake(v string)` -HasCapitalSnake returns a boolean if a field has been set. +SetCapitalSnake sets CapitalSnake field to given value. -### SetCapitalSnake +### HasCapitalSnake -`func (o *Capitalization) SetCapitalSnake(v string)` +`func (o *Capitalization) HasCapitalSnake() bool` -SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field. +HasCapitalSnake returns a boolean if a field has been set. ### GetSCAETHFlowPoints @@ -138,22 +138,22 @@ GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value ot ### GetSCAETHFlowPointsOk -`func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool)` +`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 +### SetSCAETHFlowPoints -`func (o *Capitalization) HasSCAETHFlowPoints() bool` +`func (o *Capitalization) SetSCAETHFlowPoints(v string)` -HasSCAETHFlowPoints returns a boolean if a field has been set. +SetSCAETHFlowPoints sets SCAETHFlowPoints field to given value. -### SetSCAETHFlowPoints +### HasSCAETHFlowPoints -`func (o *Capitalization) SetSCAETHFlowPoints(v string)` +`func (o *Capitalization) HasSCAETHFlowPoints() bool` -SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field. +HasSCAETHFlowPoints returns a boolean if a field has been set. ### GetATT_NAME @@ -163,22 +163,22 @@ GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. ### GetATT_NAMEOk -`func (o *Capitalization) GetATT_NAMEOk() (string, bool)` +`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 +### SetATT_NAME -`func (o *Capitalization) HasATT_NAME() bool` +`func (o *Capitalization) SetATT_NAME(v string)` -HasATT_NAME returns a boolean if a field has been set. +SetATT_NAME sets ATT_NAME field to given value. -### SetATT_NAME +### HasATT_NAME -`func (o *Capitalization) SetATT_NAME(v string)` +`func (o *Capitalization) HasATT_NAME() bool` -SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field. +HasATT_NAME returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Cat.md b/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md index 415cabfdce7a..9f7f4f783cb0 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Cat.md @@ -33,22 +33,22 @@ GetDeclawed returns the Declawed field if non-nil, zero value otherwise. ### GetDeclawedOk -`func (o *Cat) GetDeclawedOk() (bool, bool)` +`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 +### SetDeclawed -`func (o *Cat) HasDeclawed() bool` +`func (o *Cat) SetDeclawed(v bool)` -HasDeclawed returns a boolean if a field has been set. +SetDeclawed sets Declawed field to given value. -### SetDeclawed +### HasDeclawed -`func (o *Cat) SetDeclawed(v bool)` +`func (o *Cat) HasDeclawed() bool` -SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +HasDeclawed returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/CatAllOf.md b/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md index 62d0919f473c..be0cc6c8519a 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md @@ -33,22 +33,22 @@ GetDeclawed returns the Declawed field if non-nil, zero value otherwise. ### GetDeclawedOk -`func (o *CatAllOf) GetDeclawedOk() (bool, bool)` +`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 +### SetDeclawed -`func (o *CatAllOf) HasDeclawed() bool` +`func (o *CatAllOf) SetDeclawed(v bool)` -HasDeclawed returns a boolean if a field has been set. +SetDeclawed sets Declawed field to given value. -### SetDeclawed +### HasDeclawed -`func (o *CatAllOf) SetDeclawed(v bool)` +`func (o *CatAllOf) HasDeclawed() bool` -SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +HasDeclawed returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Category.md b/samples/client/petstore/go-experimental/go-petstore/docs/Category.md index 7f77b6cc7a20..0fa542e093ae 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Category.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Category.md @@ -34,22 +34,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Category) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *Category) HasId() bool` +`func (o *Category) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *Category) SetId(v int64)` +`func (o *Category) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetName @@ -59,22 +59,17 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Category) GetNameOk() (string, bool)` +`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. +SetName sets Name field to given value. + [[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-experimental/go-petstore/docs/ClassModel.md b/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md index 11a115ee706e..51954107bc01 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ClassModel.md @@ -33,22 +33,22 @@ GetClass returns the Class field if non-nil, zero value otherwise. ### GetClassOk -`func (o *ClassModel) GetClassOk() (string, bool)` +`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 +### SetClass -`func (o *ClassModel) HasClass() bool` +`func (o *ClassModel) SetClass(v string)` -HasClass returns a boolean if a field has been set. +SetClass sets Class field to given value. -### SetClass +### HasClass -`func (o *ClassModel) SetClass(v string)` +`func (o *ClassModel) HasClass() bool` -SetClass gets a reference to the given string and assigns it to the Class field. +HasClass returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Client.md b/samples/client/petstore/go-experimental/go-petstore/docs/Client.md index 187225fe5adc..e24e7c05be58 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Client.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Client.md @@ -33,22 +33,22 @@ GetClient returns the Client field if non-nil, zero value otherwise. ### GetClientOk -`func (o *Client) GetClientOk() (string, bool)` +`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 +### SetClient -`func (o *Client) HasClient() bool` +`func (o *Client) SetClient(v string)` -HasClient returns a boolean if a field has been set. +SetClient sets Client field to given value. -### SetClient +### HasClient -`func (o *Client) SetClient(v string)` +`func (o *Client) HasClient() bool` -SetClient gets a reference to the given string and assigns it to the Client field. +HasClient returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Dog.md b/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md index 1251c1b134fe..edf746aaf555 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Dog.md @@ -33,22 +33,22 @@ GetBreed returns the Breed field if non-nil, zero value otherwise. ### GetBreedOk -`func (o *Dog) GetBreedOk() (string, bool)` +`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 +### SetBreed -`func (o *Dog) HasBreed() bool` +`func (o *Dog) SetBreed(v string)` -HasBreed returns a boolean if a field has been set. +SetBreed sets Breed field to given value. -### SetBreed +### HasBreed -`func (o *Dog) SetBreed(v string)` +`func (o *Dog) HasBreed() bool` -SetBreed gets a reference to the given string and assigns it to the Breed field. +HasBreed returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/DogAllOf.md b/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md index 177637eeaa8c..3ed4dfa5ea21 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md @@ -33,22 +33,22 @@ GetBreed returns the Breed field if non-nil, zero value otherwise. ### GetBreedOk -`func (o *DogAllOf) GetBreedOk() (string, bool)` +`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 +### SetBreed -`func (o *DogAllOf) HasBreed() bool` +`func (o *DogAllOf) SetBreed(v string)` -HasBreed returns a boolean if a field has been set. +SetBreed sets Breed field to given value. -### SetBreed +### HasBreed -`func (o *DogAllOf) SetBreed(v string)` +`func (o *DogAllOf) HasBreed() bool` -SetBreed gets a reference to the given string and assigns it to the Breed field. +HasBreed returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/EnumArrays.md b/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md index 684a0f982b5b..28011e23f568 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md @@ -34,22 +34,22 @@ GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. ### GetJustSymbolOk -`func (o *EnumArrays) GetJustSymbolOk() (string, bool)` +`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 +### SetJustSymbol -`func (o *EnumArrays) HasJustSymbol() bool` +`func (o *EnumArrays) SetJustSymbol(v string)` -HasJustSymbol returns a boolean if a field has been set. +SetJustSymbol sets JustSymbol field to given value. -### SetJustSymbol +### HasJustSymbol -`func (o *EnumArrays) SetJustSymbol(v string)` +`func (o *EnumArrays) HasJustSymbol() bool` -SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field. +HasJustSymbol returns a boolean if a field has been set. ### GetArrayEnum @@ -59,22 +59,22 @@ GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. ### GetArrayEnumOk -`func (o *EnumArrays) GetArrayEnumOk() ([]string, bool)` +`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 +### SetArrayEnum -`func (o *EnumArrays) HasArrayEnum() bool` +`func (o *EnumArrays) SetArrayEnum(v []string)` -HasArrayEnum returns a boolean if a field has been set. +SetArrayEnum sets ArrayEnum field to given value. -### SetArrayEnum +### HasArrayEnum -`func (o *EnumArrays) SetArrayEnum(v []string)` +`func (o *EnumArrays) HasArrayEnum() bool` -SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. +HasArrayEnum returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/EnumTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md index 8eabc13126cb..7a9e5c61a594 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/EnumTest.md @@ -37,22 +37,22 @@ GetEnumString returns the EnumString field if non-nil, zero value otherwise. ### GetEnumStringOk -`func (o *EnumTest) GetEnumStringOk() (string, bool)` +`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 +### SetEnumString -`func (o *EnumTest) HasEnumString() bool` +`func (o *EnumTest) SetEnumString(v string)` -HasEnumString returns a boolean if a field has been set. +SetEnumString sets EnumString field to given value. -### SetEnumString +### HasEnumString -`func (o *EnumTest) SetEnumString(v string)` +`func (o *EnumTest) HasEnumString() bool` -SetEnumString gets a reference to the given string and assigns it to the EnumString field. +HasEnumString returns a boolean if a field has been set. ### GetEnumStringRequired @@ -62,22 +62,17 @@ GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero valu ### GetEnumStringRequiredOk -`func (o *EnumTest) GetEnumStringRequiredOk() (string, bool)` +`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. +SetEnumStringRequired sets EnumStringRequired field to given value. + ### GetEnumInteger @@ -87,22 +82,22 @@ GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. ### GetEnumIntegerOk -`func (o *EnumTest) GetEnumIntegerOk() (int32, bool)` +`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 +### SetEnumInteger -`func (o *EnumTest) HasEnumInteger() bool` +`func (o *EnumTest) SetEnumInteger(v int32)` -HasEnumInteger returns a boolean if a field has been set. +SetEnumInteger sets EnumInteger field to given value. -### SetEnumInteger +### HasEnumInteger -`func (o *EnumTest) SetEnumInteger(v int32)` +`func (o *EnumTest) HasEnumInteger() bool` -SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field. +HasEnumInteger returns a boolean if a field has been set. ### GetEnumNumber @@ -112,22 +107,22 @@ GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. ### GetEnumNumberOk -`func (o *EnumTest) GetEnumNumberOk() (float64, bool)` +`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 +### SetEnumNumber -`func (o *EnumTest) HasEnumNumber() bool` +`func (o *EnumTest) SetEnumNumber(v float64)` -HasEnumNumber returns a boolean if a field has been set. +SetEnumNumber sets EnumNumber field to given value. -### SetEnumNumber +### HasEnumNumber -`func (o *EnumTest) SetEnumNumber(v float64)` +`func (o *EnumTest) HasEnumNumber() bool` -SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field. +HasEnumNumber returns a boolean if a field has been set. ### GetOuterEnum @@ -137,22 +132,22 @@ GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. ### GetOuterEnumOk -`func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool)` +`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 +### SetOuterEnum -`func (o *EnumTest) HasOuterEnum() bool` +`func (o *EnumTest) SetOuterEnum(v OuterEnum)` -HasOuterEnum returns a boolean if a field has been set. +SetOuterEnum sets OuterEnum field to given value. -### SetOuterEnum +### HasOuterEnum -`func (o *EnumTest) SetOuterEnum(v OuterEnum)` +`func (o *EnumTest) HasOuterEnum() bool` -SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. +HasOuterEnum returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/File.md b/samples/client/petstore/go-experimental/go-petstore/docs/File.md index 507191f19b60..91fe90e06f14 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/File.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/File.md @@ -33,22 +33,22 @@ GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. ### GetSourceURIOk -`func (o *File) GetSourceURIOk() (string, bool)` +`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 +### SetSourceURI -`func (o *File) HasSourceURI() bool` +`func (o *File) SetSourceURI(v string)` -HasSourceURI returns a boolean if a field has been set. +SetSourceURI sets SourceURI field to given value. -### SetSourceURI +### HasSourceURI -`func (o *File) SetSourceURI(v string)` +`func (o *File) HasSourceURI() bool` -SetSourceURI gets a reference to the given string and assigns it to the SourceURI field. +HasSourceURI returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/FileSchemaTestClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md index 37f671ef8f87..2db8eb31902f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md @@ -34,22 +34,22 @@ GetFile returns the File field if non-nil, zero value otherwise. ### GetFileOk -`func (o *FileSchemaTestClass) GetFileOk() (File, bool)` +`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 +### SetFile -`func (o *FileSchemaTestClass) HasFile() bool` +`func (o *FileSchemaTestClass) SetFile(v File)` -HasFile returns a boolean if a field has been set. +SetFile sets File field to given value. -### SetFile +### HasFile -`func (o *FileSchemaTestClass) SetFile(v File)` +`func (o *FileSchemaTestClass) HasFile() bool` -SetFile gets a reference to the given File and assigns it to the File field. +HasFile returns a boolean if a field has been set. ### GetFiles @@ -59,22 +59,22 @@ GetFiles returns the Files field if non-nil, zero value otherwise. ### GetFilesOk -`func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool)` +`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 +### SetFiles -`func (o *FileSchemaTestClass) HasFiles() bool` +`func (o *FileSchemaTestClass) SetFiles(v []File)` -HasFiles returns a boolean if a field has been set. +SetFiles sets Files field to given value. -### SetFiles +### HasFiles -`func (o *FileSchemaTestClass) SetFiles(v []File)` +`func (o *FileSchemaTestClass) HasFiles() bool` -SetFiles gets a reference to the given []File and assigns it to the Files field. +HasFiles returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/FormatTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md index f7226cc51eb5..de43da0fcf31 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FormatTest.md @@ -46,22 +46,22 @@ GetInteger returns the Integer field if non-nil, zero value otherwise. ### GetIntegerOk -`func (o *FormatTest) GetIntegerOk() (int32, bool)` +`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 +### SetInteger -`func (o *FormatTest) HasInteger() bool` +`func (o *FormatTest) SetInteger(v int32)` -HasInteger returns a boolean if a field has been set. +SetInteger sets Integer field to given value. -### SetInteger +### HasInteger -`func (o *FormatTest) SetInteger(v int32)` +`func (o *FormatTest) HasInteger() bool` -SetInteger gets a reference to the given int32 and assigns it to the Integer field. +HasInteger returns a boolean if a field has been set. ### GetInt32 @@ -71,22 +71,22 @@ GetInt32 returns the Int32 field if non-nil, zero value otherwise. ### GetInt32Ok -`func (o *FormatTest) GetInt32Ok() (int32, bool)` +`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 +### SetInt32 -`func (o *FormatTest) HasInt32() bool` +`func (o *FormatTest) SetInt32(v int32)` -HasInt32 returns a boolean if a field has been set. +SetInt32 sets Int32 field to given value. -### SetInt32 +### HasInt32 -`func (o *FormatTest) SetInt32(v int32)` +`func (o *FormatTest) HasInt32() bool` -SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. +HasInt32 returns a boolean if a field has been set. ### GetInt64 @@ -96,22 +96,22 @@ GetInt64 returns the Int64 field if non-nil, zero value otherwise. ### GetInt64Ok -`func (o *FormatTest) GetInt64Ok() (int64, bool)` +`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 +### SetInt64 -`func (o *FormatTest) HasInt64() bool` +`func (o *FormatTest) SetInt64(v int64)` -HasInt64 returns a boolean if a field has been set. +SetInt64 sets Int64 field to given value. -### SetInt64 +### HasInt64 -`func (o *FormatTest) SetInt64(v int64)` +`func (o *FormatTest) HasInt64() bool` -SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. +HasInt64 returns a boolean if a field has been set. ### GetNumber @@ -121,22 +121,17 @@ GetNumber returns the Number field if non-nil, zero value otherwise. ### GetNumberOk -`func (o *FormatTest) GetNumberOk() (float32, bool)` +`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. +SetNumber sets Number field to given value. + ### GetFloat @@ -146,22 +141,22 @@ GetFloat returns the Float field if non-nil, zero value otherwise. ### GetFloatOk -`func (o *FormatTest) GetFloatOk() (float32, bool)` +`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 +### SetFloat -`func (o *FormatTest) HasFloat() bool` +`func (o *FormatTest) SetFloat(v float32)` -HasFloat returns a boolean if a field has been set. +SetFloat sets Float field to given value. -### SetFloat +### HasFloat -`func (o *FormatTest) SetFloat(v float32)` +`func (o *FormatTest) HasFloat() bool` -SetFloat gets a reference to the given float32 and assigns it to the Float field. +HasFloat returns a boolean if a field has been set. ### GetDouble @@ -171,22 +166,22 @@ GetDouble returns the Double field if non-nil, zero value otherwise. ### GetDoubleOk -`func (o *FormatTest) GetDoubleOk() (float64, bool)` +`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 +### SetDouble -`func (o *FormatTest) HasDouble() bool` +`func (o *FormatTest) SetDouble(v float64)` -HasDouble returns a boolean if a field has been set. +SetDouble sets Double field to given value. -### SetDouble +### HasDouble -`func (o *FormatTest) SetDouble(v float64)` +`func (o *FormatTest) HasDouble() bool` -SetDouble gets a reference to the given float64 and assigns it to the Double field. +HasDouble returns a boolean if a field has been set. ### GetString @@ -196,22 +191,22 @@ GetString returns the String field if non-nil, zero value otherwise. ### GetStringOk -`func (o *FormatTest) GetStringOk() (string, bool)` +`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 +### SetString -`func (o *FormatTest) HasString() bool` +`func (o *FormatTest) SetString(v string)` -HasString returns a boolean if a field has been set. +SetString sets String field to given value. -### SetString +### HasString -`func (o *FormatTest) SetString(v string)` +`func (o *FormatTest) HasString() bool` -SetString gets a reference to the given string and assigns it to the String field. +HasString returns a boolean if a field has been set. ### GetByte @@ -221,22 +216,17 @@ GetByte returns the Byte field if non-nil, zero value otherwise. ### GetByteOk -`func (o *FormatTest) GetByteOk() (string, bool)` +`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. +SetByte sets Byte field to given value. + ### GetBinary @@ -246,22 +236,22 @@ GetBinary returns the Binary field if non-nil, zero value otherwise. ### GetBinaryOk -`func (o *FormatTest) GetBinaryOk() (*os.File, bool)` +`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 +### SetBinary -`func (o *FormatTest) HasBinary() bool` +`func (o *FormatTest) SetBinary(v *os.File)` -HasBinary returns a boolean if a field has been set. +SetBinary sets Binary field to given value. -### SetBinary +### HasBinary -`func (o *FormatTest) SetBinary(v *os.File)` +`func (o *FormatTest) HasBinary() bool` -SetBinary gets a reference to the given *os.File and assigns it to the Binary field. +HasBinary returns a boolean if a field has been set. ### GetDate @@ -271,22 +261,17 @@ GetDate returns the Date field if non-nil, zero value otherwise. ### GetDateOk -`func (o *FormatTest) GetDateOk() (string, bool)` +`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. +SetDate sets Date field to given value. + ### GetDateTime @@ -296,22 +281,22 @@ GetDateTime returns the DateTime field if non-nil, zero value otherwise. ### GetDateTimeOk -`func (o *FormatTest) GetDateTimeOk() (time.Time, bool)` +`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 +### SetDateTime -`func (o *FormatTest) HasDateTime() bool` +`func (o *FormatTest) SetDateTime(v time.Time)` -HasDateTime returns a boolean if a field has been set. +SetDateTime sets DateTime field to given value. -### SetDateTime +### HasDateTime -`func (o *FormatTest) SetDateTime(v time.Time)` +`func (o *FormatTest) HasDateTime() bool` -SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +HasDateTime returns a boolean if a field has been set. ### GetUuid @@ -321,22 +306,22 @@ GetUuid returns the Uuid field if non-nil, zero value otherwise. ### GetUuidOk -`func (o *FormatTest) GetUuidOk() (string, bool)` +`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 +### SetUuid -`func (o *FormatTest) HasUuid() bool` +`func (o *FormatTest) SetUuid(v string)` -HasUuid returns a boolean if a field has been set. +SetUuid sets Uuid field to given value. -### SetUuid +### HasUuid -`func (o *FormatTest) SetUuid(v string)` +`func (o *FormatTest) HasUuid() bool` -SetUuid gets a reference to the given string and assigns it to the Uuid field. +HasUuid returns a boolean if a field has been set. ### GetPassword @@ -346,22 +331,17 @@ GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk -`func (o *FormatTest) GetPasswordOk() (string, bool)` +`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. +SetPassword sets Password field to given value. + ### GetBigDecimal @@ -371,22 +351,22 @@ GetBigDecimal returns the BigDecimal field if non-nil, zero value otherwise. ### GetBigDecimalOk -`func (o *FormatTest) GetBigDecimalOk() (float64, bool)` +`func (o *FormatTest) GetBigDecimalOk() (*float64, bool)` GetBigDecimalOk returns a tuple with the BigDecimal field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasBigDecimal +### SetBigDecimal -`func (o *FormatTest) HasBigDecimal() bool` +`func (o *FormatTest) SetBigDecimal(v float64)` -HasBigDecimal returns a boolean if a field has been set. +SetBigDecimal sets BigDecimal field to given value. -### SetBigDecimal +### HasBigDecimal -`func (o *FormatTest) SetBigDecimal(v float64)` +`func (o *FormatTest) HasBigDecimal() bool` -SetBigDecimal gets a reference to the given float64 and assigns it to the BigDecimal field. +HasBigDecimal returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/HasOnlyReadOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md index 84d8266d59f7..7f54d772840e 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md @@ -34,22 +34,22 @@ GetBar returns the Bar field if non-nil, zero value otherwise. ### GetBarOk -`func (o *HasOnlyReadOnly) GetBarOk() (string, bool)` +`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 +### SetBar -`func (o *HasOnlyReadOnly) HasBar() bool` +`func (o *HasOnlyReadOnly) SetBar(v string)` -HasBar returns a boolean if a field has been set. +SetBar sets Bar field to given value. -### SetBar +### HasBar -`func (o *HasOnlyReadOnly) SetBar(v string)` +`func (o *HasOnlyReadOnly) HasBar() bool` -SetBar gets a reference to the given string and assigns it to the Bar field. +HasBar returns a boolean if a field has been set. ### GetFoo @@ -59,22 +59,22 @@ GetFoo returns the Foo field if non-nil, zero value otherwise. ### GetFooOk -`func (o *HasOnlyReadOnly) GetFooOk() (string, bool)` +`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 +### SetFoo -`func (o *HasOnlyReadOnly) HasFoo() bool` +`func (o *HasOnlyReadOnly) SetFoo(v string)` -HasFoo returns a boolean if a field has been set. +SetFoo sets Foo field to given value. -### SetFoo +### HasFoo -`func (o *HasOnlyReadOnly) SetFoo(v string)` +`func (o *HasOnlyReadOnly) HasFoo() bool` -SetFoo gets a reference to the given string and assigns it to the Foo field. +HasFoo returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/List.md b/samples/client/petstore/go-experimental/go-petstore/docs/List.md index 4d914555e33b..271c8236a8bc 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/List.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/List.md @@ -33,22 +33,22 @@ GetVar123List returns the Var123List field if non-nil, zero value otherwise. ### GetVar123ListOk -`func (o *List) GetVar123ListOk() (string, bool)` +`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 +### SetVar123List -`func (o *List) HasVar123List() bool` +`func (o *List) SetVar123List(v string)` -HasVar123List returns a boolean if a field has been set. +SetVar123List sets Var123List field to given value. -### SetVar123List +### HasVar123List -`func (o *List) SetVar123List(v string)` +`func (o *List) HasVar123List() bool` -SetVar123List gets a reference to the given string and assigns it to the Var123List field. +HasVar123List returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/MapTest.md b/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md index c752f6e86b57..6b35263c4e38 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/MapTest.md @@ -36,22 +36,22 @@ GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherw ### GetMapMapOfStringOk -`func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool)` +`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 +### SetMapMapOfString -`func (o *MapTest) HasMapMapOfString() bool` +`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)` -HasMapMapOfString returns a boolean if a field has been set. +SetMapMapOfString sets MapMapOfString field to given value. -### SetMapMapOfString +### HasMapMapOfString -`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)` +`func (o *MapTest) HasMapMapOfString() bool` -SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field. +HasMapMapOfString returns a boolean if a field has been set. ### GetMapOfEnumString @@ -61,22 +61,22 @@ GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value othe ### GetMapOfEnumStringOk -`func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool)` +`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 +### SetMapOfEnumString -`func (o *MapTest) HasMapOfEnumString() bool` +`func (o *MapTest) SetMapOfEnumString(v map[string]string)` -HasMapOfEnumString returns a boolean if a field has been set. +SetMapOfEnumString sets MapOfEnumString field to given value. -### SetMapOfEnumString +### HasMapOfEnumString -`func (o *MapTest) SetMapOfEnumString(v map[string]string)` +`func (o *MapTest) HasMapOfEnumString() bool` -SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field. +HasMapOfEnumString returns a boolean if a field has been set. ### GetDirectMap @@ -86,22 +86,22 @@ GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. ### GetDirectMapOk -`func (o *MapTest) GetDirectMapOk() (map[string]bool, bool)` +`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 +### SetDirectMap -`func (o *MapTest) HasDirectMap() bool` +`func (o *MapTest) SetDirectMap(v map[string]bool)` -HasDirectMap returns a boolean if a field has been set. +SetDirectMap sets DirectMap field to given value. -### SetDirectMap +### HasDirectMap -`func (o *MapTest) SetDirectMap(v map[string]bool)` +`func (o *MapTest) HasDirectMap() bool` -SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field. +HasDirectMap returns a boolean if a field has been set. ### GetIndirectMap @@ -111,22 +111,22 @@ GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. ### GetIndirectMapOk -`func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool)` +`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 +### SetIndirectMap -`func (o *MapTest) HasIndirectMap() bool` +`func (o *MapTest) SetIndirectMap(v map[string]bool)` -HasIndirectMap returns a boolean if a field has been set. +SetIndirectMap sets IndirectMap field to given value. -### SetIndirectMap +### HasIndirectMap -`func (o *MapTest) SetIndirectMap(v map[string]bool)` +`func (o *MapTest) HasIndirectMap() bool` -SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field. +HasIndirectMap returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 2a1eb5eaba3e..f726ffe63e13 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -35,22 +35,22 @@ GetUuid returns the Uuid field if non-nil, zero value otherwise. ### GetUuidOk -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)` +`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 +### SetUuid -`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` -HasUuid returns a boolean if a field has been set. +SetUuid sets Uuid field to given value. -### SetUuid +### HasUuid -`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` -SetUuid gets a reference to the given string and assigns it to the Uuid field. +HasUuid returns a boolean if a field has been set. ### GetDateTime @@ -60,22 +60,22 @@ GetDateTime returns the DateTime field if non-nil, zero value otherwise. ### GetDateTimeOk -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool)` +`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 +### SetDateTime -`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)` -HasDateTime returns a boolean if a field has been set. +SetDateTime sets DateTime field to given value. -### SetDateTime +### HasDateTime -`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool` -SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +HasDateTime returns a boolean if a field has been set. ### GetMap @@ -85,22 +85,22 @@ GetMap returns the Map field if non-nil, zero value otherwise. ### GetMapOk -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool)` +`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 +### SetMap -`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)` -HasMap returns a boolean if a field has been set. +SetMap sets Map field to given value. -### SetMap +### HasMap -`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool` -SetMap gets a reference to the given map[string]Animal and assigns it to the Map field. +HasMap returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Model200Response.md b/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md index 00bce3a9909d..4e0d89fe88f9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Model200Response.md @@ -34,22 +34,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Model200Response) GetNameOk() (int32, bool)` +`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 +### SetName -`func (o *Model200Response) HasName() bool` +`func (o *Model200Response) SetName(v int32)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *Model200Response) SetName(v int32)` +`func (o *Model200Response) HasName() bool` -SetName gets a reference to the given int32 and assigns it to the Name field. +HasName returns a boolean if a field has been set. ### GetClass @@ -59,22 +59,22 @@ GetClass returns the Class field if non-nil, zero value otherwise. ### GetClassOk -`func (o *Model200Response) GetClassOk() (string, bool)` +`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 +### SetClass -`func (o *Model200Response) HasClass() bool` +`func (o *Model200Response) SetClass(v string)` -HasClass returns a boolean if a field has been set. +SetClass sets Class field to given value. -### SetClass +### HasClass -`func (o *Model200Response) SetClass(v string)` +`func (o *Model200Response) HasClass() bool` -SetClass gets a reference to the given string and assigns it to the Class field. +HasClass returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Name.md b/samples/client/petstore/go-experimental/go-petstore/docs/Name.md index cbcab3667614..52fb687af7be 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Name.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Name.md @@ -36,22 +36,17 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Name) GetNameOk() (int32, bool)` +`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. +SetName sets Name field to given value. + ### GetSnakeCase @@ -61,22 +56,22 @@ GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. ### GetSnakeCaseOk -`func (o *Name) GetSnakeCaseOk() (int32, bool)` +`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 +### SetSnakeCase -`func (o *Name) HasSnakeCase() bool` +`func (o *Name) SetSnakeCase(v int32)` -HasSnakeCase returns a boolean if a field has been set. +SetSnakeCase sets SnakeCase field to given value. -### SetSnakeCase +### HasSnakeCase -`func (o *Name) SetSnakeCase(v int32)` +`func (o *Name) HasSnakeCase() bool` -SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field. +HasSnakeCase returns a boolean if a field has been set. ### GetProperty @@ -86,22 +81,22 @@ GetProperty returns the Property field if non-nil, zero value otherwise. ### GetPropertyOk -`func (o *Name) GetPropertyOk() (string, bool)` +`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 +### SetProperty -`func (o *Name) HasProperty() bool` +`func (o *Name) SetProperty(v string)` -HasProperty returns a boolean if a field has been set. +SetProperty sets Property field to given value. -### SetProperty +### HasProperty -`func (o *Name) SetProperty(v string)` +`func (o *Name) HasProperty() bool` -SetProperty gets a reference to the given string and assigns it to the Property field. +HasProperty returns a boolean if a field has been set. ### GetVar123Number @@ -111,22 +106,22 @@ GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. ### GetVar123NumberOk -`func (o *Name) GetVar123NumberOk() (int32, bool)` +`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 +### SetVar123Number -`func (o *Name) HasVar123Number() bool` +`func (o *Name) SetVar123Number(v int32)` -HasVar123Number returns a boolean if a field has been set. +SetVar123Number sets Var123Number field to given value. -### SetVar123Number +### HasVar123Number -`func (o *Name) SetVar123Number(v int32)` +`func (o *Name) HasVar123Number() bool` -SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field. +HasVar123Number returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/NumberOnly.md b/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md index 2a30b0b12836..81941828b623 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md @@ -33,22 +33,22 @@ GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. ### GetJustNumberOk -`func (o *NumberOnly) GetJustNumberOk() (float32, bool)` +`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 +### SetJustNumber -`func (o *NumberOnly) HasJustNumber() bool` +`func (o *NumberOnly) SetJustNumber(v float32)` -HasJustNumber returns a boolean if a field has been set. +SetJustNumber sets JustNumber field to given value. -### SetJustNumber +### HasJustNumber -`func (o *NumberOnly) SetJustNumber(v float32)` +`func (o *NumberOnly) HasJustNumber() bool` -SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field. +HasJustNumber returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Order.md b/samples/client/petstore/go-experimental/go-petstore/docs/Order.md index 71bb824a6cac..78cace2f229d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Order.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Order.md @@ -38,22 +38,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Order) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *Order) HasId() bool` +`func (o *Order) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *Order) SetId(v int64)` +`func (o *Order) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetPetId @@ -63,22 +63,22 @@ GetPetId returns the PetId field if non-nil, zero value otherwise. ### GetPetIdOk -`func (o *Order) GetPetIdOk() (int64, bool)` +`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 +### SetPetId -`func (o *Order) HasPetId() bool` +`func (o *Order) SetPetId(v int64)` -HasPetId returns a boolean if a field has been set. +SetPetId sets PetId field to given value. -### SetPetId +### HasPetId -`func (o *Order) SetPetId(v int64)` +`func (o *Order) HasPetId() bool` -SetPetId gets a reference to the given int64 and assigns it to the PetId field. +HasPetId returns a boolean if a field has been set. ### GetQuantity @@ -88,22 +88,22 @@ GetQuantity returns the Quantity field if non-nil, zero value otherwise. ### GetQuantityOk -`func (o *Order) GetQuantityOk() (int32, bool)` +`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 +### SetQuantity -`func (o *Order) HasQuantity() bool` +`func (o *Order) SetQuantity(v int32)` -HasQuantity returns a boolean if a field has been set. +SetQuantity sets Quantity field to given value. -### SetQuantity +### HasQuantity -`func (o *Order) SetQuantity(v int32)` +`func (o *Order) HasQuantity() bool` -SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. +HasQuantity returns a boolean if a field has been set. ### GetShipDate @@ -113,22 +113,22 @@ GetShipDate returns the ShipDate field if non-nil, zero value otherwise. ### GetShipDateOk -`func (o *Order) GetShipDateOk() (time.Time, bool)` +`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 +### SetShipDate -`func (o *Order) HasShipDate() bool` +`func (o *Order) SetShipDate(v time.Time)` -HasShipDate returns a boolean if a field has been set. +SetShipDate sets ShipDate field to given value. -### SetShipDate +### HasShipDate -`func (o *Order) SetShipDate(v time.Time)` +`func (o *Order) HasShipDate() bool` -SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field. +HasShipDate returns a boolean if a field has been set. ### GetStatus @@ -138,22 +138,22 @@ GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *Order) GetStatusOk() (string, bool)` +`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 +### SetStatus -`func (o *Order) HasStatus() bool` +`func (o *Order) SetStatus(v string)` -HasStatus returns a boolean if a field has been set. +SetStatus sets Status field to given value. -### SetStatus +### HasStatus -`func (o *Order) SetStatus(v string)` +`func (o *Order) HasStatus() bool` -SetStatus gets a reference to the given string and assigns it to the Status field. +HasStatus returns a boolean if a field has been set. ### GetComplete @@ -163,22 +163,22 @@ GetComplete returns the Complete field if non-nil, zero value otherwise. ### GetCompleteOk -`func (o *Order) GetCompleteOk() (bool, bool)` +`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 +### SetComplete -`func (o *Order) HasComplete() bool` +`func (o *Order) SetComplete(v bool)` -HasComplete returns a boolean if a field has been set. +SetComplete sets Complete field to given value. -### SetComplete +### HasComplete -`func (o *Order) SetComplete(v bool)` +`func (o *Order) HasComplete() bool` -SetComplete gets a reference to the given bool and assigns it to the Complete field. +HasComplete returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/OuterComposite.md b/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md index e91d7b978aeb..1ebf86c0a2ee 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md @@ -35,22 +35,22 @@ GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. ### GetMyNumberOk -`func (o *OuterComposite) GetMyNumberOk() (float32, bool)` +`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 +### SetMyNumber -`func (o *OuterComposite) HasMyNumber() bool` +`func (o *OuterComposite) SetMyNumber(v float32)` -HasMyNumber returns a boolean if a field has been set. +SetMyNumber sets MyNumber field to given value. -### SetMyNumber +### HasMyNumber -`func (o *OuterComposite) SetMyNumber(v float32)` +`func (o *OuterComposite) HasMyNumber() bool` -SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field. +HasMyNumber returns a boolean if a field has been set. ### GetMyString @@ -60,22 +60,22 @@ GetMyString returns the MyString field if non-nil, zero value otherwise. ### GetMyStringOk -`func (o *OuterComposite) GetMyStringOk() (string, bool)` +`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 +### SetMyString -`func (o *OuterComposite) HasMyString() bool` +`func (o *OuterComposite) SetMyString(v string)` -HasMyString returns a boolean if a field has been set. +SetMyString sets MyString field to given value. -### SetMyString +### HasMyString -`func (o *OuterComposite) SetMyString(v string)` +`func (o *OuterComposite) HasMyString() bool` -SetMyString gets a reference to the given string and assigns it to the MyString field. +HasMyString returns a boolean if a field has been set. ### GetMyBoolean @@ -85,22 +85,22 @@ GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. ### GetMyBooleanOk -`func (o *OuterComposite) GetMyBooleanOk() (bool, bool)` +`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 +### SetMyBoolean -`func (o *OuterComposite) HasMyBoolean() bool` +`func (o *OuterComposite) SetMyBoolean(v bool)` -HasMyBoolean returns a boolean if a field has been set. +SetMyBoolean sets MyBoolean field to given value. -### SetMyBoolean +### HasMyBoolean -`func (o *OuterComposite) SetMyBoolean(v bool)` +`func (o *OuterComposite) HasMyBoolean() bool` -SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field. +HasMyBoolean returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Pet.md b/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md index faa1e31e8701..6b4776422396 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Pet.md @@ -38,22 +38,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Pet) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *Pet) HasId() bool` +`func (o *Pet) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *Pet) SetId(v int64)` +`func (o *Pet) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetCategory @@ -63,22 +63,22 @@ GetCategory returns the Category field if non-nil, zero value otherwise. ### GetCategoryOk -`func (o *Pet) GetCategoryOk() (Category, bool)` +`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 +### SetCategory -`func (o *Pet) HasCategory() bool` +`func (o *Pet) SetCategory(v Category)` -HasCategory returns a boolean if a field has been set. +SetCategory sets Category field to given value. -### SetCategory +### HasCategory -`func (o *Pet) SetCategory(v Category)` +`func (o *Pet) HasCategory() bool` -SetCategory gets a reference to the given Category and assigns it to the Category field. +HasCategory returns a boolean if a field has been set. ### GetName @@ -88,22 +88,17 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Pet) GetNameOk() (string, bool)` +`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. +SetName sets Name field to given value. + ### GetPhotoUrls @@ -113,22 +108,17 @@ GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. ### GetPhotoUrlsOk -`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)` +`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. +SetPhotoUrls sets PhotoUrls field to given value. + ### GetTags @@ -138,22 +128,22 @@ GetTags returns the Tags field if non-nil, zero value otherwise. ### GetTagsOk -`func (o *Pet) GetTagsOk() ([]Tag, bool)` +`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 +### SetTags -`func (o *Pet) HasTags() bool` +`func (o *Pet) SetTags(v []Tag)` -HasTags returns a boolean if a field has been set. +SetTags sets Tags field to given value. -### SetTags +### HasTags -`func (o *Pet) SetTags(v []Tag)` +`func (o *Pet) HasTags() bool` -SetTags gets a reference to the given []Tag and assigns it to the Tags field. +HasTags returns a boolean if a field has been set. ### GetStatus @@ -163,22 +153,22 @@ GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *Pet) GetStatusOk() (string, bool)` +`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 +### SetStatus -`func (o *Pet) HasStatus() bool` +`func (o *Pet) SetStatus(v string)` -HasStatus returns a boolean if a field has been set. +SetStatus sets Status field to given value. -### SetStatus +### HasStatus -`func (o *Pet) SetStatus(v string)` +`func (o *Pet) HasStatus() bool` -SetStatus gets a reference to the given string and assigns it to the Status field. +HasStatus returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/ReadOnlyFirst.md b/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md index c0ee88a70367..2e25d6d230eb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md @@ -34,22 +34,22 @@ GetBar returns the Bar field if non-nil, zero value otherwise. ### GetBarOk -`func (o *ReadOnlyFirst) GetBarOk() (string, bool)` +`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 +### SetBar -`func (o *ReadOnlyFirst) HasBar() bool` +`func (o *ReadOnlyFirst) SetBar(v string)` -HasBar returns a boolean if a field has been set. +SetBar sets Bar field to given value. -### SetBar +### HasBar -`func (o *ReadOnlyFirst) SetBar(v string)` +`func (o *ReadOnlyFirst) HasBar() bool` -SetBar gets a reference to the given string and assigns it to the Bar field. +HasBar returns a boolean if a field has been set. ### GetBaz @@ -59,22 +59,22 @@ GetBaz returns the Baz field if non-nil, zero value otherwise. ### GetBazOk -`func (o *ReadOnlyFirst) GetBazOk() (string, bool)` +`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 +### SetBaz -`func (o *ReadOnlyFirst) HasBaz() bool` +`func (o *ReadOnlyFirst) SetBaz(v string)` -HasBaz returns a boolean if a field has been set. +SetBaz sets Baz field to given value. -### SetBaz +### HasBaz -`func (o *ReadOnlyFirst) SetBaz(v string)` +`func (o *ReadOnlyFirst) HasBaz() bool` -SetBaz gets a reference to the given string and assigns it to the Baz field. +HasBaz returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Return.md b/samples/client/petstore/go-experimental/go-petstore/docs/Return.md index 1437ef84e525..d6be5a42f31b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Return.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Return.md @@ -33,22 +33,22 @@ GetReturn returns the Return field if non-nil, zero value otherwise. ### GetReturnOk -`func (o *Return) GetReturnOk() (int32, bool)` +`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 +### SetReturn -`func (o *Return) HasReturn() bool` +`func (o *Return) SetReturn(v int32)` -HasReturn returns a boolean if a field has been set. +SetReturn sets Return field to given value. -### SetReturn +### HasReturn -`func (o *Return) SetReturn(v int32)` +`func (o *Return) HasReturn() bool` -SetReturn gets a reference to the given int32 and assigns it to the Return field. +HasReturn returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/SpecialModelName.md b/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md index c273842c32b8..3e5a187c1d10 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md @@ -33,22 +33,22 @@ GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero va ### GetSpecialPropertyNameOk -`func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool)` +`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 +### SetSpecialPropertyName -`func (o *SpecialModelName) HasSpecialPropertyName() bool` +`func (o *SpecialModelName) SetSpecialPropertyName(v int64)` -HasSpecialPropertyName returns a boolean if a field has been set. +SetSpecialPropertyName sets SpecialPropertyName field to given value. -### SetSpecialPropertyName +### HasSpecialPropertyName -`func (o *SpecialModelName) SetSpecialPropertyName(v int64)` +`func (o *SpecialModelName) HasSpecialPropertyName() bool` -SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field. +HasSpecialPropertyName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/Tag.md b/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md index 84b8770dac0f..391be6b49009 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/Tag.md @@ -34,22 +34,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Tag) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *Tag) HasId() bool` +`func (o *Tag) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *Tag) SetId(v int64)` +`func (o *Tag) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetName @@ -59,22 +59,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Tag) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *Tag) HasName() bool` +`func (o *Tag) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *Tag) SetName(v string)` +`func (o *Tag) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/TypeHolderDefault.md b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md index e75e6b96ae6d..726e9723fc3c 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderDefault.md @@ -37,22 +37,17 @@ GetStringItem returns the StringItem field if non-nil, zero value otherwise. ### GetStringItemOk -`func (o *TypeHolderDefault) GetStringItemOk() (string, bool)` +`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. +SetStringItem sets StringItem field to given value. + ### GetNumberItem @@ -62,22 +57,17 @@ GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. ### GetNumberItemOk -`func (o *TypeHolderDefault) GetNumberItemOk() (float32, bool)` +`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. +SetNumberItem sets NumberItem field to given value. + ### GetIntegerItem @@ -87,22 +77,17 @@ GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. ### GetIntegerItemOk -`func (o *TypeHolderDefault) GetIntegerItemOk() (int32, bool)` +`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. +SetIntegerItem sets IntegerItem field to given value. + ### GetBoolItem @@ -112,22 +97,17 @@ GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. ### GetBoolItemOk -`func (o *TypeHolderDefault) GetBoolItemOk() (bool, bool)` +`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. +SetBoolItem sets BoolItem field to given value. + ### GetArrayItem @@ -137,22 +117,17 @@ GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. ### GetArrayItemOk -`func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool)` +`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. +SetArrayItem sets ArrayItem field to given value. + [[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-experimental/go-petstore/docs/TypeHolderExample.md b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md index 1c19f186fc78..c6da08c1d253 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md @@ -38,22 +38,17 @@ GetStringItem returns the StringItem field if non-nil, zero value otherwise. ### GetStringItemOk -`func (o *TypeHolderExample) GetStringItemOk() (string, bool)` +`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. +SetStringItem sets StringItem field to given value. + ### GetNumberItem @@ -63,22 +58,17 @@ GetNumberItem returns the NumberItem field if non-nil, zero value otherwise. ### GetNumberItemOk -`func (o *TypeHolderExample) GetNumberItemOk() (float32, bool)` +`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. +SetNumberItem sets NumberItem field to given value. + ### GetFloatItem @@ -88,22 +78,17 @@ GetFloatItem returns the FloatItem field if non-nil, zero value otherwise. ### GetFloatItemOk -`func (o *TypeHolderExample) GetFloatItemOk() (float32, bool)` +`func (o *TypeHolderExample) GetFloatItemOk() (*float32, bool)` GetFloatItemOk returns a tuple with the FloatItem field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasFloatItem - -`func (o *TypeHolderExample) HasFloatItem() bool` - -HasFloatItem returns a boolean if a field has been set. - ### SetFloatItem `func (o *TypeHolderExample) SetFloatItem(v float32)` -SetFloatItem gets a reference to the given float32 and assigns it to the FloatItem field. +SetFloatItem sets FloatItem field to given value. + ### GetIntegerItem @@ -113,22 +98,17 @@ GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. ### GetIntegerItemOk -`func (o *TypeHolderExample) GetIntegerItemOk() (int32, bool)` +`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. +SetIntegerItem sets IntegerItem field to given value. + ### GetBoolItem @@ -138,22 +118,17 @@ GetBoolItem returns the BoolItem field if non-nil, zero value otherwise. ### GetBoolItemOk -`func (o *TypeHolderExample) GetBoolItemOk() (bool, bool)` +`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. +SetBoolItem sets BoolItem field to given value. + ### GetArrayItem @@ -163,22 +138,17 @@ GetArrayItem returns the ArrayItem field if non-nil, zero value otherwise. ### GetArrayItemOk -`func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool)` +`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. +SetArrayItem sets ArrayItem field to given value. + [[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-experimental/go-petstore/docs/User.md b/samples/client/petstore/go-experimental/go-petstore/docs/User.md index e9720af9fb78..a6bea41030bf 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/User.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/User.md @@ -40,22 +40,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *User) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *User) HasId() bool` +`func (o *User) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *User) SetId(v int64)` +`func (o *User) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetUsername @@ -65,22 +65,22 @@ GetUsername returns the Username field if non-nil, zero value otherwise. ### GetUsernameOk -`func (o *User) GetUsernameOk() (string, bool)` +`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 +### SetUsername -`func (o *User) HasUsername() bool` +`func (o *User) SetUsername(v string)` -HasUsername returns a boolean if a field has been set. +SetUsername sets Username field to given value. -### SetUsername +### HasUsername -`func (o *User) SetUsername(v string)` +`func (o *User) HasUsername() bool` -SetUsername gets a reference to the given string and assigns it to the Username field. +HasUsername returns a boolean if a field has been set. ### GetFirstName @@ -90,22 +90,22 @@ GetFirstName returns the FirstName field if non-nil, zero value otherwise. ### GetFirstNameOk -`func (o *User) GetFirstNameOk() (string, bool)` +`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 +### SetFirstName -`func (o *User) HasFirstName() bool` +`func (o *User) SetFirstName(v string)` -HasFirstName returns a boolean if a field has been set. +SetFirstName sets FirstName field to given value. -### SetFirstName +### HasFirstName -`func (o *User) SetFirstName(v string)` +`func (o *User) HasFirstName() bool` -SetFirstName gets a reference to the given string and assigns it to the FirstName field. +HasFirstName returns a boolean if a field has been set. ### GetLastName @@ -115,22 +115,22 @@ GetLastName returns the LastName field if non-nil, zero value otherwise. ### GetLastNameOk -`func (o *User) GetLastNameOk() (string, bool)` +`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 +### SetLastName -`func (o *User) HasLastName() bool` +`func (o *User) SetLastName(v string)` -HasLastName returns a boolean if a field has been set. +SetLastName sets LastName field to given value. -### SetLastName +### HasLastName -`func (o *User) SetLastName(v string)` +`func (o *User) HasLastName() bool` -SetLastName gets a reference to the given string and assigns it to the LastName field. +HasLastName returns a boolean if a field has been set. ### GetEmail @@ -140,22 +140,22 @@ GetEmail returns the Email field if non-nil, zero value otherwise. ### GetEmailOk -`func (o *User) GetEmailOk() (string, bool)` +`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 +### SetEmail -`func (o *User) HasEmail() bool` +`func (o *User) SetEmail(v string)` -HasEmail returns a boolean if a field has been set. +SetEmail sets Email field to given value. -### SetEmail +### HasEmail -`func (o *User) SetEmail(v string)` +`func (o *User) HasEmail() bool` -SetEmail gets a reference to the given string and assigns it to the Email field. +HasEmail returns a boolean if a field has been set. ### GetPassword @@ -165,22 +165,22 @@ GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk -`func (o *User) GetPasswordOk() (string, bool)` +`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 +### SetPassword -`func (o *User) HasPassword() bool` +`func (o *User) SetPassword(v string)` -HasPassword returns a boolean if a field has been set. +SetPassword sets Password field to given value. -### SetPassword +### HasPassword -`func (o *User) SetPassword(v string)` +`func (o *User) HasPassword() bool` -SetPassword gets a reference to the given string and assigns it to the Password field. +HasPassword returns a boolean if a field has been set. ### GetPhone @@ -190,22 +190,22 @@ GetPhone returns the Phone field if non-nil, zero value otherwise. ### GetPhoneOk -`func (o *User) GetPhoneOk() (string, bool)` +`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 +### SetPhone -`func (o *User) HasPhone() bool` +`func (o *User) SetPhone(v string)` -HasPhone returns a boolean if a field has been set. +SetPhone sets Phone field to given value. -### SetPhone +### HasPhone -`func (o *User) SetPhone(v string)` +`func (o *User) HasPhone() bool` -SetPhone gets a reference to the given string and assigns it to the Phone field. +HasPhone returns a boolean if a field has been set. ### GetUserStatus @@ -215,22 +215,22 @@ GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. ### GetUserStatusOk -`func (o *User) GetUserStatusOk() (int32, bool)` +`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 +### SetUserStatus -`func (o *User) HasUserStatus() bool` +`func (o *User) SetUserStatus(v int32)` -HasUserStatus returns a boolean if a field has been set. +SetUserStatus sets UserStatus field to given value. -### SetUserStatus +### HasUserStatus -`func (o *User) SetUserStatus(v int32)` +`func (o *User) HasUserStatus() bool` -SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field. +HasUserStatus returns a boolean if a field has been set. [[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-experimental/go-petstore/docs/XmlItem.md b/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md index 6798de558fbe..b309819923e5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/XmlItem.md @@ -61,22 +61,22 @@ GetAttributeString returns the AttributeString field if non-nil, zero value othe ### GetAttributeStringOk -`func (o *XmlItem) GetAttributeStringOk() (string, bool)` +`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 +### SetAttributeString -`func (o *XmlItem) HasAttributeString() bool` +`func (o *XmlItem) SetAttributeString(v string)` -HasAttributeString returns a boolean if a field has been set. +SetAttributeString sets AttributeString field to given value. -### SetAttributeString +### HasAttributeString -`func (o *XmlItem) SetAttributeString(v string)` +`func (o *XmlItem) HasAttributeString() bool` -SetAttributeString gets a reference to the given string and assigns it to the AttributeString field. +HasAttributeString returns a boolean if a field has been set. ### GetAttributeNumber @@ -86,22 +86,22 @@ GetAttributeNumber returns the AttributeNumber field if non-nil, zero value othe ### GetAttributeNumberOk -`func (o *XmlItem) GetAttributeNumberOk() (float32, bool)` +`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 +### SetAttributeNumber -`func (o *XmlItem) HasAttributeNumber() bool` +`func (o *XmlItem) SetAttributeNumber(v float32)` -HasAttributeNumber returns a boolean if a field has been set. +SetAttributeNumber sets AttributeNumber field to given value. -### SetAttributeNumber +### HasAttributeNumber -`func (o *XmlItem) SetAttributeNumber(v float32)` +`func (o *XmlItem) HasAttributeNumber() bool` -SetAttributeNumber gets a reference to the given float32 and assigns it to the AttributeNumber field. +HasAttributeNumber returns a boolean if a field has been set. ### GetAttributeInteger @@ -111,22 +111,22 @@ GetAttributeInteger returns the AttributeInteger field if non-nil, zero value ot ### GetAttributeIntegerOk -`func (o *XmlItem) GetAttributeIntegerOk() (int32, bool)` +`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 +### SetAttributeInteger -`func (o *XmlItem) HasAttributeInteger() bool` +`func (o *XmlItem) SetAttributeInteger(v int32)` -HasAttributeInteger returns a boolean if a field has been set. +SetAttributeInteger sets AttributeInteger field to given value. -### SetAttributeInteger +### HasAttributeInteger -`func (o *XmlItem) SetAttributeInteger(v int32)` +`func (o *XmlItem) HasAttributeInteger() bool` -SetAttributeInteger gets a reference to the given int32 and assigns it to the AttributeInteger field. +HasAttributeInteger returns a boolean if a field has been set. ### GetAttributeBoolean @@ -136,22 +136,22 @@ GetAttributeBoolean returns the AttributeBoolean field if non-nil, zero value ot ### GetAttributeBooleanOk -`func (o *XmlItem) GetAttributeBooleanOk() (bool, bool)` +`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 +### SetAttributeBoolean -`func (o *XmlItem) HasAttributeBoolean() bool` +`func (o *XmlItem) SetAttributeBoolean(v bool)` -HasAttributeBoolean returns a boolean if a field has been set. +SetAttributeBoolean sets AttributeBoolean field to given value. -### SetAttributeBoolean +### HasAttributeBoolean -`func (o *XmlItem) SetAttributeBoolean(v bool)` +`func (o *XmlItem) HasAttributeBoolean() bool` -SetAttributeBoolean gets a reference to the given bool and assigns it to the AttributeBoolean field. +HasAttributeBoolean returns a boolean if a field has been set. ### GetWrappedArray @@ -161,22 +161,22 @@ GetWrappedArray returns the WrappedArray field if non-nil, zero value otherwise. ### GetWrappedArrayOk -`func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool)` +`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 +### SetWrappedArray -`func (o *XmlItem) HasWrappedArray() bool` +`func (o *XmlItem) SetWrappedArray(v []int32)` -HasWrappedArray returns a boolean if a field has been set. +SetWrappedArray sets WrappedArray field to given value. -### SetWrappedArray +### HasWrappedArray -`func (o *XmlItem) SetWrappedArray(v []int32)` +`func (o *XmlItem) HasWrappedArray() bool` -SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field. +HasWrappedArray returns a boolean if a field has been set. ### GetNameString @@ -186,22 +186,22 @@ GetNameString returns the NameString field if non-nil, zero value otherwise. ### GetNameStringOk -`func (o *XmlItem) GetNameStringOk() (string, bool)` +`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 +### SetNameString -`func (o *XmlItem) HasNameString() bool` +`func (o *XmlItem) SetNameString(v string)` -HasNameString returns a boolean if a field has been set. +SetNameString sets NameString field to given value. -### SetNameString +### HasNameString -`func (o *XmlItem) SetNameString(v string)` +`func (o *XmlItem) HasNameString() bool` -SetNameString gets a reference to the given string and assigns it to the NameString field. +HasNameString returns a boolean if a field has been set. ### GetNameNumber @@ -211,22 +211,22 @@ GetNameNumber returns the NameNumber field if non-nil, zero value otherwise. ### GetNameNumberOk -`func (o *XmlItem) GetNameNumberOk() (float32, bool)` +`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 +### SetNameNumber -`func (o *XmlItem) HasNameNumber() bool` +`func (o *XmlItem) SetNameNumber(v float32)` -HasNameNumber returns a boolean if a field has been set. +SetNameNumber sets NameNumber field to given value. -### SetNameNumber +### HasNameNumber -`func (o *XmlItem) SetNameNumber(v float32)` +`func (o *XmlItem) HasNameNumber() bool` -SetNameNumber gets a reference to the given float32 and assigns it to the NameNumber field. +HasNameNumber returns a boolean if a field has been set. ### GetNameInteger @@ -236,22 +236,22 @@ GetNameInteger returns the NameInteger field if non-nil, zero value otherwise. ### GetNameIntegerOk -`func (o *XmlItem) GetNameIntegerOk() (int32, bool)` +`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 +### SetNameInteger -`func (o *XmlItem) HasNameInteger() bool` +`func (o *XmlItem) SetNameInteger(v int32)` -HasNameInteger returns a boolean if a field has been set. +SetNameInteger sets NameInteger field to given value. -### SetNameInteger +### HasNameInteger -`func (o *XmlItem) SetNameInteger(v int32)` +`func (o *XmlItem) HasNameInteger() bool` -SetNameInteger gets a reference to the given int32 and assigns it to the NameInteger field. +HasNameInteger returns a boolean if a field has been set. ### GetNameBoolean @@ -261,22 +261,22 @@ GetNameBoolean returns the NameBoolean field if non-nil, zero value otherwise. ### GetNameBooleanOk -`func (o *XmlItem) GetNameBooleanOk() (bool, bool)` +`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 +### SetNameBoolean -`func (o *XmlItem) HasNameBoolean() bool` +`func (o *XmlItem) SetNameBoolean(v bool)` -HasNameBoolean returns a boolean if a field has been set. +SetNameBoolean sets NameBoolean field to given value. -### SetNameBoolean +### HasNameBoolean -`func (o *XmlItem) SetNameBoolean(v bool)` +`func (o *XmlItem) HasNameBoolean() bool` -SetNameBoolean gets a reference to the given bool and assigns it to the NameBoolean field. +HasNameBoolean returns a boolean if a field has been set. ### GetNameArray @@ -286,22 +286,22 @@ GetNameArray returns the NameArray field if non-nil, zero value otherwise. ### GetNameArrayOk -`func (o *XmlItem) GetNameArrayOk() ([]int32, bool)` +`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 +### SetNameArray -`func (o *XmlItem) HasNameArray() bool` +`func (o *XmlItem) SetNameArray(v []int32)` -HasNameArray returns a boolean if a field has been set. +SetNameArray sets NameArray field to given value. -### SetNameArray +### HasNameArray -`func (o *XmlItem) SetNameArray(v []int32)` +`func (o *XmlItem) HasNameArray() bool` -SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field. +HasNameArray returns a boolean if a field has been set. ### GetNameWrappedArray @@ -311,22 +311,22 @@ GetNameWrappedArray returns the NameWrappedArray field if non-nil, zero value ot ### GetNameWrappedArrayOk -`func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool)` +`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 +### SetNameWrappedArray -`func (o *XmlItem) HasNameWrappedArray() bool` +`func (o *XmlItem) SetNameWrappedArray(v []int32)` -HasNameWrappedArray returns a boolean if a field has been set. +SetNameWrappedArray sets NameWrappedArray field to given value. -### SetNameWrappedArray +### HasNameWrappedArray -`func (o *XmlItem) SetNameWrappedArray(v []int32)` +`func (o *XmlItem) HasNameWrappedArray() bool` -SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field. +HasNameWrappedArray returns a boolean if a field has been set. ### GetPrefixString @@ -336,22 +336,22 @@ GetPrefixString returns the PrefixString field if non-nil, zero value otherwise. ### GetPrefixStringOk -`func (o *XmlItem) GetPrefixStringOk() (string, bool)` +`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 +### SetPrefixString -`func (o *XmlItem) HasPrefixString() bool` +`func (o *XmlItem) SetPrefixString(v string)` -HasPrefixString returns a boolean if a field has been set. +SetPrefixString sets PrefixString field to given value. -### SetPrefixString +### HasPrefixString -`func (o *XmlItem) SetPrefixString(v string)` +`func (o *XmlItem) HasPrefixString() bool` -SetPrefixString gets a reference to the given string and assigns it to the PrefixString field. +HasPrefixString returns a boolean if a field has been set. ### GetPrefixNumber @@ -361,22 +361,22 @@ GetPrefixNumber returns the PrefixNumber field if non-nil, zero value otherwise. ### GetPrefixNumberOk -`func (o *XmlItem) GetPrefixNumberOk() (float32, bool)` +`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 +### SetPrefixNumber -`func (o *XmlItem) HasPrefixNumber() bool` +`func (o *XmlItem) SetPrefixNumber(v float32)` -HasPrefixNumber returns a boolean if a field has been set. +SetPrefixNumber sets PrefixNumber field to given value. -### SetPrefixNumber +### HasPrefixNumber -`func (o *XmlItem) SetPrefixNumber(v float32)` +`func (o *XmlItem) HasPrefixNumber() bool` -SetPrefixNumber gets a reference to the given float32 and assigns it to the PrefixNumber field. +HasPrefixNumber returns a boolean if a field has been set. ### GetPrefixInteger @@ -386,22 +386,22 @@ GetPrefixInteger returns the PrefixInteger field if non-nil, zero value otherwis ### GetPrefixIntegerOk -`func (o *XmlItem) GetPrefixIntegerOk() (int32, bool)` +`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 +### SetPrefixInteger -`func (o *XmlItem) HasPrefixInteger() bool` +`func (o *XmlItem) SetPrefixInteger(v int32)` -HasPrefixInteger returns a boolean if a field has been set. +SetPrefixInteger sets PrefixInteger field to given value. -### SetPrefixInteger +### HasPrefixInteger -`func (o *XmlItem) SetPrefixInteger(v int32)` +`func (o *XmlItem) HasPrefixInteger() bool` -SetPrefixInteger gets a reference to the given int32 and assigns it to the PrefixInteger field. +HasPrefixInteger returns a boolean if a field has been set. ### GetPrefixBoolean @@ -411,22 +411,22 @@ GetPrefixBoolean returns the PrefixBoolean field if non-nil, zero value otherwis ### GetPrefixBooleanOk -`func (o *XmlItem) GetPrefixBooleanOk() (bool, bool)` +`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 +### SetPrefixBoolean -`func (o *XmlItem) HasPrefixBoolean() bool` +`func (o *XmlItem) SetPrefixBoolean(v bool)` -HasPrefixBoolean returns a boolean if a field has been set. +SetPrefixBoolean sets PrefixBoolean field to given value. -### SetPrefixBoolean +### HasPrefixBoolean -`func (o *XmlItem) SetPrefixBoolean(v bool)` +`func (o *XmlItem) HasPrefixBoolean() bool` -SetPrefixBoolean gets a reference to the given bool and assigns it to the PrefixBoolean field. +HasPrefixBoolean returns a boolean if a field has been set. ### GetPrefixArray @@ -436,22 +436,22 @@ GetPrefixArray returns the PrefixArray field if non-nil, zero value otherwise. ### GetPrefixArrayOk -`func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool)` +`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 +### SetPrefixArray -`func (o *XmlItem) HasPrefixArray() bool` +`func (o *XmlItem) SetPrefixArray(v []int32)` -HasPrefixArray returns a boolean if a field has been set. +SetPrefixArray sets PrefixArray field to given value. -### SetPrefixArray +### HasPrefixArray -`func (o *XmlItem) SetPrefixArray(v []int32)` +`func (o *XmlItem) HasPrefixArray() bool` -SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field. +HasPrefixArray returns a boolean if a field has been set. ### GetPrefixWrappedArray @@ -461,22 +461,22 @@ GetPrefixWrappedArray returns the PrefixWrappedArray field if non-nil, zero valu ### GetPrefixWrappedArrayOk -`func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool)` +`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 +### SetPrefixWrappedArray -`func (o *XmlItem) HasPrefixWrappedArray() bool` +`func (o *XmlItem) SetPrefixWrappedArray(v []int32)` -HasPrefixWrappedArray returns a boolean if a field has been set. +SetPrefixWrappedArray sets PrefixWrappedArray field to given value. -### SetPrefixWrappedArray +### HasPrefixWrappedArray -`func (o *XmlItem) SetPrefixWrappedArray(v []int32)` +`func (o *XmlItem) HasPrefixWrappedArray() bool` -SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field. +HasPrefixWrappedArray returns a boolean if a field has been set. ### GetNamespaceString @@ -486,22 +486,22 @@ GetNamespaceString returns the NamespaceString field if non-nil, zero value othe ### GetNamespaceStringOk -`func (o *XmlItem) GetNamespaceStringOk() (string, bool)` +`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 +### SetNamespaceString -`func (o *XmlItem) HasNamespaceString() bool` +`func (o *XmlItem) SetNamespaceString(v string)` -HasNamespaceString returns a boolean if a field has been set. +SetNamespaceString sets NamespaceString field to given value. -### SetNamespaceString +### HasNamespaceString -`func (o *XmlItem) SetNamespaceString(v string)` +`func (o *XmlItem) HasNamespaceString() bool` -SetNamespaceString gets a reference to the given string and assigns it to the NamespaceString field. +HasNamespaceString returns a boolean if a field has been set. ### GetNamespaceNumber @@ -511,22 +511,22 @@ GetNamespaceNumber returns the NamespaceNumber field if non-nil, zero value othe ### GetNamespaceNumberOk -`func (o *XmlItem) GetNamespaceNumberOk() (float32, bool)` +`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 +### SetNamespaceNumber -`func (o *XmlItem) HasNamespaceNumber() bool` +`func (o *XmlItem) SetNamespaceNumber(v float32)` -HasNamespaceNumber returns a boolean if a field has been set. +SetNamespaceNumber sets NamespaceNumber field to given value. -### SetNamespaceNumber +### HasNamespaceNumber -`func (o *XmlItem) SetNamespaceNumber(v float32)` +`func (o *XmlItem) HasNamespaceNumber() bool` -SetNamespaceNumber gets a reference to the given float32 and assigns it to the NamespaceNumber field. +HasNamespaceNumber returns a boolean if a field has been set. ### GetNamespaceInteger @@ -536,22 +536,22 @@ GetNamespaceInteger returns the NamespaceInteger field if non-nil, zero value ot ### GetNamespaceIntegerOk -`func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool)` +`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 +### SetNamespaceInteger -`func (o *XmlItem) HasNamespaceInteger() bool` +`func (o *XmlItem) SetNamespaceInteger(v int32)` -HasNamespaceInteger returns a boolean if a field has been set. +SetNamespaceInteger sets NamespaceInteger field to given value. -### SetNamespaceInteger +### HasNamespaceInteger -`func (o *XmlItem) SetNamespaceInteger(v int32)` +`func (o *XmlItem) HasNamespaceInteger() bool` -SetNamespaceInteger gets a reference to the given int32 and assigns it to the NamespaceInteger field. +HasNamespaceInteger returns a boolean if a field has been set. ### GetNamespaceBoolean @@ -561,22 +561,22 @@ GetNamespaceBoolean returns the NamespaceBoolean field if non-nil, zero value ot ### GetNamespaceBooleanOk -`func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool)` +`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 +### SetNamespaceBoolean -`func (o *XmlItem) HasNamespaceBoolean() bool` +`func (o *XmlItem) SetNamespaceBoolean(v bool)` -HasNamespaceBoolean returns a boolean if a field has been set. +SetNamespaceBoolean sets NamespaceBoolean field to given value. -### SetNamespaceBoolean +### HasNamespaceBoolean -`func (o *XmlItem) SetNamespaceBoolean(v bool)` +`func (o *XmlItem) HasNamespaceBoolean() bool` -SetNamespaceBoolean gets a reference to the given bool and assigns it to the NamespaceBoolean field. +HasNamespaceBoolean returns a boolean if a field has been set. ### GetNamespaceArray @@ -586,22 +586,22 @@ GetNamespaceArray returns the NamespaceArray field if non-nil, zero value otherw ### GetNamespaceArrayOk -`func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool)` +`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 +### SetNamespaceArray -`func (o *XmlItem) HasNamespaceArray() bool` +`func (o *XmlItem) SetNamespaceArray(v []int32)` -HasNamespaceArray returns a boolean if a field has been set. +SetNamespaceArray sets NamespaceArray field to given value. -### SetNamespaceArray +### HasNamespaceArray -`func (o *XmlItem) SetNamespaceArray(v []int32)` +`func (o *XmlItem) HasNamespaceArray() bool` -SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field. +HasNamespaceArray returns a boolean if a field has been set. ### GetNamespaceWrappedArray @@ -611,22 +611,22 @@ GetNamespaceWrappedArray returns the NamespaceWrappedArray field if non-nil, zer ### GetNamespaceWrappedArrayOk -`func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool)` +`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 +### SetNamespaceWrappedArray -`func (o *XmlItem) HasNamespaceWrappedArray() bool` +`func (o *XmlItem) SetNamespaceWrappedArray(v []int32)` -HasNamespaceWrappedArray returns a boolean if a field has been set. +SetNamespaceWrappedArray sets NamespaceWrappedArray field to given value. -### SetNamespaceWrappedArray +### HasNamespaceWrappedArray -`func (o *XmlItem) SetNamespaceWrappedArray(v []int32)` +`func (o *XmlItem) HasNamespaceWrappedArray() bool` -SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field. +HasNamespaceWrappedArray returns a boolean if a field has been set. ### GetPrefixNsString @@ -636,22 +636,22 @@ GetPrefixNsString returns the PrefixNsString field if non-nil, zero value otherw ### GetPrefixNsStringOk -`func (o *XmlItem) GetPrefixNsStringOk() (string, bool)` +`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 +### SetPrefixNsString -`func (o *XmlItem) HasPrefixNsString() bool` +`func (o *XmlItem) SetPrefixNsString(v string)` -HasPrefixNsString returns a boolean if a field has been set. +SetPrefixNsString sets PrefixNsString field to given value. -### SetPrefixNsString +### HasPrefixNsString -`func (o *XmlItem) SetPrefixNsString(v string)` +`func (o *XmlItem) HasPrefixNsString() bool` -SetPrefixNsString gets a reference to the given string and assigns it to the PrefixNsString field. +HasPrefixNsString returns a boolean if a field has been set. ### GetPrefixNsNumber @@ -661,22 +661,22 @@ GetPrefixNsNumber returns the PrefixNsNumber field if non-nil, zero value otherw ### GetPrefixNsNumberOk -`func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool)` +`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 +### SetPrefixNsNumber -`func (o *XmlItem) HasPrefixNsNumber() bool` +`func (o *XmlItem) SetPrefixNsNumber(v float32)` -HasPrefixNsNumber returns a boolean if a field has been set. +SetPrefixNsNumber sets PrefixNsNumber field to given value. -### SetPrefixNsNumber +### HasPrefixNsNumber -`func (o *XmlItem) SetPrefixNsNumber(v float32)` +`func (o *XmlItem) HasPrefixNsNumber() bool` -SetPrefixNsNumber gets a reference to the given float32 and assigns it to the PrefixNsNumber field. +HasPrefixNsNumber returns a boolean if a field has been set. ### GetPrefixNsInteger @@ -686,22 +686,22 @@ GetPrefixNsInteger returns the PrefixNsInteger field if non-nil, zero value othe ### GetPrefixNsIntegerOk -`func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool)` +`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 +### SetPrefixNsInteger -`func (o *XmlItem) HasPrefixNsInteger() bool` +`func (o *XmlItem) SetPrefixNsInteger(v int32)` -HasPrefixNsInteger returns a boolean if a field has been set. +SetPrefixNsInteger sets PrefixNsInteger field to given value. -### SetPrefixNsInteger +### HasPrefixNsInteger -`func (o *XmlItem) SetPrefixNsInteger(v int32)` +`func (o *XmlItem) HasPrefixNsInteger() bool` -SetPrefixNsInteger gets a reference to the given int32 and assigns it to the PrefixNsInteger field. +HasPrefixNsInteger returns a boolean if a field has been set. ### GetPrefixNsBoolean @@ -711,22 +711,22 @@ GetPrefixNsBoolean returns the PrefixNsBoolean field if non-nil, zero value othe ### GetPrefixNsBooleanOk -`func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool)` +`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 +### SetPrefixNsBoolean -`func (o *XmlItem) HasPrefixNsBoolean() bool` +`func (o *XmlItem) SetPrefixNsBoolean(v bool)` -HasPrefixNsBoolean returns a boolean if a field has been set. +SetPrefixNsBoolean sets PrefixNsBoolean field to given value. -### SetPrefixNsBoolean +### HasPrefixNsBoolean -`func (o *XmlItem) SetPrefixNsBoolean(v bool)` +`func (o *XmlItem) HasPrefixNsBoolean() bool` -SetPrefixNsBoolean gets a reference to the given bool and assigns it to the PrefixNsBoolean field. +HasPrefixNsBoolean returns a boolean if a field has been set. ### GetPrefixNsArray @@ -736,22 +736,22 @@ GetPrefixNsArray returns the PrefixNsArray field if non-nil, zero value otherwis ### GetPrefixNsArrayOk -`func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool)` +`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 +### SetPrefixNsArray -`func (o *XmlItem) HasPrefixNsArray() bool` +`func (o *XmlItem) SetPrefixNsArray(v []int32)` -HasPrefixNsArray returns a boolean if a field has been set. +SetPrefixNsArray sets PrefixNsArray field to given value. -### SetPrefixNsArray +### HasPrefixNsArray -`func (o *XmlItem) SetPrefixNsArray(v []int32)` +`func (o *XmlItem) HasPrefixNsArray() bool` -SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field. +HasPrefixNsArray returns a boolean if a field has been set. ### GetPrefixNsWrappedArray @@ -761,22 +761,22 @@ GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field if non-nil, zero ### GetPrefixNsWrappedArrayOk -`func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool)` +`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 +### SetPrefixNsWrappedArray -`func (o *XmlItem) HasPrefixNsWrappedArray() bool` +`func (o *XmlItem) SetPrefixNsWrappedArray(v []int32)` -HasPrefixNsWrappedArray returns a boolean if a field has been set. +SetPrefixNsWrappedArray sets PrefixNsWrappedArray field to given value. -### SetPrefixNsWrappedArray +### HasPrefixNsWrappedArray -`func (o *XmlItem) SetPrefixNsWrappedArray(v []int32)` +`func (o *XmlItem) HasPrefixNsWrappedArray() bool` -SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field. +HasPrefixNsWrappedArray returns a boolean if a field has been set. [[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-experimental/go-petstore/model_200_response.go b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go index 8c2c0f493c07..c36b5e6da67a 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_200_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_200_response.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type Model200Response struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewModel200Response() *Model200Response { - this := Model200Response{} - return &this + this := Model200Response{} + return &this } // NewModel200ResponseWithDefaults instantiates a new Model200Response object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewModel200ResponseWithDefaults() *Model200Response { - this := Model200Response{} - return &this + this := Model200Response{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *Model200Response) GetName() int32 { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Model200Response) GetNameOk() (int32, bool) { +func (o *Model200Response) GetNameOk() (*int32, bool) { if o == nil || o.Name == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *Model200Response) GetClass() string { return *o.Class } -// GetClassOk returns a tuple with the Class field value if set, zero value otherwise +// GetClassOk returns a tuple with the Class field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Model200Response) GetClassOk() (string, bool) { +func (o *Model200Response) GetClassOk() (*string, bool) { if o == nil || o.Class == nil { - var ret string - return ret, false + return nil, false } - return *o.Class, true + return o.Class, true } // HasClass returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableModel200Response struct { - Value Model200Response - ExplicitNull bool + value *Model200Response + isSet bool +} + +func (v NullableModel200Response) Get() *Model200Response { + return v.value +} + +func (v *NullableModel200Response) Set(val *Model200Response) { + v.value = val + v.isSet = true +} + +func (v NullableModel200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModel200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModel200Response(val *Model200Response) *NullableModel200Response { + return &NullableModel200Response{value: val, isSet: true} } func (v NullableModel200Response) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableModel200Response) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go index 6c3d6a60e3b2..f729cf41fb53 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_any_type.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type AdditionalPropertiesAnyType struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesAnyType() *AdditionalPropertiesAnyType { - this := AdditionalPropertiesAnyType{} - return &this + this := AdditionalPropertiesAnyType{} + return &this } // NewAdditionalPropertiesAnyTypeWithDefaults instantiates a new AdditionalPropertiesAnyType object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesAnyTypeWithDefaults() *AdditionalPropertiesAnyType { - this := AdditionalPropertiesAnyType{} - return &this + this := AdditionalPropertiesAnyType{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *AdditionalPropertiesAnyType) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesAnyType) GetNameOk() (string, bool) { +func (o *AdditionalPropertiesAnyType) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableAdditionalPropertiesAnyType struct { - Value AdditionalPropertiesAnyType - ExplicitNull bool + value *AdditionalPropertiesAnyType + isSet bool +} + +func (v NullableAdditionalPropertiesAnyType) Get() *AdditionalPropertiesAnyType { + return v.value +} + +func (v *NullableAdditionalPropertiesAnyType) Set(val *AdditionalPropertiesAnyType) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesAnyType) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesAnyType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesAnyType(val *AdditionalPropertiesAnyType) *NullableAdditionalPropertiesAnyType { + return &NullableAdditionalPropertiesAnyType{value: val, isSet: true} } func (v NullableAdditionalPropertiesAnyType) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesAnyType) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go index c6e4f9716c5b..643059a3d8f3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_array.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type AdditionalPropertiesArray struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesArray() *AdditionalPropertiesArray { - this := AdditionalPropertiesArray{} - return &this + this := AdditionalPropertiesArray{} + return &this } // NewAdditionalPropertiesArrayWithDefaults instantiates a new AdditionalPropertiesArray object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesArrayWithDefaults() *AdditionalPropertiesArray { - this := AdditionalPropertiesArray{} - return &this + this := AdditionalPropertiesArray{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *AdditionalPropertiesArray) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesArray) GetNameOk() (string, bool) { +func (o *AdditionalPropertiesArray) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableAdditionalPropertiesArray struct { - Value AdditionalPropertiesArray - ExplicitNull bool + value *AdditionalPropertiesArray + isSet bool +} + +func (v NullableAdditionalPropertiesArray) Get() *AdditionalPropertiesArray { + return v.value +} + +func (v *NullableAdditionalPropertiesArray) Set(val *AdditionalPropertiesArray) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesArray) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesArray) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesArray(val *AdditionalPropertiesArray) *NullableAdditionalPropertiesArray { + return &NullableAdditionalPropertiesArray{value: val, isSet: true} } func (v NullableAdditionalPropertiesArray) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesArray) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go index 7115a99e8f64..b56dcdc5f359 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_boolean.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type AdditionalPropertiesBoolean struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesBoolean() *AdditionalPropertiesBoolean { - this := AdditionalPropertiesBoolean{} - return &this + this := AdditionalPropertiesBoolean{} + return &this } // NewAdditionalPropertiesBooleanWithDefaults instantiates a new AdditionalPropertiesBoolean object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesBooleanWithDefaults() *AdditionalPropertiesBoolean { - this := AdditionalPropertiesBoolean{} - return &this + this := AdditionalPropertiesBoolean{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *AdditionalPropertiesBoolean) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesBoolean) GetNameOk() (string, bool) { +func (o *AdditionalPropertiesBoolean) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableAdditionalPropertiesBoolean struct { - Value AdditionalPropertiesBoolean - ExplicitNull bool + value *AdditionalPropertiesBoolean + isSet bool +} + +func (v NullableAdditionalPropertiesBoolean) Get() *AdditionalPropertiesBoolean { + return v.value +} + +func (v *NullableAdditionalPropertiesBoolean) Set(val *AdditionalPropertiesBoolean) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesBoolean) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesBoolean) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesBoolean(val *AdditionalPropertiesBoolean) *NullableAdditionalPropertiesBoolean { + return &NullableAdditionalPropertiesBoolean{value: val, isSet: true} } func (v NullableAdditionalPropertiesBoolean) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesBoolean) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 21a01f1b92fb..9505c3e7e6d6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -34,16 +33,16 @@ type AdditionalPropertiesClass struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesClass() *AdditionalPropertiesClass { - this := AdditionalPropertiesClass{} - return &this + this := AdditionalPropertiesClass{} + return &this } // NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass { - this := AdditionalPropertiesClass{} - return &this + this := AdditionalPropertiesClass{} + return &this } // GetMapString returns the MapString field value if set, zero value otherwise. @@ -55,14 +54,13 @@ func (o *AdditionalPropertiesClass) GetMapString() map[string]string { return *o.MapString } -// GetMapStringOk returns a tuple with the MapString field value if set, zero value otherwise +// GetMapStringOk returns a tuple with the MapString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapStringOk() (map[string]string, bool) { +func (o *AdditionalPropertiesClass) GetMapStringOk() (*map[string]string, bool) { if o == nil || o.MapString == nil { - var ret map[string]string - return ret, false + return nil, false } - return *o.MapString, true + return o.MapString, true } // HasMapString returns a boolean if a field has been set. @@ -88,14 +86,13 @@ func (o *AdditionalPropertiesClass) GetMapNumber() map[string]float32 { return *o.MapNumber } -// GetMapNumberOk returns a tuple with the MapNumber field value if set, zero value otherwise +// GetMapNumberOk returns a tuple with the MapNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapNumberOk() (map[string]float32, bool) { +func (o *AdditionalPropertiesClass) GetMapNumberOk() (*map[string]float32, bool) { if o == nil || o.MapNumber == nil { - var ret map[string]float32 - return ret, false + return nil, false } - return *o.MapNumber, true + return o.MapNumber, true } // HasMapNumber returns a boolean if a field has been set. @@ -121,14 +118,13 @@ func (o *AdditionalPropertiesClass) GetMapInteger() map[string]int32 { return *o.MapInteger } -// GetMapIntegerOk returns a tuple with the MapInteger field value if set, zero value otherwise +// GetMapIntegerOk returns a tuple with the MapInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapIntegerOk() (map[string]int32, bool) { +func (o *AdditionalPropertiesClass) GetMapIntegerOk() (*map[string]int32, bool) { if o == nil || o.MapInteger == nil { - var ret map[string]int32 - return ret, false + return nil, false } - return *o.MapInteger, true + return o.MapInteger, true } // HasMapInteger returns a boolean if a field has been set. @@ -154,14 +150,13 @@ func (o *AdditionalPropertiesClass) GetMapBoolean() map[string]bool { return *o.MapBoolean } -// GetMapBooleanOk returns a tuple with the MapBoolean field value if set, zero value otherwise +// GetMapBooleanOk returns a tuple with the MapBoolean field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapBooleanOk() (map[string]bool, bool) { +func (o *AdditionalPropertiesClass) GetMapBooleanOk() (*map[string]bool, bool) { if o == nil || o.MapBoolean == nil { - var ret map[string]bool - return ret, false + return nil, false } - return *o.MapBoolean, true + return o.MapBoolean, true } // HasMapBoolean returns a boolean if a field has been set. @@ -187,14 +182,13 @@ func (o *AdditionalPropertiesClass) GetMapArrayInteger() map[string][]int32 { return *o.MapArrayInteger } -// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field value if set, zero value otherwise +// GetMapArrayIntegerOk returns a tuple with the MapArrayInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (map[string][]int32, bool) { +func (o *AdditionalPropertiesClass) GetMapArrayIntegerOk() (*map[string][]int32, bool) { if o == nil || o.MapArrayInteger == nil { - var ret map[string][]int32 - return ret, false + return nil, false } - return *o.MapArrayInteger, true + return o.MapArrayInteger, true } // HasMapArrayInteger returns a boolean if a field has been set. @@ -220,14 +214,13 @@ func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string return *o.MapArrayAnytype } -// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field value if set, zero value otherwise +// GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool) { +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 nil, false } - return *o.MapArrayAnytype, true + return o.MapArrayAnytype, true } // HasMapArrayAnytype returns a boolean if a field has been set. @@ -253,14 +246,13 @@ func (o *AdditionalPropertiesClass) GetMapMapString() map[string]map[string]stri return *o.MapMapString } -// GetMapMapStringOk returns a tuple with the MapMapString field value if set, zero value otherwise +// GetMapMapStringOk returns a tuple with the MapMapString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapMapStringOk() (map[string]map[string]string, bool) { +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 nil, false } - return *o.MapMapString, true + return o.MapMapString, true } // HasMapMapString returns a boolean if a field has been set. @@ -286,14 +278,13 @@ func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map return *o.MapMapAnytype } -// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field value if set, zero value otherwise +// GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool) { +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 nil, false } - return *o.MapMapAnytype, true + return o.MapMapAnytype, true } // HasMapMapAnytype returns a boolean if a field has been set. @@ -319,14 +310,13 @@ func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { return *o.Anytype1 } -// GetAnytype1Ok returns a tuple with the Anytype1 field value if set, zero value otherwise +// GetAnytype1Ok returns a tuple with the Anytype1 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype1Ok() (*map[string]interface{}, bool) { if o == nil || o.Anytype1 == nil { - var ret map[string]interface{} - return ret, false + return nil, false } - return *o.Anytype1, true + return o.Anytype1, true } // HasAnytype1 returns a boolean if a field has been set. @@ -352,14 +342,13 @@ func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { return *o.Anytype2 } -// GetAnytype2Ok returns a tuple with the Anytype2 field value if set, zero value otherwise +// GetAnytype2Ok returns a tuple with the Anytype2 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype2Ok() (*map[string]interface{}, bool) { if o == nil || o.Anytype2 == nil { - var ret map[string]interface{} - return ret, false + return nil, false } - return *o.Anytype2, true + return o.Anytype2, true } // HasAnytype2 returns a boolean if a field has been set. @@ -385,14 +374,13 @@ func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { return *o.Anytype3 } -// GetAnytype3Ok returns a tuple with the Anytype3 field value if set, zero value otherwise +// GetAnytype3Ok returns a tuple with the Anytype3 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype3Ok() (*map[string]interface{}, bool) { if o == nil || o.Anytype3 == nil { - var ret map[string]interface{} - return ret, false + return nil, false } - return *o.Anytype3, true + return o.Anytype3, true } // HasAnytype3 returns a boolean if a field has been set. @@ -409,25 +397,76 @@ 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) +} + type NullableAdditionalPropertiesClass struct { - Value AdditionalPropertiesClass - ExplicitNull bool + value *AdditionalPropertiesClass + isSet bool +} + +func (v NullableAdditionalPropertiesClass) Get() *AdditionalPropertiesClass { + return v.value +} + +func (v *NullableAdditionalPropertiesClass) Set(val *AdditionalPropertiesClass) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesClass) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesClass(val *AdditionalPropertiesClass) *NullableAdditionalPropertiesClass { + return &NullableAdditionalPropertiesClass{value: val, isSet: true} } func (v NullableAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go index 26323e4ff51f..8f8a9e18f79f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_integer.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type AdditionalPropertiesInteger struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesInteger() *AdditionalPropertiesInteger { - this := AdditionalPropertiesInteger{} - return &this + this := AdditionalPropertiesInteger{} + return &this } // NewAdditionalPropertiesIntegerWithDefaults instantiates a new AdditionalPropertiesInteger object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesIntegerWithDefaults() *AdditionalPropertiesInteger { - this := AdditionalPropertiesInteger{} - return &this + this := AdditionalPropertiesInteger{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *AdditionalPropertiesInteger) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesInteger) GetNameOk() (string, bool) { +func (o *AdditionalPropertiesInteger) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableAdditionalPropertiesInteger struct { - Value AdditionalPropertiesInteger - ExplicitNull bool + value *AdditionalPropertiesInteger + isSet bool +} + +func (v NullableAdditionalPropertiesInteger) Get() *AdditionalPropertiesInteger { + return v.value +} + +func (v *NullableAdditionalPropertiesInteger) Set(val *AdditionalPropertiesInteger) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesInteger) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesInteger) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesInteger(val *AdditionalPropertiesInteger) *NullableAdditionalPropertiesInteger { + return &NullableAdditionalPropertiesInteger{value: val, isSet: true} } func (v NullableAdditionalPropertiesInteger) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesInteger) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go index 3e25a072407e..4162e4998a13 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_number.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type AdditionalPropertiesNumber struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesNumber() *AdditionalPropertiesNumber { - this := AdditionalPropertiesNumber{} - return &this + this := AdditionalPropertiesNumber{} + return &this } // NewAdditionalPropertiesNumberWithDefaults instantiates a new AdditionalPropertiesNumber object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesNumberWithDefaults() *AdditionalPropertiesNumber { - this := AdditionalPropertiesNumber{} - return &this + this := AdditionalPropertiesNumber{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *AdditionalPropertiesNumber) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesNumber) GetNameOk() (string, bool) { +func (o *AdditionalPropertiesNumber) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableAdditionalPropertiesNumber struct { - Value AdditionalPropertiesNumber - ExplicitNull bool + value *AdditionalPropertiesNumber + isSet bool +} + +func (v NullableAdditionalPropertiesNumber) Get() *AdditionalPropertiesNumber { + return v.value +} + +func (v *NullableAdditionalPropertiesNumber) Set(val *AdditionalPropertiesNumber) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesNumber) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesNumber) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesNumber(val *AdditionalPropertiesNumber) *NullableAdditionalPropertiesNumber { + return &NullableAdditionalPropertiesNumber{value: val, isSet: true} } func (v NullableAdditionalPropertiesNumber) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesNumber) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go index 3b460ec5f3b0..8f3268795b1f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_object.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type AdditionalPropertiesObject struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesObject() *AdditionalPropertiesObject { - this := AdditionalPropertiesObject{} - return &this + this := AdditionalPropertiesObject{} + return &this } // NewAdditionalPropertiesObjectWithDefaults instantiates a new AdditionalPropertiesObject object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesObjectWithDefaults() *AdditionalPropertiesObject { - this := AdditionalPropertiesObject{} - return &this + this := AdditionalPropertiesObject{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *AdditionalPropertiesObject) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesObject) GetNameOk() (string, bool) { +func (o *AdditionalPropertiesObject) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableAdditionalPropertiesObject struct { - Value AdditionalPropertiesObject - ExplicitNull bool + value *AdditionalPropertiesObject + isSet bool +} + +func (v NullableAdditionalPropertiesObject) Get() *AdditionalPropertiesObject { + return v.value +} + +func (v *NullableAdditionalPropertiesObject) Set(val *AdditionalPropertiesObject) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesObject) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesObject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesObject(val *AdditionalPropertiesObject) *NullableAdditionalPropertiesObject { + return &NullableAdditionalPropertiesObject{value: val, isSet: true} } func (v NullableAdditionalPropertiesObject) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesObject) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go index 5165cb2e1b30..61f488297811 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_string.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type AdditionalPropertiesString struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesString() *AdditionalPropertiesString { - this := AdditionalPropertiesString{} - return &this + this := AdditionalPropertiesString{} + return &this } // NewAdditionalPropertiesStringWithDefaults instantiates a new AdditionalPropertiesString object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesStringWithDefaults() *AdditionalPropertiesString { - this := AdditionalPropertiesString{} - return &this + this := AdditionalPropertiesString{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *AdditionalPropertiesString) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesString) GetNameOk() (string, bool) { +func (o *AdditionalPropertiesString) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableAdditionalPropertiesString struct { - Value AdditionalPropertiesString - ExplicitNull bool + value *AdditionalPropertiesString + isSet bool +} + +func (v NullableAdditionalPropertiesString) Get() *AdditionalPropertiesString { + return v.value +} + +func (v *NullableAdditionalPropertiesString) Set(val *AdditionalPropertiesString) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesString) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesString(val *AdditionalPropertiesString) *NullableAdditionalPropertiesString { + return &NullableAdditionalPropertiesString{value: val, isSet: true} } func (v NullableAdditionalPropertiesString) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesString) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/client/petstore/go-experimental/go-petstore/model_animal.go index 47a4ba3a23aa..3ae97984bcd8 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_animal.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_animal.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,26 +24,26 @@ type Animal struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAnimal(className string, ) *Animal { - this := Animal{} - this.ClassName = className - var color string = "red" - this.Color = &color - return &this + this := Animal{} + this.ClassName = className + var color string = "red" + this.Color = &color + return &this } // NewAnimalWithDefaults instantiates a new Animal object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAnimalWithDefaults() *Animal { - this := Animal{} - var color string = "red" - this.Color = &color - return &this + this := Animal{} + var color string = "red" + this.Color = &color + return &this } // GetClassName returns the ClassName field value func (o *Animal) GetClassName() string { - if o == nil { + if o == nil { var ret string return ret } @@ -52,6 +51,15 @@ func (o *Animal) GetClassName() string { return o.ClassName } +// GetClassNameOk returns a tuple with the ClassName field value +// and a boolean to check if the value has been set. +func (o *Animal) GetClassNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClassName, true +} + // SetClassName sets field value func (o *Animal) SetClassName(v string) { o.ClassName = v @@ -66,14 +74,13 @@ func (o *Animal) GetColor() string { return *o.Color } -// GetColorOk returns a tuple with the Color field value if set, zero value otherwise +// GetColorOk returns a tuple with the Color field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Animal) GetColorOk() (string, bool) { +func (o *Animal) GetColorOk() (*string, bool) { if o == nil || o.Color == nil { - var ret string - return ret, false + return nil, false } - return *o.Color, true + return o.Color, true } // HasColor returns a boolean if a field has been set. @@ -90,25 +97,49 @@ func (o *Animal) SetColor(v string) { o.Color = &v } +func (o Animal) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + return json.Marshal(toSerialize) +} + type NullableAnimal struct { - Value Animal - ExplicitNull bool + value *Animal + isSet bool +} + +func (v NullableAnimal) Get() *Animal { + return v.value +} + +func (v *NullableAnimal) Set(val *Animal) { + v.value = val + v.isSet = true +} + +func (v NullableAnimal) IsSet() bool { + return v.isSet +} + +func (v *NullableAnimal) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnimal(val *Animal) *NullableAnimal { + return &NullableAnimal{value: val, isSet: true} } func (v NullableAnimal) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAnimal) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go index f150cfafa436..715916da9534 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_api_response.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -26,16 +25,16 @@ type ApiResponse struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewApiResponse() *ApiResponse { - this := ApiResponse{} - return &this + this := ApiResponse{} + return &this } // NewApiResponseWithDefaults instantiates a new ApiResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewApiResponseWithDefaults() *ApiResponse { - this := ApiResponse{} - return &this + this := ApiResponse{} + return &this } // GetCode returns the Code field value if set, zero value otherwise. @@ -47,14 +46,13 @@ func (o *ApiResponse) GetCode() int32 { return *o.Code } -// GetCodeOk returns a tuple with the Code field value if set, zero value otherwise +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetCodeOk() (int32, bool) { +func (o *ApiResponse) GetCodeOk() (*int32, bool) { if o == nil || o.Code == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Code, true + return o.Code, true } // HasCode returns a boolean if a field has been set. @@ -80,14 +78,13 @@ func (o *ApiResponse) GetType() string { return *o.Type } -// GetTypeOk returns a tuple with the Type field value if set, zero value otherwise +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetTypeOk() (string, bool) { +func (o *ApiResponse) GetTypeOk() (*string, bool) { if o == nil || o.Type == nil { - var ret string - return ret, false + return nil, false } - return *o.Type, true + return o.Type, true } // HasType returns a boolean if a field has been set. @@ -113,14 +110,13 @@ func (o *ApiResponse) GetMessage() string { return *o.Message } -// GetMessageOk returns a tuple with the Message field value if set, zero value otherwise +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetMessageOk() (string, bool) { +func (o *ApiResponse) GetMessageOk() (*string, bool) { if o == nil || o.Message == nil { - var ret string - return ret, false + return nil, false } - return *o.Message, true + return o.Message, true } // HasMessage returns a boolean if a field has been set. @@ -137,25 +133,52 @@ 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) +} + type NullableApiResponse struct { - Value ApiResponse - ExplicitNull bool + value *ApiResponse + isSet bool +} + +func (v NullableApiResponse) Get() *ApiResponse { + return v.value +} + +func (v *NullableApiResponse) Set(val *ApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiResponse(val *ApiResponse) *NullableApiResponse { + return &NullableApiResponse{value: val, isSet: true} } func (v NullableApiResponse) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableApiResponse) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go index cc9815c9873c..ce9c83bac776 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type ArrayOfArrayOfNumberOnly struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly { - this := ArrayOfArrayOfNumberOnly{} - return &this + this := ArrayOfArrayOfNumberOnly{} + return &this } // NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly { - this := ArrayOfArrayOfNumberOnly{} - return &this + this := ArrayOfArrayOfNumberOnly{} + return &this } // GetArrayArrayNumber returns the ArrayArrayNumber field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { return *o.ArrayArrayNumber } -// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, zero value otherwise +// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() (*[][]float32, bool) { if o == nil || o.ArrayArrayNumber == nil { - var ret [][]float32 - return ret, false + return nil, false } - return *o.ArrayArrayNumber, true + return o.ArrayArrayNumber, true } // HasArrayArrayNumber returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableArrayOfArrayOfNumberOnly struct { - Value ArrayOfArrayOfNumberOnly - ExplicitNull bool + value *ArrayOfArrayOfNumberOnly + isSet bool +} + +func (v NullableArrayOfArrayOfNumberOnly) Get() *ArrayOfArrayOfNumberOnly { + return v.value +} + +func (v *NullableArrayOfArrayOfNumberOnly) Set(val *ArrayOfArrayOfNumberOnly) { + v.value = val + v.isSet = true +} + +func (v NullableArrayOfArrayOfNumberOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableArrayOfArrayOfNumberOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArrayOfArrayOfNumberOnly(val *ArrayOfArrayOfNumberOnly) *NullableArrayOfArrayOfNumberOnly { + return &NullableArrayOfArrayOfNumberOnly{value: val, isSet: true} } func (v NullableArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableArrayOfArrayOfNumberOnly) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go index 49c1292100df..9c8cf80ba85a 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type ArrayOfNumberOnly struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewArrayOfNumberOnly() *ArrayOfNumberOnly { - this := ArrayOfNumberOnly{} - return &this + this := ArrayOfNumberOnly{} + return &this } // NewArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfNumberOnly object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewArrayOfNumberOnlyWithDefaults() *ArrayOfNumberOnly { - this := ArrayOfNumberOnly{} - return &this + this := ArrayOfNumberOnly{} + return &this } // GetArrayNumber returns the ArrayNumber field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { return *o.ArrayNumber } -// GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, zero value otherwise +// GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { +func (o *ArrayOfNumberOnly) GetArrayNumberOk() (*[]float32, bool) { if o == nil || o.ArrayNumber == nil { - var ret []float32 - return ret, false + return nil, false } - return *o.ArrayNumber, true + return o.ArrayNumber, true } // HasArrayNumber returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableArrayOfNumberOnly struct { - Value ArrayOfNumberOnly - ExplicitNull bool + value *ArrayOfNumberOnly + isSet bool +} + +func (v NullableArrayOfNumberOnly) Get() *ArrayOfNumberOnly { + return v.value +} + +func (v *NullableArrayOfNumberOnly) Set(val *ArrayOfNumberOnly) { + v.value = val + v.isSet = true +} + +func (v NullableArrayOfNumberOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableArrayOfNumberOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArrayOfNumberOnly(val *ArrayOfNumberOnly) *NullableArrayOfNumberOnly { + return &NullableArrayOfNumberOnly{value: val, isSet: true} } func (v NullableArrayOfNumberOnly) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableArrayOfNumberOnly) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go index 545d8338e883..05abdef65034 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_array_test_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -26,16 +25,16 @@ type ArrayTest struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewArrayTest() *ArrayTest { - this := ArrayTest{} - return &this + this := ArrayTest{} + return &this } // NewArrayTestWithDefaults instantiates a new ArrayTest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewArrayTestWithDefaults() *ArrayTest { - this := ArrayTest{} - return &this + this := ArrayTest{} + return &this } // GetArrayOfString returns the ArrayOfString field value if set, zero value otherwise. @@ -47,14 +46,13 @@ func (o *ArrayTest) GetArrayOfString() []string { return *o.ArrayOfString } -// GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, zero value otherwise +// GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { +func (o *ArrayTest) GetArrayOfStringOk() (*[]string, bool) { if o == nil || o.ArrayOfString == nil { - var ret []string - return ret, false + return nil, false } - return *o.ArrayOfString, true + return o.ArrayOfString, true } // HasArrayOfString returns a boolean if a field has been set. @@ -80,14 +78,13 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { return *o.ArrayArrayOfInteger } -// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, zero value otherwise +// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { +func (o *ArrayTest) GetArrayArrayOfIntegerOk() (*[][]int64, bool) { if o == nil || o.ArrayArrayOfInteger == nil { - var ret [][]int64 - return ret, false + return nil, false } - return *o.ArrayArrayOfInteger, true + return o.ArrayArrayOfInteger, true } // HasArrayArrayOfInteger returns a boolean if a field has been set. @@ -113,14 +110,13 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { return *o.ArrayArrayOfModel } -// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, zero value otherwise +// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { +func (o *ArrayTest) GetArrayArrayOfModelOk() (*[][]ReadOnlyFirst, bool) { if o == nil || o.ArrayArrayOfModel == nil { - var ret [][]ReadOnlyFirst - return ret, false + return nil, false } - return *o.ArrayArrayOfModel, true + return o.ArrayArrayOfModel, true } // HasArrayArrayOfModel returns a boolean if a field has been set. @@ -137,25 +133,52 @@ 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) +} + type NullableArrayTest struct { - Value ArrayTest - ExplicitNull bool + value *ArrayTest + isSet bool +} + +func (v NullableArrayTest) Get() *ArrayTest { + return v.value +} + +func (v *NullableArrayTest) Set(val *ArrayTest) { + v.value = val + v.isSet = true +} + +func (v NullableArrayTest) IsSet() bool { + return v.isSet +} + +func (v *NullableArrayTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArrayTest(val *ArrayTest) *NullableArrayTest { + return &NullableArrayTest{value: val, isSet: true} } func (v NullableArrayTest) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableArrayTest) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go index 28ba49d4af15..a853e71eb4c9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_big_cat.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type BigCat struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewBigCat() *BigCat { - this := BigCat{} - return &this + this := BigCat{} + return &this } // NewBigCatWithDefaults instantiates a new BigCat object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewBigCatWithDefaults() *BigCat { - this := BigCat{} - return &this + this := BigCat{} + return &this } // GetKind returns the Kind field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *BigCat) GetKind() string { return *o.Kind } -// GetKindOk returns a tuple with the Kind field value if set, zero value otherwise +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *BigCat) GetKindOk() (string, bool) { +func (o *BigCat) GetKindOk() (*string, bool) { if o == nil || o.Kind == nil { - var ret string - return ret, false + return nil, false } - return *o.Kind, true + return o.Kind, true } // HasKind returns a boolean if a field has been set. @@ -70,25 +68,54 @@ func (o *BigCat) SetKind(v string) { o.Kind = &v } +func (o BigCat) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + serializedCat, errCat := json.Marshal(o.Cat) + if errCat != nil { + return []byte{}, errCat + } + errCat = json.Unmarshal([]byte(serializedCat), &toSerialize) + if errCat != nil { + return []byte{}, errCat + } + if o.Kind != nil { + toSerialize["kind"] = o.Kind + } + return json.Marshal(toSerialize) +} + type NullableBigCat struct { - Value BigCat - ExplicitNull bool + value *BigCat + isSet bool +} + +func (v NullableBigCat) Get() *BigCat { + return v.value +} + +func (v *NullableBigCat) Set(val *BigCat) { + v.value = val + v.isSet = true +} + +func (v NullableBigCat) IsSet() bool { + return v.isSet +} + +func (v *NullableBigCat) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBigCat(val *BigCat) *NullableBigCat { + return &NullableBigCat{value: val, isSet: true} } func (v NullableBigCat) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableBigCat) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go index eccdf4fb4a2f..154ce487dbd1 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_big_cat_all_of.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type BigCatAllOf struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewBigCatAllOf() *BigCatAllOf { - this := BigCatAllOf{} - return &this + this := BigCatAllOf{} + return &this } // NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewBigCatAllOfWithDefaults() *BigCatAllOf { - this := BigCatAllOf{} - return &this + this := BigCatAllOf{} + return &this } // GetKind returns the Kind field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *BigCatAllOf) GetKind() string { return *o.Kind } -// GetKindOk returns a tuple with the Kind field value if set, zero value otherwise +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *BigCatAllOf) GetKindOk() (string, bool) { +func (o *BigCatAllOf) GetKindOk() (*string, bool) { if o == nil || o.Kind == nil { - var ret string - return ret, false + return nil, false } - return *o.Kind, true + return o.Kind, true } // HasKind returns a boolean if a field has been set. @@ -69,25 +67,46 @@ func (o *BigCatAllOf) SetKind(v string) { o.Kind = &v } +func (o BigCatAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Kind != nil { + toSerialize["kind"] = o.Kind + } + return json.Marshal(toSerialize) +} + type NullableBigCatAllOf struct { - Value BigCatAllOf - ExplicitNull bool + value *BigCatAllOf + isSet bool +} + +func (v NullableBigCatAllOf) Get() *BigCatAllOf { + return v.value +} + +func (v *NullableBigCatAllOf) Set(val *BigCatAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableBigCatAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableBigCatAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBigCatAllOf(val *BigCatAllOf) *NullableBigCatAllOf { + return &NullableBigCatAllOf{value: val, isSet: true} } func (v NullableBigCatAllOf) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableBigCatAllOf) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go index d1198ae8602e..bd950d64273d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_capitalization.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -30,16 +29,16 @@ type Capitalization struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewCapitalization() *Capitalization { - this := Capitalization{} - return &this + this := Capitalization{} + return &this } // NewCapitalizationWithDefaults instantiates a new Capitalization object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewCapitalizationWithDefaults() *Capitalization { - this := Capitalization{} - return &this + this := Capitalization{} + return &this } // GetSmallCamel returns the SmallCamel field value if set, zero value otherwise. @@ -51,14 +50,13 @@ func (o *Capitalization) GetSmallCamel() string { return *o.SmallCamel } -// GetSmallCamelOk returns a tuple with the SmallCamel field value if set, zero value otherwise +// GetSmallCamelOk returns a tuple with the SmallCamel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetSmallCamelOk() (string, bool) { +func (o *Capitalization) GetSmallCamelOk() (*string, bool) { if o == nil || o.SmallCamel == nil { - var ret string - return ret, false + return nil, false } - return *o.SmallCamel, true + return o.SmallCamel, true } // HasSmallCamel returns a boolean if a field has been set. @@ -84,14 +82,13 @@ func (o *Capitalization) GetCapitalCamel() string { return *o.CapitalCamel } -// GetCapitalCamelOk returns a tuple with the CapitalCamel field value if set, zero value otherwise +// GetCapitalCamelOk returns a tuple with the CapitalCamel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetCapitalCamelOk() (string, bool) { +func (o *Capitalization) GetCapitalCamelOk() (*string, bool) { if o == nil || o.CapitalCamel == nil { - var ret string - return ret, false + return nil, false } - return *o.CapitalCamel, true + return o.CapitalCamel, true } // HasCapitalCamel returns a boolean if a field has been set. @@ -117,14 +114,13 @@ func (o *Capitalization) GetSmallSnake() string { return *o.SmallSnake } -// GetSmallSnakeOk returns a tuple with the SmallSnake field value if set, zero value otherwise +// GetSmallSnakeOk returns a tuple with the SmallSnake field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetSmallSnakeOk() (string, bool) { +func (o *Capitalization) GetSmallSnakeOk() (*string, bool) { if o == nil || o.SmallSnake == nil { - var ret string - return ret, false + return nil, false } - return *o.SmallSnake, true + return o.SmallSnake, true } // HasSmallSnake returns a boolean if a field has been set. @@ -150,14 +146,13 @@ func (o *Capitalization) GetCapitalSnake() string { return *o.CapitalSnake } -// GetCapitalSnakeOk returns a tuple with the CapitalSnake field value if set, zero value otherwise +// GetCapitalSnakeOk returns a tuple with the CapitalSnake field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetCapitalSnakeOk() (string, bool) { +func (o *Capitalization) GetCapitalSnakeOk() (*string, bool) { if o == nil || o.CapitalSnake == nil { - var ret string - return ret, false + return nil, false } - return *o.CapitalSnake, true + return o.CapitalSnake, true } // HasCapitalSnake returns a boolean if a field has been set. @@ -183,14 +178,13 @@ func (o *Capitalization) GetSCAETHFlowPoints() string { return *o.SCAETHFlowPoints } -// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field value if set, zero value otherwise +// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) { +func (o *Capitalization) GetSCAETHFlowPointsOk() (*string, bool) { if o == nil || o.SCAETHFlowPoints == nil { - var ret string - return ret, false + return nil, false } - return *o.SCAETHFlowPoints, true + return o.SCAETHFlowPoints, true } // HasSCAETHFlowPoints returns a boolean if a field has been set. @@ -216,14 +210,13 @@ func (o *Capitalization) GetATT_NAME() string { return *o.ATT_NAME } -// GetATT_NAMEOk returns a tuple with the ATT_NAME field value if set, zero value otherwise +// GetATT_NAMEOk returns a tuple with the ATT_NAME field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetATT_NAMEOk() (string, bool) { +func (o *Capitalization) GetATT_NAMEOk() (*string, bool) { if o == nil || o.ATT_NAME == nil { - var ret string - return ret, false + return nil, false } - return *o.ATT_NAME, true + return o.ATT_NAME, true } // HasATT_NAME returns a boolean if a field has been set. @@ -240,25 +233,61 @@ 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) +} + type NullableCapitalization struct { - Value Capitalization - ExplicitNull bool + value *Capitalization + isSet bool +} + +func (v NullableCapitalization) Get() *Capitalization { + return v.value +} + +func (v *NullableCapitalization) Set(val *Capitalization) { + v.value = val + v.isSet = true +} + +func (v NullableCapitalization) IsSet() bool { + return v.isSet +} + +func (v *NullableCapitalization) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCapitalization(val *Capitalization) *NullableCapitalization { + return &NullableCapitalization{value: val, isSet: true} } func (v NullableCapitalization) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableCapitalization) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/client/petstore/go-experimental/go-petstore/model_cat.go index 4660d0cca093..fa7fe3699da1 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type Cat struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewCat() *Cat { - this := Cat{} - return &this + this := Cat{} + return &this } // NewCatWithDefaults instantiates a new Cat object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewCatWithDefaults() *Cat { - this := Cat{} - return &this + this := Cat{} + return &this } // GetDeclawed returns the Declawed field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *Cat) GetDeclawed() bool { return *o.Declawed } -// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise +// GetDeclawedOk returns a tuple with the Declawed field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Cat) GetDeclawedOk() (bool, bool) { +func (o *Cat) GetDeclawedOk() (*bool, bool) { if o == nil || o.Declawed == nil { - var ret bool - return ret, false + return nil, false } - return *o.Declawed, true + return o.Declawed, true } // HasDeclawed returns a boolean if a field has been set. @@ -70,25 +68,54 @@ func (o *Cat) SetDeclawed(v bool) { o.Declawed = &v } +func (o Cat) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + serializedAnimal, errAnimal := json.Marshal(o.Animal) + if errAnimal != nil { + return []byte{}, errAnimal + } + errAnimal = json.Unmarshal([]byte(serializedAnimal), &toSerialize) + if errAnimal != nil { + return []byte{}, errAnimal + } + if o.Declawed != nil { + toSerialize["declawed"] = o.Declawed + } + return json.Marshal(toSerialize) +} + type NullableCat struct { - Value Cat - ExplicitNull bool + value *Cat + isSet bool +} + +func (v NullableCat) Get() *Cat { + return v.value +} + +func (v *NullableCat) Set(val *Cat) { + v.value = val + v.isSet = true +} + +func (v NullableCat) IsSet() bool { + return v.isSet +} + +func (v *NullableCat) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCat(val *Cat) *NullableCat { + return &NullableCat{value: val, isSet: true} } func (v NullableCat) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableCat) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go index 27e6189a1e63..3ed56df463eb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_cat_all_of.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type CatAllOf struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewCatAllOf() *CatAllOf { - this := CatAllOf{} - return &this + this := CatAllOf{} + return &this } // NewCatAllOfWithDefaults instantiates a new CatAllOf object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewCatAllOfWithDefaults() *CatAllOf { - this := CatAllOf{} - return &this + this := CatAllOf{} + return &this } // GetDeclawed returns the Declawed field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *CatAllOf) GetDeclawed() bool { return *o.Declawed } -// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise +// GetDeclawedOk returns a tuple with the Declawed field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatAllOf) GetDeclawedOk() (bool, bool) { +func (o *CatAllOf) GetDeclawedOk() (*bool, bool) { if o == nil || o.Declawed == nil { - var ret bool - return ret, false + return nil, false } - return *o.Declawed, true + return o.Declawed, true } // HasDeclawed returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableCatAllOf struct { - Value CatAllOf - ExplicitNull bool + value *CatAllOf + isSet bool +} + +func (v NullableCatAllOf) Get() *CatAllOf { + return v.value +} + +func (v *NullableCatAllOf) Set(val *CatAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableCatAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableCatAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCatAllOf(val *CatAllOf) *NullableCatAllOf { + return &NullableCatAllOf{value: val, isSet: true} } func (v NullableCatAllOf) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_category.go b/samples/client/petstore/go-experimental/go-petstore/model_category.go index f3a22034c482..df490d1668f9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_category.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_category.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,19 +24,19 @@ type Category struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewCategory(name string, ) *Category { - this := Category{} - this.Name = name - return &this + this := Category{} + this.Name = name + return &this } // NewCategoryWithDefaults instantiates a new Category object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewCategoryWithDefaults() *Category { - this := Category{} - var name string = "default-name" - this.Name = name - return &this + this := Category{} + var name string = "default-name" + this.Name = name + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -49,14 +48,13 @@ func (o *Category) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Category) GetIdOk() (int64, bool) { +func (o *Category) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -75,7 +73,7 @@ func (o *Category) SetId(v int64) { // GetName returns the Name field value func (o *Category) GetName() string { - if o == nil { + if o == nil { var ret string return ret } @@ -83,30 +81,63 @@ func (o *Category) GetName() string { return o.Name } +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Category) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + // SetName sets field value 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 true { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + type NullableCategory struct { - Value Category - ExplicitNull bool + value *Category + isSet bool +} + +func (v NullableCategory) Get() *Category { + return v.value +} + +func (v *NullableCategory) Set(val *Category) { + v.value = val + v.isSet = true +} + +func (v NullableCategory) IsSet() bool { + return v.isSet +} + +func (v *NullableCategory) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCategory(val *Category) *NullableCategory { + return &NullableCategory{value: val, isSet: true} } func (v NullableCategory) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableCategory) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go index cdc48b1bd9d0..518bf54ac3d9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_class_model.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_class_model.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type ClassModel struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewClassModel() *ClassModel { - this := ClassModel{} - return &this + this := ClassModel{} + return &this } // NewClassModelWithDefaults instantiates a new ClassModel object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewClassModelWithDefaults() *ClassModel { - this := ClassModel{} - return &this + this := ClassModel{} + return &this } // GetClass returns the Class field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *ClassModel) GetClass() string { return *o.Class } -// GetClassOk returns a tuple with the Class field value if set, zero value otherwise +// GetClassOk returns a tuple with the Class field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ClassModel) GetClassOk() (string, bool) { +func (o *ClassModel) GetClassOk() (*string, bool) { if o == nil || o.Class == nil { - var ret string - return ret, false + return nil, false } - return *o.Class, true + return o.Class, true } // HasClass returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableClassModel struct { - Value ClassModel - ExplicitNull bool + value *ClassModel + isSet bool +} + +func (v NullableClassModel) Get() *ClassModel { + return v.value +} + +func (v *NullableClassModel) Set(val *ClassModel) { + v.value = val + v.isSet = true +} + +func (v NullableClassModel) IsSet() bool { + return v.isSet +} + +func (v *NullableClassModel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClassModel(val *ClassModel) *NullableClassModel { + return &NullableClassModel{value: val, isSet: true} } func (v NullableClassModel) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableClassModel) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_client.go b/samples/client/petstore/go-experimental/go-petstore/model_client.go index 447c7e2da53a..cfc309393b16 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_client.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_client.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type Client struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewClient() *Client { - this := Client{} - return &this + this := Client{} + return &this } // NewClientWithDefaults instantiates a new Client object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewClientWithDefaults() *Client { - this := Client{} - return &this + this := Client{} + return &this } // GetClient returns the Client field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *Client) GetClient() string { return *o.Client } -// GetClientOk returns a tuple with the Client field value if set, zero value otherwise +// GetClientOk returns a tuple with the Client field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Client) GetClientOk() (string, bool) { +func (o *Client) GetClientOk() (*string, bool) { if o == nil || o.Client == nil { - var ret string - return ret, false + return nil, false } - return *o.Client, true + return o.Client, true } // HasClient returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableClient struct { - Value Client - ExplicitNull bool + value *Client + isSet bool +} + +func (v NullableClient) Get() *Client { + return v.value +} + +func (v *NullableClient) Set(val *Client) { + v.value = val + v.isSet = true +} + +func (v NullableClient) IsSet() bool { + return v.isSet +} + +func (v *NullableClient) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClient(val *Client) *NullableClient { + return &NullableClient{value: val, isSet: true} } func (v NullableClient) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableClient) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/client/petstore/go-experimental/go-petstore/model_dog.go index 4bbfbc208ded..607dcf455c57 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type Dog struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewDog() *Dog { - this := Dog{} - return &this + this := Dog{} + return &this } // NewDogWithDefaults instantiates a new Dog object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewDogWithDefaults() *Dog { - this := Dog{} - return &this + this := Dog{} + return &this } // GetBreed returns the Breed field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *Dog) GetBreed() string { return *o.Breed } -// GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise +// GetBreedOk returns a tuple with the Breed field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Dog) GetBreedOk() (string, bool) { +func (o *Dog) GetBreedOk() (*string, bool) { if o == nil || o.Breed == nil { - var ret string - return ret, false + return nil, false } - return *o.Breed, true + return o.Breed, true } // HasBreed returns a boolean if a field has been set. @@ -70,25 +68,54 @@ func (o *Dog) SetBreed(v string) { o.Breed = &v } +func (o Dog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + serializedAnimal, errAnimal := json.Marshal(o.Animal) + if errAnimal != nil { + return []byte{}, errAnimal + } + errAnimal = json.Unmarshal([]byte(serializedAnimal), &toSerialize) + if errAnimal != nil { + return []byte{}, errAnimal + } + if o.Breed != nil { + toSerialize["breed"] = o.Breed + } + return json.Marshal(toSerialize) +} + type NullableDog struct { - Value Dog - ExplicitNull bool + value *Dog + isSet bool +} + +func (v NullableDog) Get() *Dog { + return v.value +} + +func (v *NullableDog) Set(val *Dog) { + v.value = val + v.isSet = true +} + +func (v NullableDog) IsSet() bool { + return v.isSet +} + +func (v *NullableDog) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDog(val *Dog) *NullableDog { + return &NullableDog{value: val, isSet: true} } func (v NullableDog) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableDog) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go index 27cc1210b4b1..e30f7fafba61 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_dog_all_of.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type DogAllOf struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewDogAllOf() *DogAllOf { - this := DogAllOf{} - return &this + this := DogAllOf{} + return &this } // NewDogAllOfWithDefaults instantiates a new DogAllOf object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewDogAllOfWithDefaults() *DogAllOf { - this := DogAllOf{} - return &this + this := DogAllOf{} + return &this } // GetBreed returns the Breed field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *DogAllOf) GetBreed() string { return *o.Breed } -// GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise +// GetBreedOk returns a tuple with the Breed field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DogAllOf) GetBreedOk() (string, bool) { +func (o *DogAllOf) GetBreedOk() (*string, bool) { if o == nil || o.Breed == nil { - var ret string - return ret, false + return nil, false } - return *o.Breed, true + return o.Breed, true } // HasBreed returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableDogAllOf struct { - Value DogAllOf - ExplicitNull bool + value *DogAllOf + isSet bool +} + +func (v NullableDogAllOf) Get() *DogAllOf { + return v.value +} + +func (v *NullableDogAllOf) Set(val *DogAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableDogAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableDogAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDogAllOf(val *DogAllOf) *NullableDogAllOf { + return &NullableDogAllOf{value: val, isSet: true} } func (v NullableDogAllOf) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go index fe411a091b55..edc98c6ee478 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_arrays.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type EnumArrays struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewEnumArrays() *EnumArrays { - this := EnumArrays{} - return &this + this := EnumArrays{} + return &this } // NewEnumArraysWithDefaults instantiates a new EnumArrays object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewEnumArraysWithDefaults() *EnumArrays { - this := EnumArrays{} - return &this + this := EnumArrays{} + return &this } // GetJustSymbol returns the JustSymbol field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *EnumArrays) GetJustSymbol() string { return *o.JustSymbol } -// GetJustSymbolOk returns a tuple with the JustSymbol field value if set, zero value otherwise +// GetJustSymbolOk returns a tuple with the JustSymbol field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumArrays) GetJustSymbolOk() (string, bool) { +func (o *EnumArrays) GetJustSymbolOk() (*string, bool) { if o == nil || o.JustSymbol == nil { - var ret string - return ret, false + return nil, false } - return *o.JustSymbol, true + return o.JustSymbol, true } // HasJustSymbol returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *EnumArrays) GetArrayEnum() []string { return *o.ArrayEnum } -// GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, zero value otherwise +// GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { +func (o *EnumArrays) GetArrayEnumOk() (*[]string, bool) { if o == nil || o.ArrayEnum == nil { - var ret []string - return ret, false + return nil, false } - return *o.ArrayEnum, true + return o.ArrayEnum, true } // HasArrayEnum returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableEnumArrays struct { - Value EnumArrays - ExplicitNull bool + value *EnumArrays + isSet bool +} + +func (v NullableEnumArrays) Get() *EnumArrays { + return v.value +} + +func (v *NullableEnumArrays) Set(val *EnumArrays) { + v.value = val + v.isSet = true +} + +func (v NullableEnumArrays) IsSet() bool { + return v.isSet +} + +func (v *NullableEnumArrays) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnumArrays(val *EnumArrays) *NullableEnumArrays { + return &NullableEnumArrays{value: val, isSet: true} } func (v NullableEnumArrays) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableEnumArrays) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go index 4311401eac6d..f4af6d98a7aa 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_class.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,24 +24,37 @@ const ( ) type NullableEnumClass struct { - Value EnumClass - ExplicitNull bool + value *EnumClass + isSet bool +} + +func (v NullableEnumClass) Get() *EnumClass { + return v.value +} + +func (v *NullableEnumClass) Set(val *EnumClass) { + v.value = val + v.isSet = true +} + +func (v NullableEnumClass) IsSet() bool { + return v.isSet +} + +func (v *NullableEnumClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnumClass(val *EnumClass) *NullableEnumClass { + return &NullableEnumClass{value: val, isSet: true} } func (v NullableEnumClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableEnumClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go index 322b3cc75991..ac8736d7f8b9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_enum_test_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -28,17 +27,17 @@ type EnumTest struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewEnumTest(enumStringRequired string, ) *EnumTest { - this := EnumTest{} - this.EnumStringRequired = enumStringRequired - return &this + this := EnumTest{} + this.EnumStringRequired = enumStringRequired + return &this } // NewEnumTestWithDefaults instantiates a new EnumTest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewEnumTestWithDefaults() *EnumTest { - this := EnumTest{} - return &this + this := EnumTest{} + return &this } // GetEnumString returns the EnumString field value if set, zero value otherwise. @@ -50,14 +49,13 @@ func (o *EnumTest) GetEnumString() string { return *o.EnumString } -// GetEnumStringOk returns a tuple with the EnumString field value if set, zero value otherwise +// GetEnumStringOk returns a tuple with the EnumString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetEnumStringOk() (string, bool) { +func (o *EnumTest) GetEnumStringOk() (*string, bool) { if o == nil || o.EnumString == nil { - var ret string - return ret, false + return nil, false } - return *o.EnumString, true + return o.EnumString, true } // HasEnumString returns a boolean if a field has been set. @@ -76,7 +74,7 @@ func (o *EnumTest) SetEnumString(v string) { // GetEnumStringRequired returns the EnumStringRequired field value func (o *EnumTest) GetEnumStringRequired() string { - if o == nil { + if o == nil { var ret string return ret } @@ -84,6 +82,15 @@ func (o *EnumTest) GetEnumStringRequired() string { return o.EnumStringRequired } +// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field value +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumStringRequiredOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EnumStringRequired, true +} + // SetEnumStringRequired sets field value func (o *EnumTest) SetEnumStringRequired(v string) { o.EnumStringRequired = v @@ -98,14 +105,13 @@ func (o *EnumTest) GetEnumInteger() int32 { return *o.EnumInteger } -// GetEnumIntegerOk returns a tuple with the EnumInteger field value if set, zero value otherwise +// GetEnumIntegerOk returns a tuple with the EnumInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetEnumIntegerOk() (int32, bool) { +func (o *EnumTest) GetEnumIntegerOk() (*int32, bool) { if o == nil || o.EnumInteger == nil { - var ret int32 - return ret, false + return nil, false } - return *o.EnumInteger, true + return o.EnumInteger, true } // HasEnumInteger returns a boolean if a field has been set. @@ -131,14 +137,13 @@ func (o *EnumTest) GetEnumNumber() float64 { return *o.EnumNumber } -// GetEnumNumberOk returns a tuple with the EnumNumber field value if set, zero value otherwise +// GetEnumNumberOk returns a tuple with the EnumNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetEnumNumberOk() (float64, bool) { +func (o *EnumTest) GetEnumNumberOk() (*float64, bool) { if o == nil || o.EnumNumber == nil { - var ret float64 - return ret, false + return nil, false } - return *o.EnumNumber, true + return o.EnumNumber, true } // HasEnumNumber returns a boolean if a field has been set. @@ -164,14 +169,13 @@ func (o *EnumTest) GetOuterEnum() OuterEnum { return *o.OuterEnum } -// GetOuterEnumOk returns a tuple with the OuterEnum field value if set, zero value otherwise +// GetOuterEnumOk returns a tuple with the OuterEnum field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) { +func (o *EnumTest) GetOuterEnumOk() (*OuterEnum, bool) { if o == nil || o.OuterEnum == nil { - var ret OuterEnum - return ret, false + return nil, false } - return *o.OuterEnum, true + return o.OuterEnum, true } // HasOuterEnum returns a boolean if a field has been set. @@ -188,25 +192,58 @@ 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 true { + 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) +} + type NullableEnumTest struct { - Value EnumTest - ExplicitNull bool + value *EnumTest + isSet bool +} + +func (v NullableEnumTest) Get() *EnumTest { + return v.value +} + +func (v *NullableEnumTest) Set(val *EnumTest) { + v.value = val + v.isSet = true +} + +func (v NullableEnumTest) IsSet() bool { + return v.isSet +} + +func (v *NullableEnumTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnumTest(val *EnumTest) *NullableEnumTest { + return &NullableEnumTest{value: val, isSet: true} } func (v NullableEnumTest) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableEnumTest) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file.go b/samples/client/petstore/go-experimental/go-petstore/model_file.go index 82e4bc173f80..61d028327e0b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_file.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_file.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type File struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewFile() *File { - this := File{} - return &this + this := File{} + return &this } // NewFileWithDefaults instantiates a new File object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewFileWithDefaults() *File { - this := File{} - return &this + this := File{} + return &this } // GetSourceURI returns the SourceURI field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *File) GetSourceURI() string { return *o.SourceURI } -// GetSourceURIOk returns a tuple with the SourceURI field value if set, zero value otherwise +// GetSourceURIOk returns a tuple with the SourceURI field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *File) GetSourceURIOk() (string, bool) { +func (o *File) GetSourceURIOk() (*string, bool) { if o == nil || o.SourceURI == nil { - var ret string - return ret, false + return nil, false } - return *o.SourceURI, true + return o.SourceURI, true } // HasSourceURI returns a boolean if a field has been set. @@ -70,25 +68,46 @@ 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) +} + type NullableFile struct { - Value File - ExplicitNull bool + value *File + isSet bool +} + +func (v NullableFile) Get() *File { + return v.value +} + +func (v *NullableFile) Set(val *File) { + v.value = val + v.isSet = true +} + +func (v NullableFile) IsSet() bool { + return v.isSet +} + +func (v *NullableFile) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFile(val *File) *NullableFile { + return &NullableFile{value: val, isSet: true} } func (v NullableFile) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFile) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go index 74fbd77e22d0..92b799a61630 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type FileSchemaTestClass struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewFileSchemaTestClass() *FileSchemaTestClass { - this := FileSchemaTestClass{} - return &this + this := FileSchemaTestClass{} + return &this } // NewFileSchemaTestClassWithDefaults instantiates a new FileSchemaTestClass object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewFileSchemaTestClassWithDefaults() *FileSchemaTestClass { - this := FileSchemaTestClass{} - return &this + this := FileSchemaTestClass{} + return &this } // GetFile returns the File field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *FileSchemaTestClass) GetFile() File { return *o.File } -// GetFileOk returns a tuple with the File field value if set, zero value otherwise +// GetFileOk returns a tuple with the File field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FileSchemaTestClass) GetFileOk() (File, bool) { +func (o *FileSchemaTestClass) GetFileOk() (*File, bool) { if o == nil || o.File == nil { - var ret File - return ret, false + return nil, false } - return *o.File, true + return o.File, true } // HasFile returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *FileSchemaTestClass) GetFiles() []File { return *o.Files } -// GetFilesOk returns a tuple with the Files field value if set, zero value otherwise +// GetFilesOk returns a tuple with the Files field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { +func (o *FileSchemaTestClass) GetFilesOk() (*[]File, bool) { if o == nil || o.Files == nil { - var ret []File - return ret, false + return nil, false } - return *o.Files, true + return o.Files, true } // HasFiles returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableFileSchemaTestClass struct { - Value FileSchemaTestClass - ExplicitNull bool + value *FileSchemaTestClass + isSet bool +} + +func (v NullableFileSchemaTestClass) Get() *FileSchemaTestClass { + return v.value +} + +func (v *NullableFileSchemaTestClass) Set(val *FileSchemaTestClass) { + v.value = val + v.isSet = true +} + +func (v NullableFileSchemaTestClass) IsSet() bool { + return v.isSet +} + +func (v *NullableFileSchemaTestClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileSchemaTestClass(val *FileSchemaTestClass) *NullableFileSchemaTestClass { + return &NullableFileSchemaTestClass{value: val, isSet: true} } func (v NullableFileSchemaTestClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFileSchemaTestClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go index 18255609dc99..40108c960049 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "os" "time" @@ -39,20 +38,20 @@ type FormatTest struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewFormatTest(number float32, byte_ string, date string, password string, ) *FormatTest { - this := FormatTest{} - this.Number = number - this.Byte = byte_ - this.Date = date - this.Password = password - return &this + this := FormatTest{} + this.Number = number + this.Byte = byte_ + this.Date = date + this.Password = password + return &this } // NewFormatTestWithDefaults instantiates a new FormatTest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewFormatTestWithDefaults() *FormatTest { - this := FormatTest{} - return &this + this := FormatTest{} + return &this } // GetInteger returns the Integer field value if set, zero value otherwise. @@ -64,14 +63,13 @@ func (o *FormatTest) GetInteger() int32 { return *o.Integer } -// GetIntegerOk returns a tuple with the Integer field value if set, zero value otherwise +// GetIntegerOk returns a tuple with the Integer field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetIntegerOk() (int32, bool) { +func (o *FormatTest) GetIntegerOk() (*int32, bool) { if o == nil || o.Integer == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Integer, true + return o.Integer, true } // HasInteger returns a boolean if a field has been set. @@ -97,14 +95,13 @@ func (o *FormatTest) GetInt32() int32 { return *o.Int32 } -// GetInt32Ok returns a tuple with the Int32 field value if set, zero value otherwise +// GetInt32Ok returns a tuple with the Int32 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetInt32Ok() (int32, bool) { +func (o *FormatTest) GetInt32Ok() (*int32, bool) { if o == nil || o.Int32 == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Int32, true + return o.Int32, true } // HasInt32 returns a boolean if a field has been set. @@ -130,14 +127,13 @@ func (o *FormatTest) GetInt64() int64 { return *o.Int64 } -// GetInt64Ok returns a tuple with the Int64 field value if set, zero value otherwise +// GetInt64Ok returns a tuple with the Int64 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetInt64Ok() (int64, bool) { +func (o *FormatTest) GetInt64Ok() (*int64, bool) { if o == nil || o.Int64 == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Int64, true + return o.Int64, true } // HasInt64 returns a boolean if a field has been set. @@ -156,7 +152,7 @@ func (o *FormatTest) SetInt64(v int64) { // GetNumber returns the Number field value func (o *FormatTest) GetNumber() float32 { - if o == nil { + if o == nil { var ret float32 return ret } @@ -164,6 +160,15 @@ func (o *FormatTest) GetNumber() float32 { return o.Number } +// GetNumberOk returns a tuple with the Number field value +// and a boolean to check if the value has been set. +func (o *FormatTest) GetNumberOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Number, true +} + // SetNumber sets field value func (o *FormatTest) SetNumber(v float32) { o.Number = v @@ -178,14 +183,13 @@ func (o *FormatTest) GetFloat() float32 { return *o.Float } -// GetFloatOk returns a tuple with the Float field value if set, zero value otherwise +// GetFloatOk returns a tuple with the Float field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetFloatOk() (float32, bool) { +func (o *FormatTest) GetFloatOk() (*float32, bool) { if o == nil || o.Float == nil { - var ret float32 - return ret, false + return nil, false } - return *o.Float, true + return o.Float, true } // HasFloat returns a boolean if a field has been set. @@ -211,14 +215,13 @@ func (o *FormatTest) GetDouble() float64 { return *o.Double } -// GetDoubleOk returns a tuple with the Double field value if set, zero value otherwise +// GetDoubleOk returns a tuple with the Double field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetDoubleOk() (float64, bool) { +func (o *FormatTest) GetDoubleOk() (*float64, bool) { if o == nil || o.Double == nil { - var ret float64 - return ret, false + return nil, false } - return *o.Double, true + return o.Double, true } // HasDouble returns a boolean if a field has been set. @@ -244,14 +247,13 @@ func (o *FormatTest) GetString() string { return *o.String } -// GetStringOk returns a tuple with the String field value if set, zero value otherwise +// GetStringOk returns a tuple with the String field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetStringOk() (string, bool) { +func (o *FormatTest) GetStringOk() (*string, bool) { if o == nil || o.String == nil { - var ret string - return ret, false + return nil, false } - return *o.String, true + return o.String, true } // HasString returns a boolean if a field has been set. @@ -270,7 +272,7 @@ func (o *FormatTest) SetString(v string) { // GetByte returns the Byte field value func (o *FormatTest) GetByte() string { - if o == nil { + if o == nil { var ret string return ret } @@ -278,6 +280,15 @@ func (o *FormatTest) GetByte() string { return o.Byte } +// GetByteOk returns a tuple with the Byte field value +// and a boolean to check if the value has been set. +func (o *FormatTest) GetByteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Byte, true +} + // SetByte sets field value func (o *FormatTest) SetByte(v string) { o.Byte = v @@ -292,14 +303,13 @@ func (o *FormatTest) GetBinary() *os.File { return *o.Binary } -// GetBinaryOk returns a tuple with the Binary field value if set, zero value otherwise +// GetBinaryOk returns a tuple with the Binary field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetBinaryOk() (*os.File, bool) { +func (o *FormatTest) GetBinaryOk() (**os.File, bool) { if o == nil || o.Binary == nil { - var ret *os.File - return ret, false + return nil, false } - return *o.Binary, true + return o.Binary, true } // HasBinary returns a boolean if a field has been set. @@ -318,7 +328,7 @@ func (o *FormatTest) SetBinary(v *os.File) { // GetDate returns the Date field value func (o *FormatTest) GetDate() string { - if o == nil { + if o == nil { var ret string return ret } @@ -326,6 +336,15 @@ func (o *FormatTest) GetDate() string { return o.Date } +// GetDateOk returns a tuple with the Date field value +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Date, true +} + // SetDate sets field value func (o *FormatTest) SetDate(v string) { o.Date = v @@ -340,14 +359,13 @@ func (o *FormatTest) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetDateTimeOk() (time.Time, bool) { +func (o *FormatTest) GetDateTimeOk() (*time.Time, bool) { if o == nil || o.DateTime == nil { - var ret time.Time - return ret, false + return nil, false } - return *o.DateTime, true + return o.DateTime, true } // HasDateTime returns a boolean if a field has been set. @@ -373,14 +391,13 @@ func (o *FormatTest) GetUuid() string { return *o.Uuid } -// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetUuidOk() (string, bool) { +func (o *FormatTest) GetUuidOk() (*string, bool) { if o == nil || o.Uuid == nil { - var ret string - return ret, false + return nil, false } - return *o.Uuid, true + return o.Uuid, true } // HasUuid returns a boolean if a field has been set. @@ -399,7 +416,7 @@ func (o *FormatTest) SetUuid(v string) { // GetPassword returns the Password field value func (o *FormatTest) GetPassword() string { - if o == nil { + if o == nil { var ret string return ret } @@ -407,6 +424,15 @@ func (o *FormatTest) GetPassword() string { return o.Password } +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *FormatTest) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + // SetPassword sets field value func (o *FormatTest) SetPassword(v string) { o.Password = v @@ -421,14 +447,13 @@ func (o *FormatTest) GetBigDecimal() float64 { return *o.BigDecimal } -// GetBigDecimalOk returns a tuple with the BigDecimal field value if set, zero value otherwise +// GetBigDecimalOk returns a tuple with the BigDecimal field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetBigDecimalOk() (float64, bool) { +func (o *FormatTest) GetBigDecimalOk() (*float64, bool) { if o == nil || o.BigDecimal == nil { - var ret float64 - return ret, false + return nil, false } - return *o.BigDecimal, true + return o.BigDecimal, true } // HasBigDecimal returns a boolean if a field has been set. @@ -445,25 +470,85 @@ func (o *FormatTest) SetBigDecimal(v float64) { o.BigDecimal = &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 true { + 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 true { + toSerialize["byte"] = o.Byte + } + if o.Binary != nil { + toSerialize["binary"] = o.Binary + } + if true { + toSerialize["date"] = o.Date + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Uuid != nil { + toSerialize["uuid"] = o.Uuid + } + if true { + toSerialize["password"] = o.Password + } + if o.BigDecimal != nil { + toSerialize["BigDecimal"] = o.BigDecimal + } + return json.Marshal(toSerialize) +} + type NullableFormatTest struct { - Value FormatTest - ExplicitNull bool + value *FormatTest + isSet bool +} + +func (v NullableFormatTest) Get() *FormatTest { + return v.value +} + +func (v *NullableFormatTest) Set(val *FormatTest) { + v.value = val + v.isSet = true +} + +func (v NullableFormatTest) IsSet() bool { + return v.isSet +} + +func (v *NullableFormatTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFormatTest(val *FormatTest) *NullableFormatTest { + return &NullableFormatTest{value: val, isSet: true} } func (v NullableFormatTest) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFormatTest) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go index b6d1dd64eee3..98d282bb39b3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type HasOnlyReadOnly struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewHasOnlyReadOnly() *HasOnlyReadOnly { - this := HasOnlyReadOnly{} - return &this + this := HasOnlyReadOnly{} + return &this } // NewHasOnlyReadOnlyWithDefaults instantiates a new HasOnlyReadOnly object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewHasOnlyReadOnlyWithDefaults() *HasOnlyReadOnly { - this := HasOnlyReadOnly{} - return &this + this := HasOnlyReadOnly{} + return &this } // GetBar returns the Bar field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *HasOnlyReadOnly) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HasOnlyReadOnly) GetBarOk() (string, bool) { +func (o *HasOnlyReadOnly) GetBarOk() (*string, bool) { if o == nil || o.Bar == nil { - var ret string - return ret, false + return nil, false } - return *o.Bar, true + return o.Bar, true } // HasBar returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *HasOnlyReadOnly) GetFoo() string { return *o.Foo } -// GetFooOk returns a tuple with the Foo field value if set, zero value otherwise +// GetFooOk returns a tuple with the Foo field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HasOnlyReadOnly) GetFooOk() (string, bool) { +func (o *HasOnlyReadOnly) GetFooOk() (*string, bool) { if o == nil || o.Foo == nil { - var ret string - return ret, false + return nil, false } - return *o.Foo, true + return o.Foo, true } // HasFoo returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableHasOnlyReadOnly struct { - Value HasOnlyReadOnly - ExplicitNull bool + value *HasOnlyReadOnly + isSet bool +} + +func (v NullableHasOnlyReadOnly) Get() *HasOnlyReadOnly { + return v.value +} + +func (v *NullableHasOnlyReadOnly) Set(val *HasOnlyReadOnly) { + v.value = val + v.isSet = true +} + +func (v NullableHasOnlyReadOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableHasOnlyReadOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHasOnlyReadOnly(val *HasOnlyReadOnly) *NullableHasOnlyReadOnly { + return &NullableHasOnlyReadOnly{value: val, isSet: true} } func (v NullableHasOnlyReadOnly) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableHasOnlyReadOnly) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_list.go b/samples/client/petstore/go-experimental/go-petstore/model_list.go index 228c9d61fba2..de655731a9b6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_list.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_list.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type List struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewList() *List { - this := List{} - return &this + this := List{} + return &this } // NewListWithDefaults instantiates a new List object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewListWithDefaults() *List { - this := List{} - return &this + this := List{} + return &this } // GetVar123List returns the Var123List field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *List) GetVar123List() string { return *o.Var123List } -// GetVar123ListOk returns a tuple with the Var123List field value if set, zero value otherwise +// GetVar123ListOk returns a tuple with the Var123List field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *List) GetVar123ListOk() (string, bool) { +func (o *List) GetVar123ListOk() (*string, bool) { if o == nil || o.Var123List == nil { - var ret string - return ret, false + return nil, false } - return *o.Var123List, true + return o.Var123List, true } // HasVar123List returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableList struct { - Value List - ExplicitNull bool + value *List + isSet bool +} + +func (v NullableList) Get() *List { + return v.value +} + +func (v *NullableList) Set(val *List) { + v.value = val + v.isSet = true +} + +func (v NullableList) IsSet() bool { + return v.isSet +} + +func (v *NullableList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableList(val *List) *NullableList { + return &NullableList{value: val, isSet: true} } func (v NullableList) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableList) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go index e78ae4bf9b8f..5a1d29671cb8 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_map_test_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -27,16 +26,16 @@ type MapTest struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewMapTest() *MapTest { - this := MapTest{} - return &this + this := MapTest{} + return &this } // NewMapTestWithDefaults instantiates a new MapTest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewMapTestWithDefaults() *MapTest { - this := MapTest{} - return &this + this := MapTest{} + return &this } // GetMapMapOfString returns the MapMapOfString field value if set, zero value otherwise. @@ -48,14 +47,13 @@ func (o *MapTest) GetMapMapOfString() map[string]map[string]string { return *o.MapMapOfString } -// GetMapMapOfStringOk returns a tuple with the MapMapOfString field value if set, zero value otherwise +// GetMapMapOfStringOk returns a tuple with the MapMapOfString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool) { +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 nil, false } - return *o.MapMapOfString, true + return o.MapMapOfString, true } // HasMapMapOfString returns a boolean if a field has been set. @@ -81,14 +79,13 @@ func (o *MapTest) GetMapOfEnumString() map[string]string { return *o.MapOfEnumString } -// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field value if set, zero value otherwise +// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool) { +func (o *MapTest) GetMapOfEnumStringOk() (*map[string]string, bool) { if o == nil || o.MapOfEnumString == nil { - var ret map[string]string - return ret, false + return nil, false } - return *o.MapOfEnumString, true + return o.MapOfEnumString, true } // HasMapOfEnumString returns a boolean if a field has been set. @@ -114,14 +111,13 @@ func (o *MapTest) GetDirectMap() map[string]bool { return *o.DirectMap } -// GetDirectMapOk returns a tuple with the DirectMap field value if set, zero value otherwise +// GetDirectMapOk returns a tuple with the DirectMap field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapTest) GetDirectMapOk() (map[string]bool, bool) { +func (o *MapTest) GetDirectMapOk() (*map[string]bool, bool) { if o == nil || o.DirectMap == nil { - var ret map[string]bool - return ret, false + return nil, false } - return *o.DirectMap, true + return o.DirectMap, true } // HasDirectMap returns a boolean if a field has been set. @@ -147,14 +143,13 @@ func (o *MapTest) GetIndirectMap() map[string]bool { return *o.IndirectMap } -// GetIndirectMapOk returns a tuple with the IndirectMap field value if set, zero value otherwise +// GetIndirectMapOk returns a tuple with the IndirectMap field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool) { +func (o *MapTest) GetIndirectMapOk() (*map[string]bool, bool) { if o == nil || o.IndirectMap == nil { - var ret map[string]bool - return ret, false + return nil, false } - return *o.IndirectMap, true + return o.IndirectMap, true } // HasIndirectMap returns a boolean if a field has been set. @@ -171,25 +166,55 @@ 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) +} + type NullableMapTest struct { - Value MapTest - ExplicitNull bool + value *MapTest + isSet bool +} + +func (v NullableMapTest) Get() *MapTest { + return v.value +} + +func (v *NullableMapTest) Set(val *MapTest) { + v.value = val + v.isSet = true +} + +func (v NullableMapTest) IsSet() bool { + return v.isSet +} + +func (v *NullableMapTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMapTest(val *MapTest) *NullableMapTest { + return &NullableMapTest{value: val, isSet: true} } func (v NullableMapTest) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableMapTest) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go index 95a311b65435..355bcab85031 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "time" ) @@ -27,16 +26,16 @@ type MixedPropertiesAndAdditionalPropertiesClass struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewMixedPropertiesAndAdditionalPropertiesClass() *MixedPropertiesAndAdditionalPropertiesClass { - this := MixedPropertiesAndAdditionalPropertiesClass{} - return &this + this := MixedPropertiesAndAdditionalPropertiesClass{} + return &this } // NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults instantiates a new MixedPropertiesAndAdditionalPropertiesClass object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults() *MixedPropertiesAndAdditionalPropertiesClass { - this := MixedPropertiesAndAdditionalPropertiesClass{} - return &this + this := MixedPropertiesAndAdditionalPropertiesClass{} + return &this } // GetUuid returns the Uuid field value if set, zero value otherwise. @@ -48,14 +47,13 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { return *o.Uuid } -// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (*string, bool) { if o == nil || o.Uuid == nil { - var ret string - return ret, false + return nil, false } - return *o.Uuid, true + return o.Uuid, true } // HasUuid returns a boolean if a field has been set. @@ -81,14 +79,13 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool) { +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (*time.Time, bool) { if o == nil || o.DateTime == nil { - var ret time.Time - return ret, false + return nil, false } - return *o.DateTime, true + return o.DateTime, true } // HasDateTime returns a boolean if a field has been set. @@ -114,14 +111,13 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal return *o.Map } -// GetMapOk returns a tuple with the Map field value if set, zero value otherwise +// GetMapOk returns a tuple with the Map field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool) { +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (*map[string]Animal, bool) { if o == nil || o.Map == nil { - var ret map[string]Animal - return ret, false + return nil, false } - return *o.Map, true + return o.Map, true } // HasMap returns a boolean if a field has been set. @@ -138,25 +134,52 @@ 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) +} + type NullableMixedPropertiesAndAdditionalPropertiesClass struct { - Value MixedPropertiesAndAdditionalPropertiesClass - ExplicitNull bool + value *MixedPropertiesAndAdditionalPropertiesClass + isSet bool +} + +func (v NullableMixedPropertiesAndAdditionalPropertiesClass) Get() *MixedPropertiesAndAdditionalPropertiesClass { + return v.value +} + +func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) Set(val *MixedPropertiesAndAdditionalPropertiesClass) { + v.value = val + v.isSet = true +} + +func (v NullableMixedPropertiesAndAdditionalPropertiesClass) IsSet() bool { + return v.isSet +} + +func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMixedPropertiesAndAdditionalPropertiesClass(val *MixedPropertiesAndAdditionalPropertiesClass) *NullableMixedPropertiesAndAdditionalPropertiesClass { + return &NullableMixedPropertiesAndAdditionalPropertiesClass{value: val, isSet: true} } func (v NullableMixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_name.go index c205987518cc..39cf81c6a4d0 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_name.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_name.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -27,22 +26,22 @@ type Name struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewName(name int32, ) *Name { - this := Name{} - this.Name = name - return &this + this := Name{} + this.Name = name + return &this } // NewNameWithDefaults instantiates a new Name object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewNameWithDefaults() *Name { - this := Name{} - return &this + this := Name{} + return &this } // GetName returns the Name field value func (o *Name) GetName() int32 { - if o == nil { + if o == nil { var ret int32 return ret } @@ -50,6 +49,15 @@ func (o *Name) GetName() int32 { return o.Name } +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Name) GetNameOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + // SetName sets field value func (o *Name) SetName(v int32) { o.Name = v @@ -64,14 +72,13 @@ func (o *Name) GetSnakeCase() int32 { return *o.SnakeCase } -// GetSnakeCaseOk returns a tuple with the SnakeCase field value if set, zero value otherwise +// GetSnakeCaseOk returns a tuple with the SnakeCase field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Name) GetSnakeCaseOk() (int32, bool) { +func (o *Name) GetSnakeCaseOk() (*int32, bool) { if o == nil || o.SnakeCase == nil { - var ret int32 - return ret, false + return nil, false } - return *o.SnakeCase, true + return o.SnakeCase, true } // HasSnakeCase returns a boolean if a field has been set. @@ -97,14 +104,13 @@ func (o *Name) GetProperty() string { return *o.Property } -// GetPropertyOk returns a tuple with the Property field value if set, zero value otherwise +// GetPropertyOk returns a tuple with the Property field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Name) GetPropertyOk() (string, bool) { +func (o *Name) GetPropertyOk() (*string, bool) { if o == nil || o.Property == nil { - var ret string - return ret, false + return nil, false } - return *o.Property, true + return o.Property, true } // HasProperty returns a boolean if a field has been set. @@ -130,14 +136,13 @@ func (o *Name) GetVar123Number() int32 { return *o.Var123Number } -// GetVar123NumberOk returns a tuple with the Var123Number field value if set, zero value otherwise +// GetVar123NumberOk returns a tuple with the Var123Number field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Name) GetVar123NumberOk() (int32, bool) { +func (o *Name) GetVar123NumberOk() (*int32, bool) { if o == nil || o.Var123Number == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Var123Number, true + return o.Var123Number, true } // HasVar123Number returns a boolean if a field has been set. @@ -154,25 +159,55 @@ func (o *Name) SetVar123Number(v int32) { o.Var123Number = &v } +func (o Name) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + 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) +} + type NullableName struct { - Value Name - ExplicitNull bool + value *Name + isSet bool +} + +func (v NullableName) Get() *Name { + return v.value +} + +func (v *NullableName) Set(val *Name) { + v.value = val + v.isSet = true +} + +func (v NullableName) IsSet() bool { + return v.isSet +} + +func (v *NullableName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableName(val *Name) *NullableName { + return &NullableName{value: val, isSet: true} } func (v NullableName) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableName) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go index 576dcff80401..dbb70c5c1f71 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_number_only.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_number_only.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type NumberOnly struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewNumberOnly() *NumberOnly { - this := NumberOnly{} - return &this + this := NumberOnly{} + return &this } // NewNumberOnlyWithDefaults instantiates a new NumberOnly object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewNumberOnlyWithDefaults() *NumberOnly { - this := NumberOnly{} - return &this + this := NumberOnly{} + return &this } // GetJustNumber returns the JustNumber field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *NumberOnly) GetJustNumber() float32 { return *o.JustNumber } -// GetJustNumberOk returns a tuple with the JustNumber field value if set, zero value otherwise +// GetJustNumberOk returns a tuple with the JustNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NumberOnly) GetJustNumberOk() (float32, bool) { +func (o *NumberOnly) GetJustNumberOk() (*float32, bool) { if o == nil || o.JustNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.JustNumber, true + return o.JustNumber, true } // HasJustNumber returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableNumberOnly struct { - Value NumberOnly - ExplicitNull bool + value *NumberOnly + isSet bool +} + +func (v NullableNumberOnly) Get() *NumberOnly { + return v.value +} + +func (v *NullableNumberOnly) Set(val *NumberOnly) { + v.value = val + v.isSet = true +} + +func (v NullableNumberOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableNumberOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNumberOnly(val *NumberOnly) *NullableNumberOnly { + return &NullableNumberOnly{value: val, isSet: true} } func (v NullableNumberOnly) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableNumberOnly) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_order.go b/samples/client/petstore/go-experimental/go-petstore/model_order.go index aa4da6cf1b7f..895475b260c2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_order.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_order.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "time" ) @@ -31,20 +30,20 @@ type Order struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewOrder() *Order { - this := Order{} - var complete bool = false - this.Complete = &complete - return &this + this := Order{} + var complete bool = false + this.Complete = &complete + return &this } // NewOrderWithDefaults instantiates a new Order object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewOrderWithDefaults() *Order { - this := Order{} - var complete bool = false - this.Complete = &complete - return &this + this := Order{} + var complete bool = false + this.Complete = &complete + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -56,14 +55,13 @@ func (o *Order) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetIdOk() (int64, bool) { +func (o *Order) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -89,14 +87,13 @@ func (o *Order) GetPetId() int64 { return *o.PetId } -// GetPetIdOk returns a tuple with the PetId field value if set, zero value otherwise +// GetPetIdOk returns a tuple with the PetId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetPetIdOk() (int64, bool) { +func (o *Order) GetPetIdOk() (*int64, bool) { if o == nil || o.PetId == nil { - var ret int64 - return ret, false + return nil, false } - return *o.PetId, true + return o.PetId, true } // HasPetId returns a boolean if a field has been set. @@ -122,14 +119,13 @@ func (o *Order) GetQuantity() int32 { return *o.Quantity } -// GetQuantityOk returns a tuple with the Quantity field value if set, zero value otherwise +// GetQuantityOk returns a tuple with the Quantity field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetQuantityOk() (int32, bool) { +func (o *Order) GetQuantityOk() (*int32, bool) { if o == nil || o.Quantity == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Quantity, true + return o.Quantity, true } // HasQuantity returns a boolean if a field has been set. @@ -155,14 +151,13 @@ func (o *Order) GetShipDate() time.Time { return *o.ShipDate } -// GetShipDateOk returns a tuple with the ShipDate field value if set, zero value otherwise +// GetShipDateOk returns a tuple with the ShipDate field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetShipDateOk() (time.Time, bool) { +func (o *Order) GetShipDateOk() (*time.Time, bool) { if o == nil || o.ShipDate == nil { - var ret time.Time - return ret, false + return nil, false } - return *o.ShipDate, true + return o.ShipDate, true } // HasShipDate returns a boolean if a field has been set. @@ -188,14 +183,13 @@ func (o *Order) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetStatusOk() (string, bool) { +func (o *Order) GetStatusOk() (*string, bool) { if o == nil || o.Status == nil { - var ret string - return ret, false + return nil, false } - return *o.Status, true + return o.Status, true } // HasStatus returns a boolean if a field has been set. @@ -221,14 +215,13 @@ func (o *Order) GetComplete() bool { return *o.Complete } -// GetCompleteOk returns a tuple with the Complete field value if set, zero value otherwise +// GetCompleteOk returns a tuple with the Complete field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetCompleteOk() (bool, bool) { +func (o *Order) GetCompleteOk() (*bool, bool) { if o == nil || o.Complete == nil { - var ret bool - return ret, false + return nil, false } - return *o.Complete, true + return o.Complete, true } // HasComplete returns a boolean if a field has been set. @@ -245,25 +238,61 @@ 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) +} + type NullableOrder struct { - Value Order - ExplicitNull bool + value *Order + isSet bool +} + +func (v NullableOrder) Get() *Order { + return v.value +} + +func (v *NullableOrder) Set(val *Order) { + v.value = val + v.isSet = true +} + +func (v NullableOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrder(val *Order) *NullableOrder { + return &NullableOrder{value: val, isSet: true} } func (v NullableOrder) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOrder) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go index a9a28d74233d..26a09e445c69 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_composite.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -26,16 +25,16 @@ type OuterComposite struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewOuterComposite() *OuterComposite { - this := OuterComposite{} - return &this + this := OuterComposite{} + return &this } // NewOuterCompositeWithDefaults instantiates a new OuterComposite object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewOuterCompositeWithDefaults() *OuterComposite { - this := OuterComposite{} - return &this + this := OuterComposite{} + return &this } // GetMyNumber returns the MyNumber field value if set, zero value otherwise. @@ -47,14 +46,13 @@ func (o *OuterComposite) GetMyNumber() float32 { return *o.MyNumber } -// GetMyNumberOk returns a tuple with the MyNumber field value if set, zero value otherwise +// GetMyNumberOk returns a tuple with the MyNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OuterComposite) GetMyNumberOk() (float32, bool) { +func (o *OuterComposite) GetMyNumberOk() (*float32, bool) { if o == nil || o.MyNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.MyNumber, true + return o.MyNumber, true } // HasMyNumber returns a boolean if a field has been set. @@ -80,14 +78,13 @@ func (o *OuterComposite) GetMyString() string { return *o.MyString } -// GetMyStringOk returns a tuple with the MyString field value if set, zero value otherwise +// GetMyStringOk returns a tuple with the MyString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OuterComposite) GetMyStringOk() (string, bool) { +func (o *OuterComposite) GetMyStringOk() (*string, bool) { if o == nil || o.MyString == nil { - var ret string - return ret, false + return nil, false } - return *o.MyString, true + return o.MyString, true } // HasMyString returns a boolean if a field has been set. @@ -113,14 +110,13 @@ func (o *OuterComposite) GetMyBoolean() bool { return *o.MyBoolean } -// GetMyBooleanOk returns a tuple with the MyBoolean field value if set, zero value otherwise +// GetMyBooleanOk returns a tuple with the MyBoolean field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OuterComposite) GetMyBooleanOk() (bool, bool) { +func (o *OuterComposite) GetMyBooleanOk() (*bool, bool) { if o == nil || o.MyBoolean == nil { - var ret bool - return ret, false + return nil, false } - return *o.MyBoolean, true + return o.MyBoolean, true } // HasMyBoolean returns a boolean if a field has been set. @@ -137,25 +133,52 @@ 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) +} + type NullableOuterComposite struct { - Value OuterComposite - ExplicitNull bool + value *OuterComposite + isSet bool +} + +func (v NullableOuterComposite) Get() *OuterComposite { + return v.value +} + +func (v *NullableOuterComposite) Set(val *OuterComposite) { + v.value = val + v.isSet = true +} + +func (v NullableOuterComposite) IsSet() bool { + return v.isSet +} + +func (v *NullableOuterComposite) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOuterComposite(val *OuterComposite) *NullableOuterComposite { + return &NullableOuterComposite{value: val, isSet: true} } func (v NullableOuterComposite) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOuterComposite) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go b/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go index c2a75fee8461..adc1429bbfec 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_outer_enum.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,24 +24,37 @@ const ( ) type NullableOuterEnum struct { - Value OuterEnum - ExplicitNull bool + value *OuterEnum + isSet bool +} + +func (v NullableOuterEnum) Get() *OuterEnum { + return v.value +} + +func (v *NullableOuterEnum) Set(val *OuterEnum) { + v.value = val + v.isSet = true +} + +func (v NullableOuterEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableOuterEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOuterEnum(val *OuterEnum) *NullableOuterEnum { + return &NullableOuterEnum{value: val, isSet: true} } func (v NullableOuterEnum) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOuterEnum) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/client/petstore/go-experimental/go-petstore/model_pet.go index be7887184490..a72afed465aa 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_pet.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -30,18 +29,18 @@ type Pet struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewPet(name string, photoUrls []string, ) *Pet { - this := Pet{} - this.Name = name - this.PhotoUrls = photoUrls - return &this + this := Pet{} + this.Name = name + this.PhotoUrls = photoUrls + return &this } // NewPetWithDefaults instantiates a new Pet object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewPetWithDefaults() *Pet { - this := Pet{} - return &this + this := Pet{} + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -53,14 +52,13 @@ func (o *Pet) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetIdOk() (int64, bool) { +func (o *Pet) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -86,14 +84,13 @@ func (o *Pet) GetCategory() Category { return *o.Category } -// GetCategoryOk returns a tuple with the Category field value if set, zero value otherwise +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetCategoryOk() (Category, bool) { +func (o *Pet) GetCategoryOk() (*Category, bool) { if o == nil || o.Category == nil { - var ret Category - return ret, false + return nil, false } - return *o.Category, true + return o.Category, true } // HasCategory returns a boolean if a field has been set. @@ -112,7 +109,7 @@ func (o *Pet) SetCategory(v Category) { // GetName returns the Name field value func (o *Pet) GetName() string { - if o == nil { + if o == nil { var ret string return ret } @@ -120,6 +117,15 @@ func (o *Pet) GetName() string { return o.Name } +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Pet) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + // SetName sets field value func (o *Pet) SetName(v string) { o.Name = v @@ -127,7 +133,7 @@ func (o *Pet) SetName(v string) { // GetPhotoUrls returns the PhotoUrls field value func (o *Pet) GetPhotoUrls() []string { - if o == nil { + if o == nil { var ret []string return ret } @@ -135,6 +141,15 @@ func (o *Pet) GetPhotoUrls() []string { return o.PhotoUrls } +// GetPhotoUrlsOk returns a tuple with the PhotoUrls field value +// and a boolean to check if the value has been set. +func (o *Pet) GetPhotoUrlsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.PhotoUrls, true +} + // SetPhotoUrls sets field value func (o *Pet) SetPhotoUrls(v []string) { o.PhotoUrls = v @@ -149,14 +164,13 @@ func (o *Pet) GetTags() []Tag { return *o.Tags } -// GetTagsOk returns a tuple with the Tags field value if set, zero value otherwise +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetTagsOk() ([]Tag, bool) { +func (o *Pet) GetTagsOk() (*[]Tag, bool) { if o == nil || o.Tags == nil { - var ret []Tag - return ret, false + return nil, false } - return *o.Tags, true + return o.Tags, true } // HasTags returns a boolean if a field has been set. @@ -182,14 +196,13 @@ func (o *Pet) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetStatusOk() (string, bool) { +func (o *Pet) GetStatusOk() (*string, bool) { if o == nil || o.Status == nil { - var ret string - return ret, false + return nil, false } - return *o.Status, true + return o.Status, true } // HasStatus returns a boolean if a field has been set. @@ -206,25 +219,61 @@ 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 true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["photoUrls"] = o.PhotoUrls + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + type NullablePet struct { - Value Pet - ExplicitNull bool + value *Pet + isSet bool +} + +func (v NullablePet) Get() *Pet { + return v.value +} + +func (v *NullablePet) Set(val *Pet) { + v.value = val + v.isSet = true +} + +func (v NullablePet) IsSet() bool { + return v.isSet +} + +func (v *NullablePet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePet(val *Pet) *NullablePet { + return &NullablePet{value: val, isSet: true} } func (v NullablePet) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullablePet) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go index d2668d830418..277badc58cf3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_read_only_first.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type ReadOnlyFirst struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewReadOnlyFirst() *ReadOnlyFirst { - this := ReadOnlyFirst{} - return &this + this := ReadOnlyFirst{} + return &this } // NewReadOnlyFirstWithDefaults instantiates a new ReadOnlyFirst object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewReadOnlyFirstWithDefaults() *ReadOnlyFirst { - this := ReadOnlyFirst{} - return &this + this := ReadOnlyFirst{} + return &this } // GetBar returns the Bar field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *ReadOnlyFirst) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ReadOnlyFirst) GetBarOk() (string, bool) { +func (o *ReadOnlyFirst) GetBarOk() (*string, bool) { if o == nil || o.Bar == nil { - var ret string - return ret, false + return nil, false } - return *o.Bar, true + return o.Bar, true } // HasBar returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *ReadOnlyFirst) GetBaz() string { return *o.Baz } -// GetBazOk returns a tuple with the Baz field value if set, zero value otherwise +// GetBazOk returns a tuple with the Baz field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ReadOnlyFirst) GetBazOk() (string, bool) { +func (o *ReadOnlyFirst) GetBazOk() (*string, bool) { if o == nil || o.Baz == nil { - var ret string - return ret, false + return nil, false } - return *o.Baz, true + return o.Baz, true } // HasBaz returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableReadOnlyFirst struct { - Value ReadOnlyFirst - ExplicitNull bool + value *ReadOnlyFirst + isSet bool +} + +func (v NullableReadOnlyFirst) Get() *ReadOnlyFirst { + return v.value +} + +func (v *NullableReadOnlyFirst) Set(val *ReadOnlyFirst) { + v.value = val + v.isSet = true +} + +func (v NullableReadOnlyFirst) IsSet() bool { + return v.isSet +} + +func (v *NullableReadOnlyFirst) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReadOnlyFirst(val *ReadOnlyFirst) *NullableReadOnlyFirst { + return &NullableReadOnlyFirst{value: val, isSet: true} } func (v NullableReadOnlyFirst) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableReadOnlyFirst) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_return.go b/samples/client/petstore/go-experimental/go-petstore/model_return.go index 304c5ffafeed..b8821489c0eb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_return.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_return.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type Return struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewReturn() *Return { - this := Return{} - return &this + this := Return{} + return &this } // NewReturnWithDefaults instantiates a new Return object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewReturnWithDefaults() *Return { - this := Return{} - return &this + this := Return{} + return &this } // GetReturn returns the Return field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *Return) GetReturn() int32 { return *o.Return } -// GetReturnOk returns a tuple with the Return field value if set, zero value otherwise +// GetReturnOk returns a tuple with the Return field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Return) GetReturnOk() (int32, bool) { +func (o *Return) GetReturnOk() (*int32, bool) { if o == nil || o.Return == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Return, true + return o.Return, true } // HasReturn returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableReturn struct { - Value Return - ExplicitNull bool + value *Return + isSet bool +} + +func (v NullableReturn) Get() *Return { + return v.value +} + +func (v *NullableReturn) Set(val *Return) { + v.value = val + v.isSet = true +} + +func (v NullableReturn) IsSet() bool { + return v.isSet +} + +func (v *NullableReturn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReturn(val *Return) *NullableReturn { + return &NullableReturn{value: val, isSet: true} } func (v NullableReturn) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableReturn) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go index 90de43b900f7..057caa3e4b2d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_special_model_name.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type SpecialModelName struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewSpecialModelName() *SpecialModelName { - this := SpecialModelName{} - return &this + this := SpecialModelName{} + return &this } // NewSpecialModelNameWithDefaults instantiates a new SpecialModelName object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewSpecialModelNameWithDefaults() *SpecialModelName { - this := SpecialModelName{} - return &this + this := SpecialModelName{} + return &this } // GetSpecialPropertyName returns the SpecialPropertyName field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *SpecialModelName) GetSpecialPropertyName() int64 { return *o.SpecialPropertyName } -// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field value if set, zero value otherwise +// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) { +func (o *SpecialModelName) GetSpecialPropertyNameOk() (*int64, bool) { if o == nil || o.SpecialPropertyName == nil { - var ret int64 - return ret, false + return nil, false } - return *o.SpecialPropertyName, true + return o.SpecialPropertyName, true } // HasSpecialPropertyName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableSpecialModelName struct { - Value SpecialModelName - ExplicitNull bool + value *SpecialModelName + isSet bool +} + +func (v NullableSpecialModelName) Get() *SpecialModelName { + return v.value +} + +func (v *NullableSpecialModelName) Set(val *SpecialModelName) { + v.value = val + v.isSet = true +} + +func (v NullableSpecialModelName) IsSet() bool { + return v.isSet +} + +func (v *NullableSpecialModelName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpecialModelName(val *SpecialModelName) *NullableSpecialModelName { + return &NullableSpecialModelName{value: val, isSet: true} } func (v NullableSpecialModelName) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableSpecialModelName) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/client/petstore/go-experimental/go-petstore/model_tag.go index abfc6737323c..6ba3864c6121 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_tag.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_tag.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type Tag struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewTag() *Tag { - this := Tag{} - return &this + this := Tag{} + return &this } // NewTagWithDefaults instantiates a new Tag object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewTagWithDefaults() *Tag { - this := Tag{} - return &this + this := Tag{} + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *Tag) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Tag) GetIdOk() (int64, bool) { +func (o *Tag) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *Tag) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Tag) GetNameOk() (string, bool) { +func (o *Tag) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableTag struct { - Value Tag - ExplicitNull bool + value *Tag + isSet bool +} + +func (v NullableTag) Get() *Tag { + return v.value +} + +func (v *NullableTag) Set(val *Tag) { + v.value = val + v.isSet = true +} + +func (v NullableTag) IsSet() bool { + return v.isSet +} + +func (v *NullableTag) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTag(val *Tag) *NullableTag { + return &NullableTag{value: val, isSet: true} } func (v NullableTag) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableTag) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go index 5ee112c72182..f6e8d19a5f5d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_default.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -28,30 +27,30 @@ type TypeHolderDefault struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewTypeHolderDefault(stringItem string, numberItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderDefault { - this := TypeHolderDefault{} - this.StringItem = stringItem - this.NumberItem = numberItem - this.IntegerItem = integerItem - this.BoolItem = boolItem - this.ArrayItem = arrayItem - return &this + this := TypeHolderDefault{} + this.StringItem = stringItem + this.NumberItem = numberItem + this.IntegerItem = integerItem + this.BoolItem = boolItem + this.ArrayItem = arrayItem + return &this } // NewTypeHolderDefaultWithDefaults instantiates a new TypeHolderDefault object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewTypeHolderDefaultWithDefaults() *TypeHolderDefault { - this := TypeHolderDefault{} - var stringItem string = "what" - this.StringItem = stringItem - var boolItem bool = true - this.BoolItem = boolItem - return &this + this := TypeHolderDefault{} + var stringItem string = "what" + this.StringItem = stringItem + var boolItem bool = true + this.BoolItem = boolItem + return &this } // GetStringItem returns the StringItem field value func (o *TypeHolderDefault) GetStringItem() string { - if o == nil { + if o == nil { var ret string return ret } @@ -59,6 +58,15 @@ func (o *TypeHolderDefault) GetStringItem() string { return o.StringItem } +// GetStringItemOk returns a tuple with the StringItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetStringItemOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StringItem, true +} + // SetStringItem sets field value func (o *TypeHolderDefault) SetStringItem(v string) { o.StringItem = v @@ -66,7 +74,7 @@ func (o *TypeHolderDefault) SetStringItem(v string) { // GetNumberItem returns the NumberItem field value func (o *TypeHolderDefault) GetNumberItem() float32 { - if o == nil { + if o == nil { var ret float32 return ret } @@ -74,6 +82,15 @@ func (o *TypeHolderDefault) GetNumberItem() float32 { return o.NumberItem } +// GetNumberItemOk returns a tuple with the NumberItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetNumberItemOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.NumberItem, true +} + // SetNumberItem sets field value func (o *TypeHolderDefault) SetNumberItem(v float32) { o.NumberItem = v @@ -81,7 +98,7 @@ func (o *TypeHolderDefault) SetNumberItem(v float32) { // GetIntegerItem returns the IntegerItem field value func (o *TypeHolderDefault) GetIntegerItem() int32 { - if o == nil { + if o == nil { var ret int32 return ret } @@ -89,6 +106,15 @@ func (o *TypeHolderDefault) GetIntegerItem() int32 { return o.IntegerItem } +// GetIntegerItemOk returns a tuple with the IntegerItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetIntegerItemOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.IntegerItem, true +} + // SetIntegerItem sets field value func (o *TypeHolderDefault) SetIntegerItem(v int32) { o.IntegerItem = v @@ -96,7 +122,7 @@ func (o *TypeHolderDefault) SetIntegerItem(v int32) { // GetBoolItem returns the BoolItem field value func (o *TypeHolderDefault) GetBoolItem() bool { - if o == nil { + if o == nil { var ret bool return ret } @@ -104,6 +130,15 @@ func (o *TypeHolderDefault) GetBoolItem() bool { return o.BoolItem } +// GetBoolItemOk returns a tuple with the BoolItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetBoolItemOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.BoolItem, true +} + // SetBoolItem sets field value func (o *TypeHolderDefault) SetBoolItem(v bool) { o.BoolItem = v @@ -111,7 +146,7 @@ func (o *TypeHolderDefault) SetBoolItem(v bool) { // GetArrayItem returns the ArrayItem field value func (o *TypeHolderDefault) GetArrayItem() []int32 { - if o == nil { + if o == nil { var ret []int32 return ret } @@ -119,30 +154,72 @@ func (o *TypeHolderDefault) GetArrayItem() []int32 { return o.ArrayItem } +// GetArrayItemOk returns a tuple with the ArrayItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderDefault) GetArrayItemOk() (*[]int32, bool) { + if o == nil { + return nil, false + } + return &o.ArrayItem, true +} + // SetArrayItem sets field value func (o *TypeHolderDefault) SetArrayItem(v []int32) { o.ArrayItem = v } +func (o TypeHolderDefault) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["string_item"] = o.StringItem + } + if true { + toSerialize["number_item"] = o.NumberItem + } + if true { + toSerialize["integer_item"] = o.IntegerItem + } + if true { + toSerialize["bool_item"] = o.BoolItem + } + if true { + toSerialize["array_item"] = o.ArrayItem + } + return json.Marshal(toSerialize) +} + type NullableTypeHolderDefault struct { - Value TypeHolderDefault - ExplicitNull bool + value *TypeHolderDefault + isSet bool +} + +func (v NullableTypeHolderDefault) Get() *TypeHolderDefault { + return v.value +} + +func (v *NullableTypeHolderDefault) Set(val *TypeHolderDefault) { + v.value = val + v.isSet = true +} + +func (v NullableTypeHolderDefault) IsSet() bool { + return v.isSet +} + +func (v *NullableTypeHolderDefault) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTypeHolderDefault(val *TypeHolderDefault) *NullableTypeHolderDefault { + return &NullableTypeHolderDefault{value: val, isSet: true} } func (v NullableTypeHolderDefault) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableTypeHolderDefault) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go index d5b4e3e5a288..1cfe75a9d486 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -29,27 +28,27 @@ type TypeHolderExample struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewTypeHolderExample(stringItem string, numberItem float32, floatItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderExample { - this := TypeHolderExample{} - this.StringItem = stringItem - this.NumberItem = numberItem - this.FloatItem = floatItem - this.IntegerItem = integerItem - this.BoolItem = boolItem - this.ArrayItem = arrayItem - return &this + this := TypeHolderExample{} + this.StringItem = stringItem + this.NumberItem = numberItem + this.FloatItem = floatItem + this.IntegerItem = integerItem + this.BoolItem = boolItem + this.ArrayItem = arrayItem + return &this } // NewTypeHolderExampleWithDefaults instantiates a new TypeHolderExample object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewTypeHolderExampleWithDefaults() *TypeHolderExample { - this := TypeHolderExample{} - return &this + this := TypeHolderExample{} + return &this } // GetStringItem returns the StringItem field value func (o *TypeHolderExample) GetStringItem() string { - if o == nil { + if o == nil { var ret string return ret } @@ -57,6 +56,15 @@ func (o *TypeHolderExample) GetStringItem() string { return o.StringItem } +// GetStringItemOk returns a tuple with the StringItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetStringItemOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StringItem, true +} + // SetStringItem sets field value func (o *TypeHolderExample) SetStringItem(v string) { o.StringItem = v @@ -64,7 +72,7 @@ func (o *TypeHolderExample) SetStringItem(v string) { // GetNumberItem returns the NumberItem field value func (o *TypeHolderExample) GetNumberItem() float32 { - if o == nil { + if o == nil { var ret float32 return ret } @@ -72,6 +80,15 @@ func (o *TypeHolderExample) GetNumberItem() float32 { return o.NumberItem } +// GetNumberItemOk returns a tuple with the NumberItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetNumberItemOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.NumberItem, true +} + // SetNumberItem sets field value func (o *TypeHolderExample) SetNumberItem(v float32) { o.NumberItem = v @@ -79,7 +96,7 @@ func (o *TypeHolderExample) SetNumberItem(v float32) { // GetFloatItem returns the FloatItem field value func (o *TypeHolderExample) GetFloatItem() float32 { - if o == nil { + if o == nil { var ret float32 return ret } @@ -87,6 +104,15 @@ func (o *TypeHolderExample) GetFloatItem() float32 { return o.FloatItem } +// GetFloatItemOk returns a tuple with the FloatItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetFloatItemOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.FloatItem, true +} + // SetFloatItem sets field value func (o *TypeHolderExample) SetFloatItem(v float32) { o.FloatItem = v @@ -94,7 +120,7 @@ func (o *TypeHolderExample) SetFloatItem(v float32) { // GetIntegerItem returns the IntegerItem field value func (o *TypeHolderExample) GetIntegerItem() int32 { - if o == nil { + if o == nil { var ret int32 return ret } @@ -102,6 +128,15 @@ func (o *TypeHolderExample) GetIntegerItem() int32 { return o.IntegerItem } +// GetIntegerItemOk returns a tuple with the IntegerItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetIntegerItemOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.IntegerItem, true +} + // SetIntegerItem sets field value func (o *TypeHolderExample) SetIntegerItem(v int32) { o.IntegerItem = v @@ -109,7 +144,7 @@ func (o *TypeHolderExample) SetIntegerItem(v int32) { // GetBoolItem returns the BoolItem field value func (o *TypeHolderExample) GetBoolItem() bool { - if o == nil { + if o == nil { var ret bool return ret } @@ -117,6 +152,15 @@ func (o *TypeHolderExample) GetBoolItem() bool { return o.BoolItem } +// GetBoolItemOk returns a tuple with the BoolItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetBoolItemOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.BoolItem, true +} + // SetBoolItem sets field value func (o *TypeHolderExample) SetBoolItem(v bool) { o.BoolItem = v @@ -124,7 +168,7 @@ func (o *TypeHolderExample) SetBoolItem(v bool) { // GetArrayItem returns the ArrayItem field value func (o *TypeHolderExample) GetArrayItem() []int32 { - if o == nil { + if o == nil { var ret []int32 return ret } @@ -132,30 +176,75 @@ func (o *TypeHolderExample) GetArrayItem() []int32 { return o.ArrayItem } +// GetArrayItemOk returns a tuple with the ArrayItem field value +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetArrayItemOk() (*[]int32, bool) { + if o == nil { + return nil, false + } + return &o.ArrayItem, true +} + // SetArrayItem sets field value func (o *TypeHolderExample) SetArrayItem(v []int32) { o.ArrayItem = v } +func (o TypeHolderExample) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["string_item"] = o.StringItem + } + if true { + toSerialize["number_item"] = o.NumberItem + } + if true { + toSerialize["float_item"] = o.FloatItem + } + if true { + toSerialize["integer_item"] = o.IntegerItem + } + if true { + toSerialize["bool_item"] = o.BoolItem + } + if true { + toSerialize["array_item"] = o.ArrayItem + } + return json.Marshal(toSerialize) +} + type NullableTypeHolderExample struct { - Value TypeHolderExample - ExplicitNull bool + value *TypeHolderExample + isSet bool +} + +func (v NullableTypeHolderExample) Get() *TypeHolderExample { + return v.value +} + +func (v *NullableTypeHolderExample) Set(val *TypeHolderExample) { + v.value = val + v.isSet = true +} + +func (v NullableTypeHolderExample) IsSet() bool { + return v.isSet +} + +func (v *NullableTypeHolderExample) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTypeHolderExample(val *TypeHolderExample) *NullableTypeHolderExample { + return &NullableTypeHolderExample{value: val, isSet: true} } func (v NullableTypeHolderExample) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableTypeHolderExample) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_user.go b/samples/client/petstore/go-experimental/go-petstore/model_user.go index 54ed39fb709a..838cf38d9790 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_user.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -32,16 +31,16 @@ type User struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewUser() *User { - this := User{} - return &this + this := User{} + return &this } // NewUserWithDefaults instantiates a new User object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewUserWithDefaults() *User { - this := User{} - return &this + this := User{} + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -53,14 +52,13 @@ func (o *User) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetIdOk() (int64, bool) { +func (o *User) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -86,14 +84,13 @@ func (o *User) GetUsername() string { return *o.Username } -// GetUsernameOk returns a tuple with the Username field value if set, zero value otherwise +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetUsernameOk() (string, bool) { +func (o *User) GetUsernameOk() (*string, bool) { if o == nil || o.Username == nil { - var ret string - return ret, false + return nil, false } - return *o.Username, true + return o.Username, true } // HasUsername returns a boolean if a field has been set. @@ -119,14 +116,13 @@ func (o *User) GetFirstName() string { return *o.FirstName } -// GetFirstNameOk returns a tuple with the FirstName field value if set, zero value otherwise +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetFirstNameOk() (string, bool) { +func (o *User) GetFirstNameOk() (*string, bool) { if o == nil || o.FirstName == nil { - var ret string - return ret, false + return nil, false } - return *o.FirstName, true + return o.FirstName, true } // HasFirstName returns a boolean if a field has been set. @@ -152,14 +148,13 @@ func (o *User) GetLastName() string { return *o.LastName } -// GetLastNameOk returns a tuple with the LastName field value if set, zero value otherwise +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetLastNameOk() (string, bool) { +func (o *User) GetLastNameOk() (*string, bool) { if o == nil || o.LastName == nil { - var ret string - return ret, false + return nil, false } - return *o.LastName, true + return o.LastName, true } // HasLastName returns a boolean if a field has been set. @@ -185,14 +180,13 @@ func (o *User) GetEmail() string { return *o.Email } -// GetEmailOk returns a tuple with the Email field value if set, zero value otherwise +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetEmailOk() (string, bool) { +func (o *User) GetEmailOk() (*string, bool) { if o == nil || o.Email == nil { - var ret string - return ret, false + return nil, false } - return *o.Email, true + return o.Email, true } // HasEmail returns a boolean if a field has been set. @@ -218,14 +212,13 @@ func (o *User) GetPassword() string { return *o.Password } -// GetPasswordOk returns a tuple with the Password field value if set, zero value otherwise +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetPasswordOk() (string, bool) { +func (o *User) GetPasswordOk() (*string, bool) { if o == nil || o.Password == nil { - var ret string - return ret, false + return nil, false } - return *o.Password, true + return o.Password, true } // HasPassword returns a boolean if a field has been set. @@ -251,14 +244,13 @@ func (o *User) GetPhone() string { return *o.Phone } -// GetPhoneOk returns a tuple with the Phone field value if set, zero value otherwise +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetPhoneOk() (string, bool) { +func (o *User) GetPhoneOk() (*string, bool) { if o == nil || o.Phone == nil { - var ret string - return ret, false + return nil, false } - return *o.Phone, true + return o.Phone, true } // HasPhone returns a boolean if a field has been set. @@ -284,14 +276,13 @@ func (o *User) GetUserStatus() int32 { return *o.UserStatus } -// GetUserStatusOk returns a tuple with the UserStatus field value if set, zero value otherwise +// GetUserStatusOk returns a tuple with the UserStatus field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetUserStatusOk() (int32, bool) { +func (o *User) GetUserStatusOk() (*int32, bool) { if o == nil || o.UserStatus == nil { - var ret int32 - return ret, false + return nil, false } - return *o.UserStatus, true + return o.UserStatus, true } // HasUserStatus returns a boolean if a field has been set. @@ -308,25 +299,67 @@ 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) +} + type NullableUser struct { - Value User - ExplicitNull bool + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} } func (v NullableUser) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableUser) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go index 26addf9c27e9..1feb80282259 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_xml_item.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -52,16 +51,16 @@ type XmlItem struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewXmlItem() *XmlItem { - this := XmlItem{} - return &this + this := XmlItem{} + return &this } // NewXmlItemWithDefaults instantiates a new XmlItem object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewXmlItemWithDefaults() *XmlItem { - this := XmlItem{} - return &this + this := XmlItem{} + return &this } // GetAttributeString returns the AttributeString field value if set, zero value otherwise. @@ -73,14 +72,13 @@ func (o *XmlItem) GetAttributeString() string { return *o.AttributeString } -// GetAttributeStringOk returns a tuple with the AttributeString field value if set, zero value otherwise +// GetAttributeStringOk returns a tuple with the AttributeString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetAttributeStringOk() (string, bool) { +func (o *XmlItem) GetAttributeStringOk() (*string, bool) { if o == nil || o.AttributeString == nil { - var ret string - return ret, false + return nil, false } - return *o.AttributeString, true + return o.AttributeString, true } // HasAttributeString returns a boolean if a field has been set. @@ -106,14 +104,13 @@ func (o *XmlItem) GetAttributeNumber() float32 { return *o.AttributeNumber } -// GetAttributeNumberOk returns a tuple with the AttributeNumber field value if set, zero value otherwise +// GetAttributeNumberOk returns a tuple with the AttributeNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetAttributeNumberOk() (float32, bool) { +func (o *XmlItem) GetAttributeNumberOk() (*float32, bool) { if o == nil || o.AttributeNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.AttributeNumber, true + return o.AttributeNumber, true } // HasAttributeNumber returns a boolean if a field has been set. @@ -139,14 +136,13 @@ func (o *XmlItem) GetAttributeInteger() int32 { return *o.AttributeInteger } -// GetAttributeIntegerOk returns a tuple with the AttributeInteger field value if set, zero value otherwise +// GetAttributeIntegerOk returns a tuple with the AttributeInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetAttributeIntegerOk() (int32, bool) { +func (o *XmlItem) GetAttributeIntegerOk() (*int32, bool) { if o == nil || o.AttributeInteger == nil { - var ret int32 - return ret, false + return nil, false } - return *o.AttributeInteger, true + return o.AttributeInteger, true } // HasAttributeInteger returns a boolean if a field has been set. @@ -172,14 +168,13 @@ func (o *XmlItem) GetAttributeBoolean() bool { return *o.AttributeBoolean } -// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field value if set, zero value otherwise +// GetAttributeBooleanOk returns a tuple with the AttributeBoolean field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetAttributeBooleanOk() (bool, bool) { +func (o *XmlItem) GetAttributeBooleanOk() (*bool, bool) { if o == nil || o.AttributeBoolean == nil { - var ret bool - return ret, false + return nil, false } - return *o.AttributeBoolean, true + return o.AttributeBoolean, true } // HasAttributeBoolean returns a boolean if a field has been set. @@ -205,14 +200,13 @@ func (o *XmlItem) GetWrappedArray() []int32 { return *o.WrappedArray } -// GetWrappedArrayOk returns a tuple with the WrappedArray field value if set, zero value otherwise +// GetWrappedArrayOk returns a tuple with the WrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) { +func (o *XmlItem) GetWrappedArrayOk() (*[]int32, bool) { if o == nil || o.WrappedArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.WrappedArray, true + return o.WrappedArray, true } // HasWrappedArray returns a boolean if a field has been set. @@ -238,14 +232,13 @@ func (o *XmlItem) GetNameString() string { return *o.NameString } -// GetNameStringOk returns a tuple with the NameString field value if set, zero value otherwise +// GetNameStringOk returns a tuple with the NameString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameStringOk() (string, bool) { +func (o *XmlItem) GetNameStringOk() (*string, bool) { if o == nil || o.NameString == nil { - var ret string - return ret, false + return nil, false } - return *o.NameString, true + return o.NameString, true } // HasNameString returns a boolean if a field has been set. @@ -271,14 +264,13 @@ func (o *XmlItem) GetNameNumber() float32 { return *o.NameNumber } -// GetNameNumberOk returns a tuple with the NameNumber field value if set, zero value otherwise +// GetNameNumberOk returns a tuple with the NameNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameNumberOk() (float32, bool) { +func (o *XmlItem) GetNameNumberOk() (*float32, bool) { if o == nil || o.NameNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.NameNumber, true + return o.NameNumber, true } // HasNameNumber returns a boolean if a field has been set. @@ -304,14 +296,13 @@ func (o *XmlItem) GetNameInteger() int32 { return *o.NameInteger } -// GetNameIntegerOk returns a tuple with the NameInteger field value if set, zero value otherwise +// GetNameIntegerOk returns a tuple with the NameInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameIntegerOk() (int32, bool) { +func (o *XmlItem) GetNameIntegerOk() (*int32, bool) { if o == nil || o.NameInteger == nil { - var ret int32 - return ret, false + return nil, false } - return *o.NameInteger, true + return o.NameInteger, true } // HasNameInteger returns a boolean if a field has been set. @@ -337,14 +328,13 @@ func (o *XmlItem) GetNameBoolean() bool { return *o.NameBoolean } -// GetNameBooleanOk returns a tuple with the NameBoolean field value if set, zero value otherwise +// GetNameBooleanOk returns a tuple with the NameBoolean field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameBooleanOk() (bool, bool) { +func (o *XmlItem) GetNameBooleanOk() (*bool, bool) { if o == nil || o.NameBoolean == nil { - var ret bool - return ret, false + return nil, false } - return *o.NameBoolean, true + return o.NameBoolean, true } // HasNameBoolean returns a boolean if a field has been set. @@ -370,14 +360,13 @@ func (o *XmlItem) GetNameArray() []int32 { return *o.NameArray } -// GetNameArrayOk returns a tuple with the NameArray field value if set, zero value otherwise +// GetNameArrayOk returns a tuple with the NameArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameArrayOk() ([]int32, bool) { +func (o *XmlItem) GetNameArrayOk() (*[]int32, bool) { if o == nil || o.NameArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.NameArray, true + return o.NameArray, true } // HasNameArray returns a boolean if a field has been set. @@ -403,14 +392,13 @@ func (o *XmlItem) GetNameWrappedArray() []int32 { return *o.NameWrappedArray } -// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field value if set, zero value otherwise +// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) { +func (o *XmlItem) GetNameWrappedArrayOk() (*[]int32, bool) { if o == nil || o.NameWrappedArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.NameWrappedArray, true + return o.NameWrappedArray, true } // HasNameWrappedArray returns a boolean if a field has been set. @@ -436,14 +424,13 @@ func (o *XmlItem) GetPrefixString() string { return *o.PrefixString } -// GetPrefixStringOk returns a tuple with the PrefixString field value if set, zero value otherwise +// GetPrefixStringOk returns a tuple with the PrefixString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixStringOk() (string, bool) { +func (o *XmlItem) GetPrefixStringOk() (*string, bool) { if o == nil || o.PrefixString == nil { - var ret string - return ret, false + return nil, false } - return *o.PrefixString, true + return o.PrefixString, true } // HasPrefixString returns a boolean if a field has been set. @@ -469,14 +456,13 @@ func (o *XmlItem) GetPrefixNumber() float32 { return *o.PrefixNumber } -// GetPrefixNumberOk returns a tuple with the PrefixNumber field value if set, zero value otherwise +// GetPrefixNumberOk returns a tuple with the PrefixNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNumberOk() (float32, bool) { +func (o *XmlItem) GetPrefixNumberOk() (*float32, bool) { if o == nil || o.PrefixNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.PrefixNumber, true + return o.PrefixNumber, true } // HasPrefixNumber returns a boolean if a field has been set. @@ -502,14 +488,13 @@ func (o *XmlItem) GetPrefixInteger() int32 { return *o.PrefixInteger } -// GetPrefixIntegerOk returns a tuple with the PrefixInteger field value if set, zero value otherwise +// GetPrefixIntegerOk returns a tuple with the PrefixInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixIntegerOk() (int32, bool) { +func (o *XmlItem) GetPrefixIntegerOk() (*int32, bool) { if o == nil || o.PrefixInteger == nil { - var ret int32 - return ret, false + return nil, false } - return *o.PrefixInteger, true + return o.PrefixInteger, true } // HasPrefixInteger returns a boolean if a field has been set. @@ -535,14 +520,13 @@ func (o *XmlItem) GetPrefixBoolean() bool { return *o.PrefixBoolean } -// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field value if set, zero value otherwise +// GetPrefixBooleanOk returns a tuple with the PrefixBoolean field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixBooleanOk() (bool, bool) { +func (o *XmlItem) GetPrefixBooleanOk() (*bool, bool) { if o == nil || o.PrefixBoolean == nil { - var ret bool - return ret, false + return nil, false } - return *o.PrefixBoolean, true + return o.PrefixBoolean, true } // HasPrefixBoolean returns a boolean if a field has been set. @@ -568,14 +552,13 @@ func (o *XmlItem) GetPrefixArray() []int32 { return *o.PrefixArray } -// GetPrefixArrayOk returns a tuple with the PrefixArray field value if set, zero value otherwise +// GetPrefixArrayOk returns a tuple with the PrefixArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) { +func (o *XmlItem) GetPrefixArrayOk() (*[]int32, bool) { if o == nil || o.PrefixArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.PrefixArray, true + return o.PrefixArray, true } // HasPrefixArray returns a boolean if a field has been set. @@ -601,14 +584,13 @@ func (o *XmlItem) GetPrefixWrappedArray() []int32 { return *o.PrefixWrappedArray } -// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field value if set, zero value otherwise +// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) { +func (o *XmlItem) GetPrefixWrappedArrayOk() (*[]int32, bool) { if o == nil || o.PrefixWrappedArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.PrefixWrappedArray, true + return o.PrefixWrappedArray, true } // HasPrefixWrappedArray returns a boolean if a field has been set. @@ -634,14 +616,13 @@ func (o *XmlItem) GetNamespaceString() string { return *o.NamespaceString } -// GetNamespaceStringOk returns a tuple with the NamespaceString field value if set, zero value otherwise +// GetNamespaceStringOk returns a tuple with the NamespaceString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceStringOk() (string, bool) { +func (o *XmlItem) GetNamespaceStringOk() (*string, bool) { if o == nil || o.NamespaceString == nil { - var ret string - return ret, false + return nil, false } - return *o.NamespaceString, true + return o.NamespaceString, true } // HasNamespaceString returns a boolean if a field has been set. @@ -667,14 +648,13 @@ func (o *XmlItem) GetNamespaceNumber() float32 { return *o.NamespaceNumber } -// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field value if set, zero value otherwise +// GetNamespaceNumberOk returns a tuple with the NamespaceNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceNumberOk() (float32, bool) { +func (o *XmlItem) GetNamespaceNumberOk() (*float32, bool) { if o == nil || o.NamespaceNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.NamespaceNumber, true + return o.NamespaceNumber, true } // HasNamespaceNumber returns a boolean if a field has been set. @@ -700,14 +680,13 @@ func (o *XmlItem) GetNamespaceInteger() int32 { return *o.NamespaceInteger } -// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field value if set, zero value otherwise +// GetNamespaceIntegerOk returns a tuple with the NamespaceInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceIntegerOk() (int32, bool) { +func (o *XmlItem) GetNamespaceIntegerOk() (*int32, bool) { if o == nil || o.NamespaceInteger == nil { - var ret int32 - return ret, false + return nil, false } - return *o.NamespaceInteger, true + return o.NamespaceInteger, true } // HasNamespaceInteger returns a boolean if a field has been set. @@ -733,14 +712,13 @@ func (o *XmlItem) GetNamespaceBoolean() bool { return *o.NamespaceBoolean } -// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field value if set, zero value otherwise +// GetNamespaceBooleanOk returns a tuple with the NamespaceBoolean field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceBooleanOk() (bool, bool) { +func (o *XmlItem) GetNamespaceBooleanOk() (*bool, bool) { if o == nil || o.NamespaceBoolean == nil { - var ret bool - return ret, false + return nil, false } - return *o.NamespaceBoolean, true + return o.NamespaceBoolean, true } // HasNamespaceBoolean returns a boolean if a field has been set. @@ -766,14 +744,13 @@ func (o *XmlItem) GetNamespaceArray() []int32 { return *o.NamespaceArray } -// GetNamespaceArrayOk returns a tuple with the NamespaceArray field value if set, zero value otherwise +// GetNamespaceArrayOk returns a tuple with the NamespaceArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) { +func (o *XmlItem) GetNamespaceArrayOk() (*[]int32, bool) { if o == nil || o.NamespaceArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.NamespaceArray, true + return o.NamespaceArray, true } // HasNamespaceArray returns a boolean if a field has been set. @@ -799,14 +776,13 @@ func (o *XmlItem) GetNamespaceWrappedArray() []int32 { return *o.NamespaceWrappedArray } -// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field value if set, zero value otherwise +// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) { +func (o *XmlItem) GetNamespaceWrappedArrayOk() (*[]int32, bool) { if o == nil || o.NamespaceWrappedArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.NamespaceWrappedArray, true + return o.NamespaceWrappedArray, true } // HasNamespaceWrappedArray returns a boolean if a field has been set. @@ -832,14 +808,13 @@ func (o *XmlItem) GetPrefixNsString() string { return *o.PrefixNsString } -// GetPrefixNsStringOk returns a tuple with the PrefixNsString field value if set, zero value otherwise +// GetPrefixNsStringOk returns a tuple with the PrefixNsString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsStringOk() (string, bool) { +func (o *XmlItem) GetPrefixNsStringOk() (*string, bool) { if o == nil || o.PrefixNsString == nil { - var ret string - return ret, false + return nil, false } - return *o.PrefixNsString, true + return o.PrefixNsString, true } // HasPrefixNsString returns a boolean if a field has been set. @@ -865,14 +840,13 @@ func (o *XmlItem) GetPrefixNsNumber() float32 { return *o.PrefixNsNumber } -// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field value if set, zero value otherwise +// GetPrefixNsNumberOk returns a tuple with the PrefixNsNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsNumberOk() (float32, bool) { +func (o *XmlItem) GetPrefixNsNumberOk() (*float32, bool) { if o == nil || o.PrefixNsNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.PrefixNsNumber, true + return o.PrefixNsNumber, true } // HasPrefixNsNumber returns a boolean if a field has been set. @@ -898,14 +872,13 @@ func (o *XmlItem) GetPrefixNsInteger() int32 { return *o.PrefixNsInteger } -// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field value if set, zero value otherwise +// GetPrefixNsIntegerOk returns a tuple with the PrefixNsInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsIntegerOk() (int32, bool) { +func (o *XmlItem) GetPrefixNsIntegerOk() (*int32, bool) { if o == nil || o.PrefixNsInteger == nil { - var ret int32 - return ret, false + return nil, false } - return *o.PrefixNsInteger, true + return o.PrefixNsInteger, true } // HasPrefixNsInteger returns a boolean if a field has been set. @@ -931,14 +904,13 @@ func (o *XmlItem) GetPrefixNsBoolean() bool { return *o.PrefixNsBoolean } -// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field value if set, zero value otherwise +// GetPrefixNsBooleanOk returns a tuple with the PrefixNsBoolean field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsBooleanOk() (bool, bool) { +func (o *XmlItem) GetPrefixNsBooleanOk() (*bool, bool) { if o == nil || o.PrefixNsBoolean == nil { - var ret bool - return ret, false + return nil, false } - return *o.PrefixNsBoolean, true + return o.PrefixNsBoolean, true } // HasPrefixNsBoolean returns a boolean if a field has been set. @@ -964,14 +936,13 @@ func (o *XmlItem) GetPrefixNsArray() []int32 { return *o.PrefixNsArray } -// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field value if set, zero value otherwise +// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) { +func (o *XmlItem) GetPrefixNsArrayOk() (*[]int32, bool) { if o == nil || o.PrefixNsArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.PrefixNsArray, true + return o.PrefixNsArray, true } // HasPrefixNsArray returns a boolean if a field has been set. @@ -997,14 +968,13 @@ func (o *XmlItem) GetPrefixNsWrappedArray() []int32 { return *o.PrefixNsWrappedArray } -// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field value if set, zero value otherwise +// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) { +func (o *XmlItem) GetPrefixNsWrappedArrayOk() (*[]int32, bool) { if o == nil || o.PrefixNsWrappedArray == nil { - var ret []int32 - return ret, false + return nil, false } - return *o.PrefixNsWrappedArray, true + return o.PrefixNsWrappedArray, true } // HasPrefixNsWrappedArray returns a boolean if a field has been set. @@ -1021,25 +991,130 @@ 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) +} + type NullableXmlItem struct { - Value XmlItem - ExplicitNull bool + value *XmlItem + isSet bool +} + +func (v NullableXmlItem) Get() *XmlItem { + return v.value +} + +func (v *NullableXmlItem) Set(val *XmlItem) { + v.value = val + v.isSet = true +} + +func (v NullableXmlItem) IsSet() bool { + return v.isSet +} + +func (v *NullableXmlItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableXmlItem(val *XmlItem) *NullableXmlItem { + return &NullableXmlItem{value: val, isSet: true} } func (v NullableXmlItem) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableXmlItem) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/client/petstore/go-experimental/go-petstore/utils.go b/samples/client/petstore/go-experimental/go-petstore/utils.go index 3a3303b24451..9fb7a1847cd3 100644 --- a/samples/client/petstore/go-experimental/go-petstore/utils.go +++ b/samples/client/petstore/go-experimental/go-petstore/utils.go @@ -10,14 +10,10 @@ package petstore import ( - "bytes" - "encoding/json" - "errors" - "time" + "encoding/json" + "time" ) -var ErrInvalidNullable = errors.New("nullable cannot have non-zero Value and ExplicitNull simultaneously") - // PtrBool is a helper routine that returns a pointer to given integer value. func PtrBool(v bool) *bool { return &v } @@ -43,202 +39,296 @@ func PtrString(v string) *string { return &v } func PtrTime(v time.Time) *time.Time { return &v } type NullableBool struct { - Value bool - ExplicitNull bool + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} } func (v NullableBool) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableBool) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt struct { - Value int - ExplicitNull bool + value *int + isSet bool } -func (v NullableInt) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } +func (v NullableInt) Get() *int { + return v.value } +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} -func (v *NullableInt) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} - return json.Unmarshal(src, &v.Value) +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt32 struct { - Value int32 - ExplicitNull bool + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} } func (v NullableInt32) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInt32) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt64 struct { - Value int64 - ExplicitNull bool + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} } func (v NullableInt64) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInt64) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableFloat32 struct { - Value float32 - ExplicitNull bool + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} } func (v NullableFloat32) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0.0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableFloat64 struct { - Value float64 - ExplicitNull bool + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} } func (v NullableFloat64) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0.0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableString struct { - Value string - ExplicitNull bool + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} } func (v NullableString) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != "": - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableString) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableTime struct { - Value time.Time - ExplicitNull bool + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} } func (v NullableTime) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && !v.Value.IsZero(): - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return v.Value.MarshalJSON() - } + return v.value.MarshalJSON() } func (v *NullableTime) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) -} \ No newline at end of file + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index 484cf4c0edb2..19719e709f8f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -34,22 +34,22 @@ GetMapProperty returns the MapProperty field if non-nil, zero value otherwise. ### GetMapPropertyOk -`func (o *AdditionalPropertiesClass) GetMapPropertyOk() (map[string]string, bool)` +`func (o *AdditionalPropertiesClass) GetMapPropertyOk() (*map[string]string, bool)` GetMapPropertyOk returns a tuple with the MapProperty field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasMapProperty +### SetMapProperty -`func (o *AdditionalPropertiesClass) HasMapProperty() bool` +`func (o *AdditionalPropertiesClass) SetMapProperty(v map[string]string)` -HasMapProperty returns a boolean if a field has been set. +SetMapProperty sets MapProperty field to given value. -### SetMapProperty +### HasMapProperty -`func (o *AdditionalPropertiesClass) SetMapProperty(v map[string]string)` +`func (o *AdditionalPropertiesClass) HasMapProperty() bool` -SetMapProperty gets a reference to the given map[string]string and assigns it to the MapProperty field. +HasMapProperty returns a boolean if a field has been set. ### GetMapOfMapProperty @@ -59,22 +59,22 @@ GetMapOfMapProperty returns the MapOfMapProperty field if non-nil, zero value ot ### GetMapOfMapPropertyOk -`func (o *AdditionalPropertiesClass) GetMapOfMapPropertyOk() (map[string]map[string]string, bool)` +`func (o *AdditionalPropertiesClass) GetMapOfMapPropertyOk() (*map[string]map[string]string, bool)` GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasMapOfMapProperty +### SetMapOfMapProperty -`func (o *AdditionalPropertiesClass) HasMapOfMapProperty() bool` +`func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string]string)` -HasMapOfMapProperty returns a boolean if a field has been set. +SetMapOfMapProperty sets MapOfMapProperty field to given value. -### SetMapOfMapProperty +### HasMapOfMapProperty -`func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string]string)` +`func (o *AdditionalPropertiesClass) HasMapOfMapProperty() bool` -SetMapOfMapProperty gets a reference to the given map[string]map[string]string and assigns it to the MapOfMapProperty field. +HasMapOfMapProperty returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md index 8bccff5eb4d0..dd124c1d2615 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Animal.md @@ -34,22 +34,17 @@ GetClassName returns the ClassName field if non-nil, zero value otherwise. ### GetClassNameOk -`func (o *Animal) GetClassNameOk() (string, bool)` +`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. +SetClassName sets ClassName field to given value. + ### GetColor @@ -59,22 +54,22 @@ GetColor returns the Color field if non-nil, zero value otherwise. ### GetColorOk -`func (o *Animal) GetColorOk() (string, bool)` +`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 +### SetColor -`func (o *Animal) HasColor() bool` +`func (o *Animal) SetColor(v string)` -HasColor returns a boolean if a field has been set. +SetColor sets Color field to given value. -### SetColor +### HasColor -`func (o *Animal) SetColor(v string)` +`func (o *Animal) HasColor() bool` -SetColor gets a reference to the given string and assigns it to the Color field. +HasColor returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md index aeb34407fa41..877dacb4293c 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ApiResponse.md @@ -35,22 +35,22 @@ GetCode returns the Code field if non-nil, zero value otherwise. ### GetCodeOk -`func (o *ApiResponse) GetCodeOk() (int32, bool)` +`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 +### SetCode -`func (o *ApiResponse) HasCode() bool` +`func (o *ApiResponse) SetCode(v int32)` -HasCode returns a boolean if a field has been set. +SetCode sets Code field to given value. -### SetCode +### HasCode -`func (o *ApiResponse) SetCode(v int32)` +`func (o *ApiResponse) HasCode() bool` -SetCode gets a reference to the given int32 and assigns it to the Code field. +HasCode returns a boolean if a field has been set. ### GetType @@ -60,22 +60,22 @@ GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *ApiResponse) GetTypeOk() (string, bool)` +`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 +### SetType -`func (o *ApiResponse) HasType() bool` +`func (o *ApiResponse) SetType(v string)` -HasType returns a boolean if a field has been set. +SetType sets Type field to given value. -### SetType +### HasType -`func (o *ApiResponse) SetType(v string)` +`func (o *ApiResponse) HasType() bool` -SetType gets a reference to the given string and assigns it to the Type field. +HasType returns a boolean if a field has been set. ### GetMessage @@ -85,22 +85,22 @@ GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk -`func (o *ApiResponse) GetMessageOk() (string, bool)` +`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 +### SetMessage -`func (o *ApiResponse) HasMessage() bool` +`func (o *ApiResponse) SetMessage(v string)` -HasMessage returns a boolean if a field has been set. +SetMessage sets Message field to given value. -### SetMessage +### HasMessage -`func (o *ApiResponse) SetMessage(v string)` +`func (o *ApiResponse) HasMessage() bool` -SetMessage gets a reference to the given string and assigns it to the Message field. +HasMessage returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md index 882bdf15eab4..cb46da598b12 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfArrayOfNumberOnly.md @@ -33,22 +33,22 @@ GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value ot ### GetArrayArrayNumberOk -`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool)` +`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 +### SetArrayArrayNumber -`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool` +`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)` -HasArrayArrayNumber returns a boolean if a field has been set. +SetArrayArrayNumber sets ArrayArrayNumber field to given value. -### SetArrayArrayNumber +### HasArrayArrayNumber -`func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32)` +`func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool` -SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field. +HasArrayArrayNumber returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md index 7355a0ce13ef..f0aaaa443b37 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayOfNumberOnly.md @@ -33,22 +33,22 @@ GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. ### GetArrayNumberOk -`func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool)` +`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 +### SetArrayNumber -`func (o *ArrayOfNumberOnly) HasArrayNumber() bool` +`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)` -HasArrayNumber returns a boolean if a field has been set. +SetArrayNumber sets ArrayNumber field to given value. -### SetArrayNumber +### HasArrayNumber -`func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32)` +`func (o *ArrayOfNumberOnly) HasArrayNumber() bool` -SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field. +HasArrayNumber returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md index e2b623a24127..a0f8d7528c30 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ArrayTest.md @@ -35,22 +35,22 @@ GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwis ### GetArrayOfStringOk -`func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool)` +`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 +### SetArrayOfString -`func (o *ArrayTest) HasArrayOfString() bool` +`func (o *ArrayTest) SetArrayOfString(v []string)` -HasArrayOfString returns a boolean if a field has been set. +SetArrayOfString sets ArrayOfString field to given value. -### SetArrayOfString +### HasArrayOfString -`func (o *ArrayTest) SetArrayOfString(v []string)` +`func (o *ArrayTest) HasArrayOfString() bool` -SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field. +HasArrayOfString returns a boolean if a field has been set. ### GetArrayArrayOfInteger @@ -60,22 +60,22 @@ GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero va ### GetArrayArrayOfIntegerOk -`func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool)` +`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 +### SetArrayArrayOfInteger -`func (o *ArrayTest) HasArrayArrayOfInteger() bool` +`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)` -HasArrayArrayOfInteger returns a boolean if a field has been set. +SetArrayArrayOfInteger sets ArrayArrayOfInteger field to given value. -### SetArrayArrayOfInteger +### HasArrayArrayOfInteger -`func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64)` +`func (o *ArrayTest) HasArrayArrayOfInteger() bool` -SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field. +HasArrayArrayOfInteger returns a boolean if a field has been set. ### GetArrayArrayOfModel @@ -85,22 +85,22 @@ GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value ### GetArrayArrayOfModelOk -`func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool)` +`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 +### SetArrayArrayOfModel -`func (o *ArrayTest) HasArrayArrayOfModel() bool` +`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)` -HasArrayArrayOfModel returns a boolean if a field has been set. +SetArrayArrayOfModel sets ArrayArrayOfModel field to given value. -### SetArrayArrayOfModel +### HasArrayArrayOfModel -`func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst)` +`func (o *ArrayTest) HasArrayArrayOfModel() bool` -SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field. +HasArrayArrayOfModel returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md index 45c74e979030..3f37bb13e001 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Capitalization.md @@ -38,22 +38,22 @@ GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. ### GetSmallCamelOk -`func (o *Capitalization) GetSmallCamelOk() (string, bool)` +`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 +### SetSmallCamel -`func (o *Capitalization) HasSmallCamel() bool` +`func (o *Capitalization) SetSmallCamel(v string)` -HasSmallCamel returns a boolean if a field has been set. +SetSmallCamel sets SmallCamel field to given value. -### SetSmallCamel +### HasSmallCamel -`func (o *Capitalization) SetSmallCamel(v string)` +`func (o *Capitalization) HasSmallCamel() bool` -SetSmallCamel gets a reference to the given string and assigns it to the SmallCamel field. +HasSmallCamel returns a boolean if a field has been set. ### GetCapitalCamel @@ -63,22 +63,22 @@ GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. ### GetCapitalCamelOk -`func (o *Capitalization) GetCapitalCamelOk() (string, bool)` +`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 +### SetCapitalCamel -`func (o *Capitalization) HasCapitalCamel() bool` +`func (o *Capitalization) SetCapitalCamel(v string)` -HasCapitalCamel returns a boolean if a field has been set. +SetCapitalCamel sets CapitalCamel field to given value. -### SetCapitalCamel +### HasCapitalCamel -`func (o *Capitalization) SetCapitalCamel(v string)` +`func (o *Capitalization) HasCapitalCamel() bool` -SetCapitalCamel gets a reference to the given string and assigns it to the CapitalCamel field. +HasCapitalCamel returns a boolean if a field has been set. ### GetSmallSnake @@ -88,22 +88,22 @@ GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. ### GetSmallSnakeOk -`func (o *Capitalization) GetSmallSnakeOk() (string, bool)` +`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 +### SetSmallSnake -`func (o *Capitalization) HasSmallSnake() bool` +`func (o *Capitalization) SetSmallSnake(v string)` -HasSmallSnake returns a boolean if a field has been set. +SetSmallSnake sets SmallSnake field to given value. -### SetSmallSnake +### HasSmallSnake -`func (o *Capitalization) SetSmallSnake(v string)` +`func (o *Capitalization) HasSmallSnake() bool` -SetSmallSnake gets a reference to the given string and assigns it to the SmallSnake field. +HasSmallSnake returns a boolean if a field has been set. ### GetCapitalSnake @@ -113,22 +113,22 @@ GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. ### GetCapitalSnakeOk -`func (o *Capitalization) GetCapitalSnakeOk() (string, bool)` +`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 +### SetCapitalSnake -`func (o *Capitalization) HasCapitalSnake() bool` +`func (o *Capitalization) SetCapitalSnake(v string)` -HasCapitalSnake returns a boolean if a field has been set. +SetCapitalSnake sets CapitalSnake field to given value. -### SetCapitalSnake +### HasCapitalSnake -`func (o *Capitalization) SetCapitalSnake(v string)` +`func (o *Capitalization) HasCapitalSnake() bool` -SetCapitalSnake gets a reference to the given string and assigns it to the CapitalSnake field. +HasCapitalSnake returns a boolean if a field has been set. ### GetSCAETHFlowPoints @@ -138,22 +138,22 @@ GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value ot ### GetSCAETHFlowPointsOk -`func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool)` +`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 +### SetSCAETHFlowPoints -`func (o *Capitalization) HasSCAETHFlowPoints() bool` +`func (o *Capitalization) SetSCAETHFlowPoints(v string)` -HasSCAETHFlowPoints returns a boolean if a field has been set. +SetSCAETHFlowPoints sets SCAETHFlowPoints field to given value. -### SetSCAETHFlowPoints +### HasSCAETHFlowPoints -`func (o *Capitalization) SetSCAETHFlowPoints(v string)` +`func (o *Capitalization) HasSCAETHFlowPoints() bool` -SetSCAETHFlowPoints gets a reference to the given string and assigns it to the SCAETHFlowPoints field. +HasSCAETHFlowPoints returns a boolean if a field has been set. ### GetATT_NAME @@ -163,22 +163,22 @@ GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. ### GetATT_NAMEOk -`func (o *Capitalization) GetATT_NAMEOk() (string, bool)` +`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 +### SetATT_NAME -`func (o *Capitalization) HasATT_NAME() bool` +`func (o *Capitalization) SetATT_NAME(v string)` -HasATT_NAME returns a boolean if a field has been set. +SetATT_NAME sets ATT_NAME field to given value. -### SetATT_NAME +### HasATT_NAME -`func (o *Capitalization) SetATT_NAME(v string)` +`func (o *Capitalization) HasATT_NAME() bool` -SetATT_NAME gets a reference to the given string and assigns it to the ATT_NAME field. +HasATT_NAME returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md index 415cabfdce7a..9f7f4f783cb0 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Cat.md @@ -33,22 +33,22 @@ GetDeclawed returns the Declawed field if non-nil, zero value otherwise. ### GetDeclawedOk -`func (o *Cat) GetDeclawedOk() (bool, bool)` +`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 +### SetDeclawed -`func (o *Cat) HasDeclawed() bool` +`func (o *Cat) SetDeclawed(v bool)` -HasDeclawed returns a boolean if a field has been set. +SetDeclawed sets Declawed field to given value. -### SetDeclawed +### HasDeclawed -`func (o *Cat) SetDeclawed(v bool)` +`func (o *Cat) HasDeclawed() bool` -SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +HasDeclawed returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md index 62d0919f473c..be0cc6c8519a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/CatAllOf.md @@ -33,22 +33,22 @@ GetDeclawed returns the Declawed field if non-nil, zero value otherwise. ### GetDeclawedOk -`func (o *CatAllOf) GetDeclawedOk() (bool, bool)` +`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 +### SetDeclawed -`func (o *CatAllOf) HasDeclawed() bool` +`func (o *CatAllOf) SetDeclawed(v bool)` -HasDeclawed returns a boolean if a field has been set. +SetDeclawed sets Declawed field to given value. -### SetDeclawed +### HasDeclawed -`func (o *CatAllOf) SetDeclawed(v bool)` +`func (o *CatAllOf) HasDeclawed() bool` -SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. +HasDeclawed returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md index 7f77b6cc7a20..0fa542e093ae 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Category.md @@ -34,22 +34,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Category) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *Category) HasId() bool` +`func (o *Category) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *Category) SetId(v int64)` +`func (o *Category) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetName @@ -59,22 +59,17 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Category) GetNameOk() (string, bool)` +`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. +SetName sets Name field to given value. + [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md index 11a115ee706e..51954107bc01 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ClassModel.md @@ -33,22 +33,22 @@ GetClass returns the Class field if non-nil, zero value otherwise. ### GetClassOk -`func (o *ClassModel) GetClassOk() (string, bool)` +`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 +### SetClass -`func (o *ClassModel) HasClass() bool` +`func (o *ClassModel) SetClass(v string)` -HasClass returns a boolean if a field has been set. +SetClass sets Class field to given value. -### SetClass +### HasClass -`func (o *ClassModel) SetClass(v string)` +`func (o *ClassModel) HasClass() bool` -SetClass gets a reference to the given string and assigns it to the Class field. +HasClass returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md index 187225fe5adc..e24e7c05be58 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Client.md @@ -33,22 +33,22 @@ GetClient returns the Client field if non-nil, zero value otherwise. ### GetClientOk -`func (o *Client) GetClientOk() (string, bool)` +`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 +### SetClient -`func (o *Client) HasClient() bool` +`func (o *Client) SetClient(v string)` -HasClient returns a boolean if a field has been set. +SetClient sets Client field to given value. -### SetClient +### HasClient -`func (o *Client) SetClient(v string)` +`func (o *Client) HasClient() bool` -SetClient gets a reference to the given string and assigns it to the Client field. +HasClient returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md index 1251c1b134fe..edf746aaf555 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Dog.md @@ -33,22 +33,22 @@ GetBreed returns the Breed field if non-nil, zero value otherwise. ### GetBreedOk -`func (o *Dog) GetBreedOk() (string, bool)` +`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 +### SetBreed -`func (o *Dog) HasBreed() bool` +`func (o *Dog) SetBreed(v string)` -HasBreed returns a boolean if a field has been set. +SetBreed sets Breed field to given value. -### SetBreed +### HasBreed -`func (o *Dog) SetBreed(v string)` +`func (o *Dog) HasBreed() bool` -SetBreed gets a reference to the given string and assigns it to the Breed field. +HasBreed returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md index 177637eeaa8c..3ed4dfa5ea21 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DogAllOf.md @@ -33,22 +33,22 @@ GetBreed returns the Breed field if non-nil, zero value otherwise. ### GetBreedOk -`func (o *DogAllOf) GetBreedOk() (string, bool)` +`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 +### SetBreed -`func (o *DogAllOf) HasBreed() bool` +`func (o *DogAllOf) SetBreed(v string)` -HasBreed returns a boolean if a field has been set. +SetBreed sets Breed field to given value. -### SetBreed +### HasBreed -`func (o *DogAllOf) SetBreed(v string)` +`func (o *DogAllOf) HasBreed() bool` -SetBreed gets a reference to the given string and assigns it to the Breed field. +HasBreed returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md index 684a0f982b5b..28011e23f568 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumArrays.md @@ -34,22 +34,22 @@ GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. ### GetJustSymbolOk -`func (o *EnumArrays) GetJustSymbolOk() (string, bool)` +`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 +### SetJustSymbol -`func (o *EnumArrays) HasJustSymbol() bool` +`func (o *EnumArrays) SetJustSymbol(v string)` -HasJustSymbol returns a boolean if a field has been set. +SetJustSymbol sets JustSymbol field to given value. -### SetJustSymbol +### HasJustSymbol -`func (o *EnumArrays) SetJustSymbol(v string)` +`func (o *EnumArrays) HasJustSymbol() bool` -SetJustSymbol gets a reference to the given string and assigns it to the JustSymbol field. +HasJustSymbol returns a boolean if a field has been set. ### GetArrayEnum @@ -59,22 +59,22 @@ GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. ### GetArrayEnumOk -`func (o *EnumArrays) GetArrayEnumOk() ([]string, bool)` +`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 +### SetArrayEnum -`func (o *EnumArrays) HasArrayEnum() bool` +`func (o *EnumArrays) SetArrayEnum(v []string)` -HasArrayEnum returns a boolean if a field has been set. +SetArrayEnum sets ArrayEnum field to given value. -### SetArrayEnum +### HasArrayEnum -`func (o *EnumArrays) SetArrayEnum(v []string)` +`func (o *EnumArrays) HasArrayEnum() bool` -SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field. +HasArrayEnum returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md index 5b9e283f0795..451b33b57c82 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/EnumTest.md @@ -40,22 +40,22 @@ GetEnumString returns the EnumString field if non-nil, zero value otherwise. ### GetEnumStringOk -`func (o *EnumTest) GetEnumStringOk() (string, bool)` +`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 +### SetEnumString -`func (o *EnumTest) HasEnumString() bool` +`func (o *EnumTest) SetEnumString(v string)` -HasEnumString returns a boolean if a field has been set. +SetEnumString sets EnumString field to given value. -### SetEnumString +### HasEnumString -`func (o *EnumTest) SetEnumString(v string)` +`func (o *EnumTest) HasEnumString() bool` -SetEnumString gets a reference to the given string and assigns it to the EnumString field. +HasEnumString returns a boolean if a field has been set. ### GetEnumStringRequired @@ -65,22 +65,17 @@ GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero valu ### GetEnumStringRequiredOk -`func (o *EnumTest) GetEnumStringRequiredOk() (string, bool)` +`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. +SetEnumStringRequired sets EnumStringRequired field to given value. + ### GetEnumInteger @@ -90,22 +85,22 @@ GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. ### GetEnumIntegerOk -`func (o *EnumTest) GetEnumIntegerOk() (int32, bool)` +`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 +### SetEnumInteger -`func (o *EnumTest) HasEnumInteger() bool` +`func (o *EnumTest) SetEnumInteger(v int32)` -HasEnumInteger returns a boolean if a field has been set. +SetEnumInteger sets EnumInteger field to given value. -### SetEnumInteger +### HasEnumInteger -`func (o *EnumTest) SetEnumInteger(v int32)` +`func (o *EnumTest) HasEnumInteger() bool` -SetEnumInteger gets a reference to the given int32 and assigns it to the EnumInteger field. +HasEnumInteger returns a boolean if a field has been set. ### GetEnumNumber @@ -115,55 +110,58 @@ GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. ### GetEnumNumberOk -`func (o *EnumTest) GetEnumNumberOk() (float64, bool)` +`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 +### SetEnumNumber -`func (o *EnumTest) HasEnumNumber() bool` +`func (o *EnumTest) SetEnumNumber(v float64)` -HasEnumNumber returns a boolean if a field has been set. +SetEnumNumber sets EnumNumber field to given value. -### SetEnumNumber +### HasEnumNumber -`func (o *EnumTest) SetEnumNumber(v float64)` +`func (o *EnumTest) HasEnumNumber() bool` -SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNumber field. +HasEnumNumber returns a boolean if a field has been set. ### GetOuterEnum -`func (o *EnumTest) GetOuterEnum() NullableOuterEnum` +`func (o *EnumTest) GetOuterEnum() OuterEnum` GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. ### GetOuterEnumOk -`func (o *EnumTest) GetOuterEnumOk() (NullableOuterEnum, bool)` +`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. +### SetOuterEnum + +`func (o *EnumTest) SetOuterEnum(v OuterEnum)` + +SetOuterEnum sets OuterEnum field to given value. + ### HasOuterEnum `func (o *EnumTest) HasOuterEnum() bool` HasOuterEnum returns a boolean if a field has been set. -### SetOuterEnum - -`func (o *EnumTest) SetOuterEnum(v NullableOuterEnum)` +### SetOuterEnumNil -SetOuterEnum gets a reference to the given NullableOuterEnum and assigns it to the OuterEnum field. +`func (o *EnumTest) SetOuterEnumNil(b bool)` -### SetOuterEnumExplicitNull + SetOuterEnumNil sets the value for OuterEnum to be an explicit nil -`func (o *EnumTest) SetOuterEnumExplicitNull(b bool)` +### UnsetOuterEnum +`func (o *EnumTest) UnsetOuterEnum()` -SetOuterEnumExplicitNull (un)sets OuterEnum to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The OuterEnum value is set to nil even if false is passed +UnsetOuterEnum ensures that no value is present for OuterEnum, not even an explicit nil ### GetOuterEnumInteger `func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger` @@ -172,22 +170,22 @@ GetOuterEnumInteger returns the OuterEnumInteger field if non-nil, zero value ot ### GetOuterEnumIntegerOk -`func (o *EnumTest) GetOuterEnumIntegerOk() (OuterEnumInteger, bool)` +`func (o *EnumTest) GetOuterEnumIntegerOk() (*OuterEnumInteger, bool)` GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasOuterEnumInteger +### SetOuterEnumInteger -`func (o *EnumTest) HasOuterEnumInteger() bool` +`func (o *EnumTest) SetOuterEnumInteger(v OuterEnumInteger)` -HasOuterEnumInteger returns a boolean if a field has been set. +SetOuterEnumInteger sets OuterEnumInteger field to given value. -### SetOuterEnumInteger +### HasOuterEnumInteger -`func (o *EnumTest) SetOuterEnumInteger(v OuterEnumInteger)` +`func (o *EnumTest) HasOuterEnumInteger() bool` -SetOuterEnumInteger gets a reference to the given OuterEnumInteger and assigns it to the OuterEnumInteger field. +HasOuterEnumInteger returns a boolean if a field has been set. ### GetOuterEnumDefaultValue @@ -197,22 +195,22 @@ GetOuterEnumDefaultValue returns the OuterEnumDefaultValue field if non-nil, zer ### GetOuterEnumDefaultValueOk -`func (o *EnumTest) GetOuterEnumDefaultValueOk() (OuterEnumDefaultValue, bool)` +`func (o *EnumTest) GetOuterEnumDefaultValueOk() (*OuterEnumDefaultValue, bool)` GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasOuterEnumDefaultValue +### SetOuterEnumDefaultValue -`func (o *EnumTest) HasOuterEnumDefaultValue() bool` +`func (o *EnumTest) SetOuterEnumDefaultValue(v OuterEnumDefaultValue)` -HasOuterEnumDefaultValue returns a boolean if a field has been set. +SetOuterEnumDefaultValue sets OuterEnumDefaultValue field to given value. -### SetOuterEnumDefaultValue +### HasOuterEnumDefaultValue -`func (o *EnumTest) SetOuterEnumDefaultValue(v OuterEnumDefaultValue)` +`func (o *EnumTest) HasOuterEnumDefaultValue() bool` -SetOuterEnumDefaultValue gets a reference to the given OuterEnumDefaultValue and assigns it to the OuterEnumDefaultValue field. +HasOuterEnumDefaultValue returns a boolean if a field has been set. ### GetOuterEnumIntegerDefaultValue @@ -222,22 +220,22 @@ GetOuterEnumIntegerDefaultValue returns the OuterEnumIntegerDefaultValue field i ### GetOuterEnumIntegerDefaultValueOk -`func (o *EnumTest) GetOuterEnumIntegerDefaultValueOk() (OuterEnumIntegerDefaultValue, bool)` +`func (o *EnumTest) GetOuterEnumIntegerDefaultValueOk() (*OuterEnumIntegerDefaultValue, bool)` GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasOuterEnumIntegerDefaultValue +### SetOuterEnumIntegerDefaultValue -`func (o *EnumTest) HasOuterEnumIntegerDefaultValue() bool` +`func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValue)` -HasOuterEnumIntegerDefaultValue returns a boolean if a field has been set. +SetOuterEnumIntegerDefaultValue sets OuterEnumIntegerDefaultValue field to given value. -### SetOuterEnumIntegerDefaultValue +### HasOuterEnumIntegerDefaultValue -`func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValue)` +`func (o *EnumTest) HasOuterEnumIntegerDefaultValue() bool` -SetOuterEnumIntegerDefaultValue gets a reference to the given OuterEnumIntegerDefaultValue and assigns it to the OuterEnumIntegerDefaultValue field. +HasOuterEnumIntegerDefaultValue returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md index 507191f19b60..91fe90e06f14 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/File.md @@ -33,22 +33,22 @@ GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. ### GetSourceURIOk -`func (o *File) GetSourceURIOk() (string, bool)` +`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 +### SetSourceURI -`func (o *File) HasSourceURI() bool` +`func (o *File) SetSourceURI(v string)` -HasSourceURI returns a boolean if a field has been set. +SetSourceURI sets SourceURI field to given value. -### SetSourceURI +### HasSourceURI -`func (o *File) SetSourceURI(v string)` +`func (o *File) HasSourceURI() bool` -SetSourceURI gets a reference to the given string and assigns it to the SourceURI field. +HasSourceURI returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md index 37f671ef8f87..2db8eb31902f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FileSchemaTestClass.md @@ -34,22 +34,22 @@ GetFile returns the File field if non-nil, zero value otherwise. ### GetFileOk -`func (o *FileSchemaTestClass) GetFileOk() (File, bool)` +`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 +### SetFile -`func (o *FileSchemaTestClass) HasFile() bool` +`func (o *FileSchemaTestClass) SetFile(v File)` -HasFile returns a boolean if a field has been set. +SetFile sets File field to given value. -### SetFile +### HasFile -`func (o *FileSchemaTestClass) SetFile(v File)` +`func (o *FileSchemaTestClass) HasFile() bool` -SetFile gets a reference to the given File and assigns it to the File field. +HasFile returns a boolean if a field has been set. ### GetFiles @@ -59,22 +59,22 @@ GetFiles returns the Files field if non-nil, zero value otherwise. ### GetFilesOk -`func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool)` +`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 +### SetFiles -`func (o *FileSchemaTestClass) HasFiles() bool` +`func (o *FileSchemaTestClass) SetFiles(v []File)` -HasFiles returns a boolean if a field has been set. +SetFiles sets Files field to given value. -### SetFiles +### HasFiles -`func (o *FileSchemaTestClass) SetFiles(v []File)` +`func (o *FileSchemaTestClass) HasFiles() bool` -SetFiles gets a reference to the given []File and assigns it to the Files field. +HasFiles returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md index cc5a7d167c18..7f1593a87f45 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Foo.md @@ -33,22 +33,22 @@ GetBar returns the Bar field if non-nil, zero value otherwise. ### GetBarOk -`func (o *Foo) GetBarOk() (string, bool)` +`func (o *Foo) 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 +### SetBar -`func (o *Foo) HasBar() bool` +`func (o *Foo) SetBar(v string)` -HasBar returns a boolean if a field has been set. +SetBar sets Bar field to given value. -### SetBar +### HasBar -`func (o *Foo) SetBar(v string)` +`func (o *Foo) HasBar() bool` -SetBar gets a reference to the given string and assigns it to the Bar field. +HasBar returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md index 39ddbd49dd0d..d6b81be4e115 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FormatTest.md @@ -47,22 +47,22 @@ GetInteger returns the Integer field if non-nil, zero value otherwise. ### GetIntegerOk -`func (o *FormatTest) GetIntegerOk() (int32, bool)` +`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 +### SetInteger -`func (o *FormatTest) HasInteger() bool` +`func (o *FormatTest) SetInteger(v int32)` -HasInteger returns a boolean if a field has been set. +SetInteger sets Integer field to given value. -### SetInteger +### HasInteger -`func (o *FormatTest) SetInteger(v int32)` +`func (o *FormatTest) HasInteger() bool` -SetInteger gets a reference to the given int32 and assigns it to the Integer field. +HasInteger returns a boolean if a field has been set. ### GetInt32 @@ -72,22 +72,22 @@ GetInt32 returns the Int32 field if non-nil, zero value otherwise. ### GetInt32Ok -`func (o *FormatTest) GetInt32Ok() (int32, bool)` +`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 +### SetInt32 -`func (o *FormatTest) HasInt32() bool` +`func (o *FormatTest) SetInt32(v int32)` -HasInt32 returns a boolean if a field has been set. +SetInt32 sets Int32 field to given value. -### SetInt32 +### HasInt32 -`func (o *FormatTest) SetInt32(v int32)` +`func (o *FormatTest) HasInt32() bool` -SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. +HasInt32 returns a boolean if a field has been set. ### GetInt64 @@ -97,22 +97,22 @@ GetInt64 returns the Int64 field if non-nil, zero value otherwise. ### GetInt64Ok -`func (o *FormatTest) GetInt64Ok() (int64, bool)` +`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 +### SetInt64 -`func (o *FormatTest) HasInt64() bool` +`func (o *FormatTest) SetInt64(v int64)` -HasInt64 returns a boolean if a field has been set. +SetInt64 sets Int64 field to given value. -### SetInt64 +### HasInt64 -`func (o *FormatTest) SetInt64(v int64)` +`func (o *FormatTest) HasInt64() bool` -SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. +HasInt64 returns a boolean if a field has been set. ### GetNumber @@ -122,22 +122,17 @@ GetNumber returns the Number field if non-nil, zero value otherwise. ### GetNumberOk -`func (o *FormatTest) GetNumberOk() (float32, bool)` +`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. +SetNumber sets Number field to given value. + ### GetFloat @@ -147,22 +142,22 @@ GetFloat returns the Float field if non-nil, zero value otherwise. ### GetFloatOk -`func (o *FormatTest) GetFloatOk() (float32, bool)` +`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 +### SetFloat -`func (o *FormatTest) HasFloat() bool` +`func (o *FormatTest) SetFloat(v float32)` -HasFloat returns a boolean if a field has been set. +SetFloat sets Float field to given value. -### SetFloat +### HasFloat -`func (o *FormatTest) SetFloat(v float32)` +`func (o *FormatTest) HasFloat() bool` -SetFloat gets a reference to the given float32 and assigns it to the Float field. +HasFloat returns a boolean if a field has been set. ### GetDouble @@ -172,22 +167,22 @@ GetDouble returns the Double field if non-nil, zero value otherwise. ### GetDoubleOk -`func (o *FormatTest) GetDoubleOk() (float64, bool)` +`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 +### SetDouble -`func (o *FormatTest) HasDouble() bool` +`func (o *FormatTest) SetDouble(v float64)` -HasDouble returns a boolean if a field has been set. +SetDouble sets Double field to given value. -### SetDouble +### HasDouble -`func (o *FormatTest) SetDouble(v float64)` +`func (o *FormatTest) HasDouble() bool` -SetDouble gets a reference to the given float64 and assigns it to the Double field. +HasDouble returns a boolean if a field has been set. ### GetString @@ -197,22 +192,22 @@ GetString returns the String field if non-nil, zero value otherwise. ### GetStringOk -`func (o *FormatTest) GetStringOk() (string, bool)` +`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 +### SetString -`func (o *FormatTest) HasString() bool` +`func (o *FormatTest) SetString(v string)` -HasString returns a boolean if a field has been set. +SetString sets String field to given value. -### SetString +### HasString -`func (o *FormatTest) SetString(v string)` +`func (o *FormatTest) HasString() bool` -SetString gets a reference to the given string and assigns it to the String field. +HasString returns a boolean if a field has been set. ### GetByte @@ -222,22 +217,17 @@ GetByte returns the Byte field if non-nil, zero value otherwise. ### GetByteOk -`func (o *FormatTest) GetByteOk() (string, bool)` +`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. +SetByte sets Byte field to given value. + ### GetBinary @@ -247,22 +237,22 @@ GetBinary returns the Binary field if non-nil, zero value otherwise. ### GetBinaryOk -`func (o *FormatTest) GetBinaryOk() (*os.File, bool)` +`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 +### SetBinary -`func (o *FormatTest) HasBinary() bool` +`func (o *FormatTest) SetBinary(v *os.File)` -HasBinary returns a boolean if a field has been set. +SetBinary sets Binary field to given value. -### SetBinary +### HasBinary -`func (o *FormatTest) SetBinary(v *os.File)` +`func (o *FormatTest) HasBinary() bool` -SetBinary gets a reference to the given *os.File and assigns it to the Binary field. +HasBinary returns a boolean if a field has been set. ### GetDate @@ -272,22 +262,17 @@ GetDate returns the Date field if non-nil, zero value otherwise. ### GetDateOk -`func (o *FormatTest) GetDateOk() (string, bool)` +`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. +SetDate sets Date field to given value. + ### GetDateTime @@ -297,22 +282,22 @@ GetDateTime returns the DateTime field if non-nil, zero value otherwise. ### GetDateTimeOk -`func (o *FormatTest) GetDateTimeOk() (time.Time, bool)` +`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 +### SetDateTime -`func (o *FormatTest) HasDateTime() bool` +`func (o *FormatTest) SetDateTime(v time.Time)` -HasDateTime returns a boolean if a field has been set. +SetDateTime sets DateTime field to given value. -### SetDateTime +### HasDateTime -`func (o *FormatTest) SetDateTime(v time.Time)` +`func (o *FormatTest) HasDateTime() bool` -SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +HasDateTime returns a boolean if a field has been set. ### GetUuid @@ -322,22 +307,22 @@ GetUuid returns the Uuid field if non-nil, zero value otherwise. ### GetUuidOk -`func (o *FormatTest) GetUuidOk() (string, bool)` +`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 +### SetUuid -`func (o *FormatTest) HasUuid() bool` +`func (o *FormatTest) SetUuid(v string)` -HasUuid returns a boolean if a field has been set. +SetUuid sets Uuid field to given value. -### SetUuid +### HasUuid -`func (o *FormatTest) SetUuid(v string)` +`func (o *FormatTest) HasUuid() bool` -SetUuid gets a reference to the given string and assigns it to the Uuid field. +HasUuid returns a boolean if a field has been set. ### GetPassword @@ -347,22 +332,17 @@ GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk -`func (o *FormatTest) GetPasswordOk() (string, bool)` +`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. +SetPassword sets Password field to given value. + ### GetPatternWithDigits @@ -372,22 +352,22 @@ GetPatternWithDigits returns the PatternWithDigits field if non-nil, zero value ### GetPatternWithDigitsOk -`func (o *FormatTest) GetPatternWithDigitsOk() (string, bool)` +`func (o *FormatTest) GetPatternWithDigitsOk() (*string, bool)` GetPatternWithDigitsOk returns a tuple with the PatternWithDigits field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPatternWithDigits +### SetPatternWithDigits -`func (o *FormatTest) HasPatternWithDigits() bool` +`func (o *FormatTest) SetPatternWithDigits(v string)` -HasPatternWithDigits returns a boolean if a field has been set. +SetPatternWithDigits sets PatternWithDigits field to given value. -### SetPatternWithDigits +### HasPatternWithDigits -`func (o *FormatTest) SetPatternWithDigits(v string)` +`func (o *FormatTest) HasPatternWithDigits() bool` -SetPatternWithDigits gets a reference to the given string and assigns it to the PatternWithDigits field. +HasPatternWithDigits returns a boolean if a field has been set. ### GetPatternWithDigitsAndDelimiter @@ -397,22 +377,22 @@ GetPatternWithDigitsAndDelimiter returns the PatternWithDigitsAndDelimiter field ### GetPatternWithDigitsAndDelimiterOk -`func (o *FormatTest) GetPatternWithDigitsAndDelimiterOk() (string, bool)` +`func (o *FormatTest) GetPatternWithDigitsAndDelimiterOk() (*string, bool)` GetPatternWithDigitsAndDelimiterOk returns a tuple with the PatternWithDigitsAndDelimiter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPatternWithDigitsAndDelimiter +### SetPatternWithDigitsAndDelimiter -`func (o *FormatTest) HasPatternWithDigitsAndDelimiter() bool` +`func (o *FormatTest) SetPatternWithDigitsAndDelimiter(v string)` -HasPatternWithDigitsAndDelimiter returns a boolean if a field has been set. +SetPatternWithDigitsAndDelimiter sets PatternWithDigitsAndDelimiter field to given value. -### SetPatternWithDigitsAndDelimiter +### HasPatternWithDigitsAndDelimiter -`func (o *FormatTest) SetPatternWithDigitsAndDelimiter(v string)` +`func (o *FormatTest) HasPatternWithDigitsAndDelimiter() bool` -SetPatternWithDigitsAndDelimiter gets a reference to the given string and assigns it to the PatternWithDigitsAndDelimiter field. +HasPatternWithDigitsAndDelimiter returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md index 84d8266d59f7..7f54d772840e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HasOnlyReadOnly.md @@ -34,22 +34,22 @@ GetBar returns the Bar field if non-nil, zero value otherwise. ### GetBarOk -`func (o *HasOnlyReadOnly) GetBarOk() (string, bool)` +`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 +### SetBar -`func (o *HasOnlyReadOnly) HasBar() bool` +`func (o *HasOnlyReadOnly) SetBar(v string)` -HasBar returns a boolean if a field has been set. +SetBar sets Bar field to given value. -### SetBar +### HasBar -`func (o *HasOnlyReadOnly) SetBar(v string)` +`func (o *HasOnlyReadOnly) HasBar() bool` -SetBar gets a reference to the given string and assigns it to the Bar field. +HasBar returns a boolean if a field has been set. ### GetFoo @@ -59,22 +59,22 @@ GetFoo returns the Foo field if non-nil, zero value otherwise. ### GetFooOk -`func (o *HasOnlyReadOnly) GetFooOk() (string, bool)` +`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 +### SetFoo -`func (o *HasOnlyReadOnly) HasFoo() bool` +`func (o *HasOnlyReadOnly) SetFoo(v string)` -HasFoo returns a boolean if a field has been set. +SetFoo sets Foo field to given value. -### SetFoo +### HasFoo -`func (o *HasOnlyReadOnly) SetFoo(v string)` +`func (o *HasOnlyReadOnly) HasFoo() bool` -SetFoo gets a reference to the given string and assigns it to the Foo field. +HasFoo returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md index e6e68f1ee875..7f057faf717e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/HealthCheckResult.md @@ -27,36 +27,39 @@ but it doesn't guarantee that properties required by API are set ### GetNullableMessage -`func (o *HealthCheckResult) GetNullableMessage() NullableString` +`func (o *HealthCheckResult) GetNullableMessage() string` GetNullableMessage returns the NullableMessage field if non-nil, zero value otherwise. ### GetNullableMessageOk -`func (o *HealthCheckResult) GetNullableMessageOk() (NullableString, bool)` +`func (o *HealthCheckResult) GetNullableMessageOk() (*string, bool)` GetNullableMessageOk returns a tuple with the NullableMessage field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetNullableMessage + +`func (o *HealthCheckResult) SetNullableMessage(v string)` + +SetNullableMessage sets NullableMessage field to given value. + ### HasNullableMessage `func (o *HealthCheckResult) HasNullableMessage() bool` HasNullableMessage returns a boolean if a field has been set. -### SetNullableMessage - -`func (o *HealthCheckResult) SetNullableMessage(v NullableString)` +### SetNullableMessageNil -SetNullableMessage gets a reference to the given NullableString and assigns it to the NullableMessage field. +`func (o *HealthCheckResult) SetNullableMessageNil(b bool)` -### SetNullableMessageExplicitNull + SetNullableMessageNil sets the value for NullableMessage to be an explicit nil -`func (o *HealthCheckResult) SetNullableMessageExplicitNull(b bool)` +### UnsetNullableMessage +`func (o *HealthCheckResult) UnsetNullableMessage()` -SetNullableMessageExplicitNull (un)sets NullableMessage to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The NullableMessage value is set to nil even if false is passed +UnsetNullableMessage ensures that no value is present for NullableMessage, not even an explicit nil [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md index c66650dd3424..4b0ad91e3902 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject.md @@ -34,22 +34,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *InlineObject) GetNameOk() (string, bool)` +`func (o *InlineObject) 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 +### SetName -`func (o *InlineObject) HasName() bool` +`func (o *InlineObject) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *InlineObject) SetName(v string)` +`func (o *InlineObject) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. ### GetStatus @@ -59,22 +59,22 @@ GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *InlineObject) GetStatusOk() (string, bool)` +`func (o *InlineObject) 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 +### SetStatus -`func (o *InlineObject) HasStatus() bool` +`func (o *InlineObject) SetStatus(v string)` -HasStatus returns a boolean if a field has been set. +SetStatus sets Status field to given value. -### SetStatus +### HasStatus -`func (o *InlineObject) SetStatus(v string)` +`func (o *InlineObject) HasStatus() bool` -SetStatus gets a reference to the given string and assigns it to the Status field. +HasStatus returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md index 1caf7147c74f..ab137f8670fc 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject1.md @@ -34,22 +34,22 @@ GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero valu ### GetAdditionalMetadataOk -`func (o *InlineObject1) GetAdditionalMetadataOk() (string, bool)` +`func (o *InlineObject1) GetAdditionalMetadataOk() (*string, bool)` GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasAdditionalMetadata +### SetAdditionalMetadata -`func (o *InlineObject1) HasAdditionalMetadata() bool` +`func (o *InlineObject1) SetAdditionalMetadata(v string)` -HasAdditionalMetadata returns a boolean if a field has been set. +SetAdditionalMetadata sets AdditionalMetadata field to given value. -### SetAdditionalMetadata +### HasAdditionalMetadata -`func (o *InlineObject1) SetAdditionalMetadata(v string)` +`func (o *InlineObject1) HasAdditionalMetadata() bool` -SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field. +HasAdditionalMetadata returns a boolean if a field has been set. ### GetFile @@ -59,22 +59,22 @@ GetFile returns the File field if non-nil, zero value otherwise. ### GetFileOk -`func (o *InlineObject1) GetFileOk() (*os.File, bool)` +`func (o *InlineObject1) GetFileOk() (**os.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 +### SetFile -`func (o *InlineObject1) HasFile() bool` +`func (o *InlineObject1) SetFile(v *os.File)` -HasFile returns a boolean if a field has been set. +SetFile sets File field to given value. -### SetFile +### HasFile -`func (o *InlineObject1) SetFile(v *os.File)` +`func (o *InlineObject1) HasFile() bool` -SetFile gets a reference to the given *os.File and assigns it to the File field. +HasFile returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md index c2ce332c6dd2..0b6a0dbf0a42 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject2.md @@ -34,22 +34,22 @@ GetEnumFormStringArray returns the EnumFormStringArray field if non-nil, zero va ### GetEnumFormStringArrayOk -`func (o *InlineObject2) GetEnumFormStringArrayOk() ([]string, bool)` +`func (o *InlineObject2) GetEnumFormStringArrayOk() (*[]string, bool)` GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasEnumFormStringArray +### SetEnumFormStringArray -`func (o *InlineObject2) HasEnumFormStringArray() bool` +`func (o *InlineObject2) SetEnumFormStringArray(v []string)` -HasEnumFormStringArray returns a boolean if a field has been set. +SetEnumFormStringArray sets EnumFormStringArray field to given value. -### SetEnumFormStringArray +### HasEnumFormStringArray -`func (o *InlineObject2) SetEnumFormStringArray(v []string)` +`func (o *InlineObject2) HasEnumFormStringArray() bool` -SetEnumFormStringArray gets a reference to the given []string and assigns it to the EnumFormStringArray field. +HasEnumFormStringArray returns a boolean if a field has been set. ### GetEnumFormString @@ -59,22 +59,22 @@ GetEnumFormString returns the EnumFormString field if non-nil, zero value otherw ### GetEnumFormStringOk -`func (o *InlineObject2) GetEnumFormStringOk() (string, bool)` +`func (o *InlineObject2) GetEnumFormStringOk() (*string, bool)` GetEnumFormStringOk returns a tuple with the EnumFormString field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasEnumFormString +### SetEnumFormString -`func (o *InlineObject2) HasEnumFormString() bool` +`func (o *InlineObject2) SetEnumFormString(v string)` -HasEnumFormString returns a boolean if a field has been set. +SetEnumFormString sets EnumFormString field to given value. -### SetEnumFormString +### HasEnumFormString -`func (o *InlineObject2) SetEnumFormString(v string)` +`func (o *InlineObject2) HasEnumFormString() bool` -SetEnumFormString gets a reference to the given string and assigns it to the EnumFormString field. +HasEnumFormString returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md index 4511d3c16404..e0ababa0b506 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject3.md @@ -46,22 +46,22 @@ GetInteger returns the Integer field if non-nil, zero value otherwise. ### GetIntegerOk -`func (o *InlineObject3) GetIntegerOk() (int32, bool)` +`func (o *InlineObject3) 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 +### SetInteger -`func (o *InlineObject3) HasInteger() bool` +`func (o *InlineObject3) SetInteger(v int32)` -HasInteger returns a boolean if a field has been set. +SetInteger sets Integer field to given value. -### SetInteger +### HasInteger -`func (o *InlineObject3) SetInteger(v int32)` +`func (o *InlineObject3) HasInteger() bool` -SetInteger gets a reference to the given int32 and assigns it to the Integer field. +HasInteger returns a boolean if a field has been set. ### GetInt32 @@ -71,22 +71,22 @@ GetInt32 returns the Int32 field if non-nil, zero value otherwise. ### GetInt32Ok -`func (o *InlineObject3) GetInt32Ok() (int32, bool)` +`func (o *InlineObject3) 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 +### SetInt32 -`func (o *InlineObject3) HasInt32() bool` +`func (o *InlineObject3) SetInt32(v int32)` -HasInt32 returns a boolean if a field has been set. +SetInt32 sets Int32 field to given value. -### SetInt32 +### HasInt32 -`func (o *InlineObject3) SetInt32(v int32)` +`func (o *InlineObject3) HasInt32() bool` -SetInt32 gets a reference to the given int32 and assigns it to the Int32 field. +HasInt32 returns a boolean if a field has been set. ### GetInt64 @@ -96,22 +96,22 @@ GetInt64 returns the Int64 field if non-nil, zero value otherwise. ### GetInt64Ok -`func (o *InlineObject3) GetInt64Ok() (int64, bool)` +`func (o *InlineObject3) 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 +### SetInt64 -`func (o *InlineObject3) HasInt64() bool` +`func (o *InlineObject3) SetInt64(v int64)` -HasInt64 returns a boolean if a field has been set. +SetInt64 sets Int64 field to given value. -### SetInt64 +### HasInt64 -`func (o *InlineObject3) SetInt64(v int64)` +`func (o *InlineObject3) HasInt64() bool` -SetInt64 gets a reference to the given int64 and assigns it to the Int64 field. +HasInt64 returns a boolean if a field has been set. ### GetNumber @@ -121,22 +121,17 @@ GetNumber returns the Number field if non-nil, zero value otherwise. ### GetNumberOk -`func (o *InlineObject3) GetNumberOk() (float32, bool)` +`func (o *InlineObject3) 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 *InlineObject3) HasNumber() bool` - -HasNumber returns a boolean if a field has been set. - ### SetNumber `func (o *InlineObject3) SetNumber(v float32)` -SetNumber gets a reference to the given float32 and assigns it to the Number field. +SetNumber sets Number field to given value. + ### GetFloat @@ -146,22 +141,22 @@ GetFloat returns the Float field if non-nil, zero value otherwise. ### GetFloatOk -`func (o *InlineObject3) GetFloatOk() (float32, bool)` +`func (o *InlineObject3) 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 +### SetFloat -`func (o *InlineObject3) HasFloat() bool` +`func (o *InlineObject3) SetFloat(v float32)` -HasFloat returns a boolean if a field has been set. +SetFloat sets Float field to given value. -### SetFloat +### HasFloat -`func (o *InlineObject3) SetFloat(v float32)` +`func (o *InlineObject3) HasFloat() bool` -SetFloat gets a reference to the given float32 and assigns it to the Float field. +HasFloat returns a boolean if a field has been set. ### GetDouble @@ -171,22 +166,17 @@ GetDouble returns the Double field if non-nil, zero value otherwise. ### GetDoubleOk -`func (o *InlineObject3) GetDoubleOk() (float64, bool)` +`func (o *InlineObject3) 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 *InlineObject3) HasDouble() bool` - -HasDouble returns a boolean if a field has been set. - ### SetDouble `func (o *InlineObject3) SetDouble(v float64)` -SetDouble gets a reference to the given float64 and assigns it to the Double field. +SetDouble sets Double field to given value. + ### GetString @@ -196,22 +186,22 @@ GetString returns the String field if non-nil, zero value otherwise. ### GetStringOk -`func (o *InlineObject3) GetStringOk() (string, bool)` +`func (o *InlineObject3) 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 +### SetString -`func (o *InlineObject3) HasString() bool` +`func (o *InlineObject3) SetString(v string)` -HasString returns a boolean if a field has been set. +SetString sets String field to given value. -### SetString +### HasString -`func (o *InlineObject3) SetString(v string)` +`func (o *InlineObject3) HasString() bool` -SetString gets a reference to the given string and assigns it to the String field. +HasString returns a boolean if a field has been set. ### GetPatternWithoutDelimiter @@ -221,22 +211,17 @@ GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field if non-nil, ### GetPatternWithoutDelimiterOk -`func (o *InlineObject3) GetPatternWithoutDelimiterOk() (string, bool)` +`func (o *InlineObject3) GetPatternWithoutDelimiterOk() (*string, bool)` GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPatternWithoutDelimiter - -`func (o *InlineObject3) HasPatternWithoutDelimiter() bool` - -HasPatternWithoutDelimiter returns a boolean if a field has been set. - ### SetPatternWithoutDelimiter `func (o *InlineObject3) SetPatternWithoutDelimiter(v string)` -SetPatternWithoutDelimiter gets a reference to the given string and assigns it to the PatternWithoutDelimiter field. +SetPatternWithoutDelimiter sets PatternWithoutDelimiter field to given value. + ### GetByte @@ -246,22 +231,17 @@ GetByte returns the Byte field if non-nil, zero value otherwise. ### GetByteOk -`func (o *InlineObject3) GetByteOk() (string, bool)` +`func (o *InlineObject3) 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 *InlineObject3) HasByte() bool` - -HasByte returns a boolean if a field has been set. - ### SetByte `func (o *InlineObject3) SetByte(v string)` -SetByte gets a reference to the given string and assigns it to the Byte field. +SetByte sets Byte field to given value. + ### GetBinary @@ -271,22 +251,22 @@ GetBinary returns the Binary field if non-nil, zero value otherwise. ### GetBinaryOk -`func (o *InlineObject3) GetBinaryOk() (*os.File, bool)` +`func (o *InlineObject3) 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 +### SetBinary -`func (o *InlineObject3) HasBinary() bool` +`func (o *InlineObject3) SetBinary(v *os.File)` -HasBinary returns a boolean if a field has been set. +SetBinary sets Binary field to given value. -### SetBinary +### HasBinary -`func (o *InlineObject3) SetBinary(v *os.File)` +`func (o *InlineObject3) HasBinary() bool` -SetBinary gets a reference to the given *os.File and assigns it to the Binary field. +HasBinary returns a boolean if a field has been set. ### GetDate @@ -296,22 +276,22 @@ GetDate returns the Date field if non-nil, zero value otherwise. ### GetDateOk -`func (o *InlineObject3) GetDateOk() (string, bool)` +`func (o *InlineObject3) 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 +### SetDate -`func (o *InlineObject3) HasDate() bool` +`func (o *InlineObject3) SetDate(v string)` -HasDate returns a boolean if a field has been set. +SetDate sets Date field to given value. -### SetDate +### HasDate -`func (o *InlineObject3) SetDate(v string)` +`func (o *InlineObject3) HasDate() bool` -SetDate gets a reference to the given string and assigns it to the Date field. +HasDate returns a boolean if a field has been set. ### GetDateTime @@ -321,22 +301,22 @@ GetDateTime returns the DateTime field if non-nil, zero value otherwise. ### GetDateTimeOk -`func (o *InlineObject3) GetDateTimeOk() (time.Time, bool)` +`func (o *InlineObject3) 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 +### SetDateTime -`func (o *InlineObject3) HasDateTime() bool` +`func (o *InlineObject3) SetDateTime(v time.Time)` -HasDateTime returns a boolean if a field has been set. +SetDateTime sets DateTime field to given value. -### SetDateTime +### HasDateTime -`func (o *InlineObject3) SetDateTime(v time.Time)` +`func (o *InlineObject3) HasDateTime() bool` -SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +HasDateTime returns a boolean if a field has been set. ### GetPassword @@ -346,22 +326,22 @@ GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk -`func (o *InlineObject3) GetPasswordOk() (string, bool)` +`func (o *InlineObject3) 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 +### SetPassword -`func (o *InlineObject3) HasPassword() bool` +`func (o *InlineObject3) SetPassword(v string)` -HasPassword returns a boolean if a field has been set. +SetPassword sets Password field to given value. -### SetPassword +### HasPassword -`func (o *InlineObject3) SetPassword(v string)` +`func (o *InlineObject3) HasPassword() bool` -SetPassword gets a reference to the given string and assigns it to the Password field. +HasPassword returns a boolean if a field has been set. ### GetCallback @@ -371,22 +351,22 @@ GetCallback returns the Callback field if non-nil, zero value otherwise. ### GetCallbackOk -`func (o *InlineObject3) GetCallbackOk() (string, bool)` +`func (o *InlineObject3) GetCallbackOk() (*string, bool)` GetCallbackOk returns a tuple with the Callback field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasCallback +### SetCallback -`func (o *InlineObject3) HasCallback() bool` +`func (o *InlineObject3) SetCallback(v string)` -HasCallback returns a boolean if a field has been set. +SetCallback sets Callback field to given value. -### SetCallback +### HasCallback -`func (o *InlineObject3) SetCallback(v string)` +`func (o *InlineObject3) HasCallback() bool` -SetCallback gets a reference to the given string and assigns it to the Callback field. +HasCallback returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md index b555af12b9c6..848986f31d11 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject4.md @@ -34,22 +34,17 @@ GetParam returns the Param field if non-nil, zero value otherwise. ### GetParamOk -`func (o *InlineObject4) GetParamOk() (string, bool)` +`func (o *InlineObject4) GetParamOk() (*string, bool)` GetParamOk returns a tuple with the Param field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasParam - -`func (o *InlineObject4) HasParam() bool` - -HasParam returns a boolean if a field has been set. - ### SetParam `func (o *InlineObject4) SetParam(v string)` -SetParam gets a reference to the given string and assigns it to the Param field. +SetParam sets Param field to given value. + ### GetParam2 @@ -59,22 +54,17 @@ GetParam2 returns the Param2 field if non-nil, zero value otherwise. ### GetParam2Ok -`func (o *InlineObject4) GetParam2Ok() (string, bool)` +`func (o *InlineObject4) GetParam2Ok() (*string, bool)` GetParam2Ok returns a tuple with the Param2 field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasParam2 - -`func (o *InlineObject4) HasParam2() bool` - -HasParam2 returns a boolean if a field has been set. - ### SetParam2 `func (o *InlineObject4) SetParam2(v string)` -SetParam2 gets a reference to the given string and assigns it to the Param2 field. +SetParam2 sets Param2 field to given value. + [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md index 874abaef97e3..f0dd583ce152 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineObject5.md @@ -34,22 +34,22 @@ GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero valu ### GetAdditionalMetadataOk -`func (o *InlineObject5) GetAdditionalMetadataOk() (string, bool)` +`func (o *InlineObject5) GetAdditionalMetadataOk() (*string, bool)` GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasAdditionalMetadata +### SetAdditionalMetadata -`func (o *InlineObject5) HasAdditionalMetadata() bool` +`func (o *InlineObject5) SetAdditionalMetadata(v string)` -HasAdditionalMetadata returns a boolean if a field has been set. +SetAdditionalMetadata sets AdditionalMetadata field to given value. -### SetAdditionalMetadata +### HasAdditionalMetadata -`func (o *InlineObject5) SetAdditionalMetadata(v string)` +`func (o *InlineObject5) HasAdditionalMetadata() bool` -SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field. +HasAdditionalMetadata returns a boolean if a field has been set. ### GetRequiredFile @@ -59,22 +59,17 @@ GetRequiredFile returns the RequiredFile field if non-nil, zero value otherwise. ### GetRequiredFileOk -`func (o *InlineObject5) GetRequiredFileOk() (*os.File, bool)` +`func (o *InlineObject5) GetRequiredFileOk() (**os.File, bool)` GetRequiredFileOk returns a tuple with the RequiredFile field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasRequiredFile - -`func (o *InlineObject5) HasRequiredFile() bool` - -HasRequiredFile returns a boolean if a field has been set. - ### SetRequiredFile `func (o *InlineObject5) SetRequiredFile(v *os.File)` -SetRequiredFile gets a reference to the given *os.File and assigns it to the RequiredFile field. +SetRequiredFile sets RequiredFile field to given value. + [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md index 14f1b0493b71..0736bb1fb425 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/InlineResponseDefault.md @@ -33,22 +33,22 @@ GetString returns the String field if non-nil, zero value otherwise. ### GetStringOk -`func (o *InlineResponseDefault) GetStringOk() (Foo, bool)` +`func (o *InlineResponseDefault) GetStringOk() (*Foo, 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 +### SetString -`func (o *InlineResponseDefault) HasString() bool` +`func (o *InlineResponseDefault) SetString(v Foo)` -HasString returns a boolean if a field has been set. +SetString sets String field to given value. -### SetString +### HasString -`func (o *InlineResponseDefault) SetString(v Foo)` +`func (o *InlineResponseDefault) HasString() bool` -SetString gets a reference to the given Foo and assigns it to the String field. +HasString returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md index 4d914555e33b..271c8236a8bc 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/List.md @@ -33,22 +33,22 @@ GetVar123List returns the Var123List field if non-nil, zero value otherwise. ### GetVar123ListOk -`func (o *List) GetVar123ListOk() (string, bool)` +`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 +### SetVar123List -`func (o *List) HasVar123List() bool` +`func (o *List) SetVar123List(v string)` -HasVar123List returns a boolean if a field has been set. +SetVar123List sets Var123List field to given value. -### SetVar123List +### HasVar123List -`func (o *List) SetVar123List(v string)` +`func (o *List) HasVar123List() bool` -SetVar123List gets a reference to the given string and assigns it to the Var123List field. +HasVar123List returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md index c752f6e86b57..6b35263c4e38 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MapTest.md @@ -36,22 +36,22 @@ GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherw ### GetMapMapOfStringOk -`func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool)` +`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 +### SetMapMapOfString -`func (o *MapTest) HasMapMapOfString() bool` +`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)` -HasMapMapOfString returns a boolean if a field has been set. +SetMapMapOfString sets MapMapOfString field to given value. -### SetMapMapOfString +### HasMapMapOfString -`func (o *MapTest) SetMapMapOfString(v map[string]map[string]string)` +`func (o *MapTest) HasMapMapOfString() bool` -SetMapMapOfString gets a reference to the given map[string]map[string]string and assigns it to the MapMapOfString field. +HasMapMapOfString returns a boolean if a field has been set. ### GetMapOfEnumString @@ -61,22 +61,22 @@ GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value othe ### GetMapOfEnumStringOk -`func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool)` +`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 +### SetMapOfEnumString -`func (o *MapTest) HasMapOfEnumString() bool` +`func (o *MapTest) SetMapOfEnumString(v map[string]string)` -HasMapOfEnumString returns a boolean if a field has been set. +SetMapOfEnumString sets MapOfEnumString field to given value. -### SetMapOfEnumString +### HasMapOfEnumString -`func (o *MapTest) SetMapOfEnumString(v map[string]string)` +`func (o *MapTest) HasMapOfEnumString() bool` -SetMapOfEnumString gets a reference to the given map[string]string and assigns it to the MapOfEnumString field. +HasMapOfEnumString returns a boolean if a field has been set. ### GetDirectMap @@ -86,22 +86,22 @@ GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. ### GetDirectMapOk -`func (o *MapTest) GetDirectMapOk() (map[string]bool, bool)` +`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 +### SetDirectMap -`func (o *MapTest) HasDirectMap() bool` +`func (o *MapTest) SetDirectMap(v map[string]bool)` -HasDirectMap returns a boolean if a field has been set. +SetDirectMap sets DirectMap field to given value. -### SetDirectMap +### HasDirectMap -`func (o *MapTest) SetDirectMap(v map[string]bool)` +`func (o *MapTest) HasDirectMap() bool` -SetDirectMap gets a reference to the given map[string]bool and assigns it to the DirectMap field. +HasDirectMap returns a boolean if a field has been set. ### GetIndirectMap @@ -111,22 +111,22 @@ GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. ### GetIndirectMapOk -`func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool)` +`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 +### SetIndirectMap -`func (o *MapTest) HasIndirectMap() bool` +`func (o *MapTest) SetIndirectMap(v map[string]bool)` -HasIndirectMap returns a boolean if a field has been set. +SetIndirectMap sets IndirectMap field to given value. -### SetIndirectMap +### HasIndirectMap -`func (o *MapTest) SetIndirectMap(v map[string]bool)` +`func (o *MapTest) HasIndirectMap() bool` -SetIndirectMap gets a reference to the given map[string]bool and assigns it to the IndirectMap field. +HasIndirectMap returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 2a1eb5eaba3e..f726ffe63e13 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -35,22 +35,22 @@ GetUuid returns the Uuid field if non-nil, zero value otherwise. ### GetUuidOk -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool)` +`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 +### SetUuid -`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` -HasUuid returns a boolean if a field has been set. +SetUuid sets Uuid field to given value. -### SetUuid +### HasUuid -`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasUuid() bool` -SetUuid gets a reference to the given string and assigns it to the Uuid field. +HasUuid returns a boolean if a field has been set. ### GetDateTime @@ -60,22 +60,22 @@ GetDateTime returns the DateTime field if non-nil, zero value otherwise. ### GetDateTimeOk -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool)` +`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 +### SetDateTime -`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)` -HasDateTime returns a boolean if a field has been set. +SetDateTime sets DateTime field to given value. -### SetDateTime +### HasDateTime -`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasDateTime() bool` -SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field. +HasDateTime returns a boolean if a field has been set. ### GetMap @@ -85,22 +85,22 @@ GetMap returns the Map field if non-nil, zero value otherwise. ### GetMapOk -`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool)` +`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 +### SetMap -`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)` -HasMap returns a boolean if a field has been set. +SetMap sets Map field to given value. -### SetMap +### HasMap -`func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal)` +`func (o *MixedPropertiesAndAdditionalPropertiesClass) HasMap() bool` -SetMap gets a reference to the given map[string]Animal and assigns it to the Map field. +HasMap returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md index 00bce3a9909d..4e0d89fe88f9 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Model200Response.md @@ -34,22 +34,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Model200Response) GetNameOk() (int32, bool)` +`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 +### SetName -`func (o *Model200Response) HasName() bool` +`func (o *Model200Response) SetName(v int32)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *Model200Response) SetName(v int32)` +`func (o *Model200Response) HasName() bool` -SetName gets a reference to the given int32 and assigns it to the Name field. +HasName returns a boolean if a field has been set. ### GetClass @@ -59,22 +59,22 @@ GetClass returns the Class field if non-nil, zero value otherwise. ### GetClassOk -`func (o *Model200Response) GetClassOk() (string, bool)` +`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 +### SetClass -`func (o *Model200Response) HasClass() bool` +`func (o *Model200Response) SetClass(v string)` -HasClass returns a boolean if a field has been set. +SetClass sets Class field to given value. -### SetClass +### HasClass -`func (o *Model200Response) SetClass(v string)` +`func (o *Model200Response) HasClass() bool` -SetClass gets a reference to the given string and assigns it to the Class field. +HasClass returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md index cbcab3667614..52fb687af7be 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Name.md @@ -36,22 +36,17 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Name) GetNameOk() (int32, bool)` +`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. +SetName sets Name field to given value. + ### GetSnakeCase @@ -61,22 +56,22 @@ GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. ### GetSnakeCaseOk -`func (o *Name) GetSnakeCaseOk() (int32, bool)` +`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 +### SetSnakeCase -`func (o *Name) HasSnakeCase() bool` +`func (o *Name) SetSnakeCase(v int32)` -HasSnakeCase returns a boolean if a field has been set. +SetSnakeCase sets SnakeCase field to given value. -### SetSnakeCase +### HasSnakeCase -`func (o *Name) SetSnakeCase(v int32)` +`func (o *Name) HasSnakeCase() bool` -SetSnakeCase gets a reference to the given int32 and assigns it to the SnakeCase field. +HasSnakeCase returns a boolean if a field has been set. ### GetProperty @@ -86,22 +81,22 @@ GetProperty returns the Property field if non-nil, zero value otherwise. ### GetPropertyOk -`func (o *Name) GetPropertyOk() (string, bool)` +`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 +### SetProperty -`func (o *Name) HasProperty() bool` +`func (o *Name) SetProperty(v string)` -HasProperty returns a boolean if a field has been set. +SetProperty sets Property field to given value. -### SetProperty +### HasProperty -`func (o *Name) SetProperty(v string)` +`func (o *Name) HasProperty() bool` -SetProperty gets a reference to the given string and assigns it to the Property field. +HasProperty returns a boolean if a field has been set. ### GetVar123Number @@ -111,22 +106,22 @@ GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. ### GetVar123NumberOk -`func (o *Name) GetVar123NumberOk() (int32, bool)` +`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 +### SetVar123Number -`func (o *Name) HasVar123Number() bool` +`func (o *Name) SetVar123Number(v int32)` -HasVar123Number returns a boolean if a field has been set. +SetVar123Number sets Var123Number field to given value. -### SetVar123Number +### HasVar123Number -`func (o *Name) SetVar123Number(v int32)` +`func (o *Name) HasVar123Number() bool` -SetVar123Number gets a reference to the given int32 and assigns it to the Var123Number field. +HasVar123Number returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md index 8c686e6955f8..edb2d4a01ee7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NullableClass.md @@ -38,196 +38,214 @@ but it doesn't guarantee that properties required by API are set ### GetIntegerProp -`func (o *NullableClass) GetIntegerProp() NullableInt32` +`func (o *NullableClass) GetIntegerProp() int32` GetIntegerProp returns the IntegerProp field if non-nil, zero value otherwise. ### GetIntegerPropOk -`func (o *NullableClass) GetIntegerPropOk() (NullableInt32, bool)` +`func (o *NullableClass) GetIntegerPropOk() (*int32, bool)` GetIntegerPropOk returns a tuple with the IntegerProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetIntegerProp + +`func (o *NullableClass) SetIntegerProp(v int32)` + +SetIntegerProp sets IntegerProp field to given value. + ### HasIntegerProp `func (o *NullableClass) HasIntegerProp() bool` HasIntegerProp returns a boolean if a field has been set. -### SetIntegerProp - -`func (o *NullableClass) SetIntegerProp(v NullableInt32)` +### SetIntegerPropNil -SetIntegerProp gets a reference to the given NullableInt32 and assigns it to the IntegerProp field. +`func (o *NullableClass) SetIntegerPropNil(b bool)` -### SetIntegerPropExplicitNull + SetIntegerPropNil sets the value for IntegerProp to be an explicit nil -`func (o *NullableClass) SetIntegerPropExplicitNull(b bool)` +### UnsetIntegerProp +`func (o *NullableClass) UnsetIntegerProp()` -SetIntegerPropExplicitNull (un)sets IntegerProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The IntegerProp value is set to nil even if false is passed +UnsetIntegerProp ensures that no value is present for IntegerProp, not even an explicit nil ### GetNumberProp -`func (o *NullableClass) GetNumberProp() NullableFloat32` +`func (o *NullableClass) GetNumberProp() float32` GetNumberProp returns the NumberProp field if non-nil, zero value otherwise. ### GetNumberPropOk -`func (o *NullableClass) GetNumberPropOk() (NullableFloat32, bool)` +`func (o *NullableClass) GetNumberPropOk() (*float32, bool)` GetNumberPropOk returns a tuple with the NumberProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetNumberProp + +`func (o *NullableClass) SetNumberProp(v float32)` + +SetNumberProp sets NumberProp field to given value. + ### HasNumberProp `func (o *NullableClass) HasNumberProp() bool` HasNumberProp returns a boolean if a field has been set. -### SetNumberProp - -`func (o *NullableClass) SetNumberProp(v NullableFloat32)` +### SetNumberPropNil -SetNumberProp gets a reference to the given NullableFloat32 and assigns it to the NumberProp field. +`func (o *NullableClass) SetNumberPropNil(b bool)` -### SetNumberPropExplicitNull + SetNumberPropNil sets the value for NumberProp to be an explicit nil -`func (o *NullableClass) SetNumberPropExplicitNull(b bool)` +### UnsetNumberProp +`func (o *NullableClass) UnsetNumberProp()` -SetNumberPropExplicitNull (un)sets NumberProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The NumberProp value is set to nil even if false is passed +UnsetNumberProp ensures that no value is present for NumberProp, not even an explicit nil ### GetBooleanProp -`func (o *NullableClass) GetBooleanProp() NullableBool` +`func (o *NullableClass) GetBooleanProp() bool` GetBooleanProp returns the BooleanProp field if non-nil, zero value otherwise. ### GetBooleanPropOk -`func (o *NullableClass) GetBooleanPropOk() (NullableBool, bool)` +`func (o *NullableClass) GetBooleanPropOk() (*bool, bool)` GetBooleanPropOk returns a tuple with the BooleanProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetBooleanProp + +`func (o *NullableClass) SetBooleanProp(v bool)` + +SetBooleanProp sets BooleanProp field to given value. + ### HasBooleanProp `func (o *NullableClass) HasBooleanProp() bool` HasBooleanProp returns a boolean if a field has been set. -### SetBooleanProp +### SetBooleanPropNil -`func (o *NullableClass) SetBooleanProp(v NullableBool)` +`func (o *NullableClass) SetBooleanPropNil(b bool)` -SetBooleanProp gets a reference to the given NullableBool and assigns it to the BooleanProp field. + SetBooleanPropNil sets the value for BooleanProp to be an explicit nil -### SetBooleanPropExplicitNull +### UnsetBooleanProp +`func (o *NullableClass) UnsetBooleanProp()` -`func (o *NullableClass) SetBooleanPropExplicitNull(b bool)` - -SetBooleanPropExplicitNull (un)sets BooleanProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The BooleanProp value is set to nil even if false is passed +UnsetBooleanProp ensures that no value is present for BooleanProp, not even an explicit nil ### GetStringProp -`func (o *NullableClass) GetStringProp() NullableString` +`func (o *NullableClass) GetStringProp() string` GetStringProp returns the StringProp field if non-nil, zero value otherwise. ### GetStringPropOk -`func (o *NullableClass) GetStringPropOk() (NullableString, bool)` +`func (o *NullableClass) GetStringPropOk() (*string, bool)` GetStringPropOk returns a tuple with the StringProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetStringProp + +`func (o *NullableClass) SetStringProp(v string)` + +SetStringProp sets StringProp field to given value. + ### HasStringProp `func (o *NullableClass) HasStringProp() bool` HasStringProp returns a boolean if a field has been set. -### SetStringProp - -`func (o *NullableClass) SetStringProp(v NullableString)` +### SetStringPropNil -SetStringProp gets a reference to the given NullableString and assigns it to the StringProp field. +`func (o *NullableClass) SetStringPropNil(b bool)` -### SetStringPropExplicitNull + SetStringPropNil sets the value for StringProp to be an explicit nil -`func (o *NullableClass) SetStringPropExplicitNull(b bool)` +### UnsetStringProp +`func (o *NullableClass) UnsetStringProp()` -SetStringPropExplicitNull (un)sets StringProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The StringProp value is set to nil even if false is passed +UnsetStringProp ensures that no value is present for StringProp, not even an explicit nil ### GetDateProp -`func (o *NullableClass) GetDateProp() NullableString` +`func (o *NullableClass) GetDateProp() string` GetDateProp returns the DateProp field if non-nil, zero value otherwise. ### GetDatePropOk -`func (o *NullableClass) GetDatePropOk() (NullableString, bool)` +`func (o *NullableClass) GetDatePropOk() (*string, bool)` GetDatePropOk returns a tuple with the DateProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetDateProp + +`func (o *NullableClass) SetDateProp(v string)` + +SetDateProp sets DateProp field to given value. + ### HasDateProp `func (o *NullableClass) HasDateProp() bool` HasDateProp returns a boolean if a field has been set. -### SetDateProp - -`func (o *NullableClass) SetDateProp(v NullableString)` +### SetDatePropNil -SetDateProp gets a reference to the given NullableString and assigns it to the DateProp field. +`func (o *NullableClass) SetDatePropNil(b bool)` -### SetDatePropExplicitNull + SetDatePropNil sets the value for DateProp to be an explicit nil -`func (o *NullableClass) SetDatePropExplicitNull(b bool)` +### UnsetDateProp +`func (o *NullableClass) UnsetDateProp()` -SetDatePropExplicitNull (un)sets DateProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The DateProp value is set to nil even if false is passed +UnsetDateProp ensures that no value is present for DateProp, not even an explicit nil ### GetDatetimeProp -`func (o *NullableClass) GetDatetimeProp() NullableTime` +`func (o *NullableClass) GetDatetimeProp() time.Time` GetDatetimeProp returns the DatetimeProp field if non-nil, zero value otherwise. ### GetDatetimePropOk -`func (o *NullableClass) GetDatetimePropOk() (NullableTime, bool)` +`func (o *NullableClass) GetDatetimePropOk() (*time.Time, bool)` GetDatetimePropOk returns a tuple with the DatetimeProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetDatetimeProp + +`func (o *NullableClass) SetDatetimeProp(v time.Time)` + +SetDatetimeProp sets DatetimeProp field to given value. + ### HasDatetimeProp `func (o *NullableClass) HasDatetimeProp() bool` HasDatetimeProp returns a boolean if a field has been set. -### SetDatetimeProp - -`func (o *NullableClass) SetDatetimeProp(v NullableTime)` +### SetDatetimePropNil -SetDatetimeProp gets a reference to the given NullableTime and assigns it to the DatetimeProp field. +`func (o *NullableClass) SetDatetimePropNil(b bool)` -### SetDatetimePropExplicitNull + SetDatetimePropNil sets the value for DatetimeProp to be an explicit nil -`func (o *NullableClass) SetDatetimePropExplicitNull(b bool)` +### UnsetDatetimeProp +`func (o *NullableClass) UnsetDatetimeProp()` -SetDatetimePropExplicitNull (un)sets DatetimeProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The DatetimeProp value is set to nil even if false is passed +UnsetDatetimeProp ensures that no value is present for DatetimeProp, not even an explicit nil ### GetArrayNullableProp `func (o *NullableClass) GetArrayNullableProp() []map[string]interface{}` @@ -236,30 +254,33 @@ GetArrayNullableProp returns the ArrayNullableProp field if non-nil, zero value ### GetArrayNullablePropOk -`func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool)` +`func (o *NullableClass) GetArrayNullablePropOk() (*[]map[string]interface{}, bool)` GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetArrayNullableProp + +`func (o *NullableClass) SetArrayNullableProp(v []map[string]interface{})` + +SetArrayNullableProp sets ArrayNullableProp field to given value. + ### HasArrayNullableProp `func (o *NullableClass) HasArrayNullableProp() bool` HasArrayNullableProp returns a boolean if a field has been set. -### SetArrayNullableProp - -`func (o *NullableClass) SetArrayNullableProp(v []map[string]interface{})` +### SetArrayNullablePropNil -SetArrayNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayNullableProp field. +`func (o *NullableClass) SetArrayNullablePropNil(b bool)` -### SetArrayNullablePropExplicitNull + SetArrayNullablePropNil sets the value for ArrayNullableProp to be an explicit nil -`func (o *NullableClass) SetArrayNullablePropExplicitNull(b bool)` +### UnsetArrayNullableProp +`func (o *NullableClass) UnsetArrayNullableProp()` -SetArrayNullablePropExplicitNull (un)sets ArrayNullableProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The ArrayNullableProp value is set to nil even if false is passed +UnsetArrayNullableProp ensures that no value is present for ArrayNullableProp, not even an explicit nil ### GetArrayAndItemsNullableProp `func (o *NullableClass) GetArrayAndItemsNullableProp() []map[string]interface{}` @@ -268,30 +289,33 @@ GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field if non- ### GetArrayAndItemsNullablePropOk -`func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]map[string]interface{}, bool)` +`func (o *NullableClass) GetArrayAndItemsNullablePropOk() (*[]map[string]interface{}, bool)` GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetArrayAndItemsNullableProp + +`func (o *NullableClass) SetArrayAndItemsNullableProp(v []map[string]interface{})` + +SetArrayAndItemsNullableProp sets ArrayAndItemsNullableProp field to given value. + ### HasArrayAndItemsNullableProp `func (o *NullableClass) HasArrayAndItemsNullableProp() bool` HasArrayAndItemsNullableProp returns a boolean if a field has been set. -### SetArrayAndItemsNullableProp +### SetArrayAndItemsNullablePropNil -`func (o *NullableClass) SetArrayAndItemsNullableProp(v []map[string]interface{})` - -SetArrayAndItemsNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field. +`func (o *NullableClass) SetArrayAndItemsNullablePropNil(b bool)` -### SetArrayAndItemsNullablePropExplicitNull + SetArrayAndItemsNullablePropNil sets the value for ArrayAndItemsNullableProp to be an explicit nil -`func (o *NullableClass) SetArrayAndItemsNullablePropExplicitNull(b bool)` +### UnsetArrayAndItemsNullableProp +`func (o *NullableClass) UnsetArrayAndItemsNullableProp()` -SetArrayAndItemsNullablePropExplicitNull (un)sets ArrayAndItemsNullableProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The ArrayAndItemsNullableProp value is set to nil even if false is passed +UnsetArrayAndItemsNullableProp ensures that no value is present for ArrayAndItemsNullableProp, not even an explicit nil ### GetArrayItemsNullable `func (o *NullableClass) GetArrayItemsNullable() []map[string]interface{}` @@ -300,22 +324,22 @@ GetArrayItemsNullable returns the ArrayItemsNullable field if non-nil, zero valu ### GetArrayItemsNullableOk -`func (o *NullableClass) GetArrayItemsNullableOk() ([]map[string]interface{}, bool)` +`func (o *NullableClass) GetArrayItemsNullableOk() (*[]map[string]interface{}, bool)` GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasArrayItemsNullable +### SetArrayItemsNullable -`func (o *NullableClass) HasArrayItemsNullable() bool` +`func (o *NullableClass) SetArrayItemsNullable(v []map[string]interface{})` -HasArrayItemsNullable returns a boolean if a field has been set. +SetArrayItemsNullable sets ArrayItemsNullable field to given value. -### SetArrayItemsNullable +### HasArrayItemsNullable -`func (o *NullableClass) SetArrayItemsNullable(v []map[string]interface{})` +`func (o *NullableClass) HasArrayItemsNullable() bool` -SetArrayItemsNullable gets a reference to the given []map[string]interface{} and assigns it to the ArrayItemsNullable field. +HasArrayItemsNullable returns a boolean if a field has been set. ### GetObjectNullableProp @@ -325,30 +349,33 @@ GetObjectNullableProp returns the ObjectNullableProp field if non-nil, zero valu ### GetObjectNullablePropOk -`func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool)` +`func (o *NullableClass) GetObjectNullablePropOk() (*map[string]map[string]interface{}, bool)` GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetObjectNullableProp + +`func (o *NullableClass) SetObjectNullableProp(v map[string]map[string]interface{})` + +SetObjectNullableProp sets ObjectNullableProp field to given value. + ### HasObjectNullableProp `func (o *NullableClass) HasObjectNullableProp() bool` HasObjectNullableProp returns a boolean if a field has been set. -### SetObjectNullableProp - -`func (o *NullableClass) SetObjectNullableProp(v map[string]map[string]interface{})` +### SetObjectNullablePropNil -SetObjectNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectNullableProp field. +`func (o *NullableClass) SetObjectNullablePropNil(b bool)` -### SetObjectNullablePropExplicitNull + SetObjectNullablePropNil sets the value for ObjectNullableProp to be an explicit nil -`func (o *NullableClass) SetObjectNullablePropExplicitNull(b bool)` +### UnsetObjectNullableProp +`func (o *NullableClass) UnsetObjectNullableProp()` -SetObjectNullablePropExplicitNull (un)sets ObjectNullableProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The ObjectNullableProp value is set to nil even if false is passed +UnsetObjectNullableProp ensures that no value is present for ObjectNullableProp, not even an explicit nil ### GetObjectAndItemsNullableProp `func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]interface{}` @@ -357,30 +384,33 @@ GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field if no ### GetObjectAndItemsNullablePropOk -`func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool)` +`func (o *NullableClass) GetObjectAndItemsNullablePropOk() (*map[string]map[string]interface{}, bool)` GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. +### SetObjectAndItemsNullableProp + +`func (o *NullableClass) SetObjectAndItemsNullableProp(v map[string]map[string]interface{})` + +SetObjectAndItemsNullableProp sets ObjectAndItemsNullableProp field to given value. + ### HasObjectAndItemsNullableProp `func (o *NullableClass) HasObjectAndItemsNullableProp() bool` HasObjectAndItemsNullableProp returns a boolean if a field has been set. -### SetObjectAndItemsNullableProp - -`func (o *NullableClass) SetObjectAndItemsNullableProp(v map[string]map[string]interface{})` +### SetObjectAndItemsNullablePropNil -SetObjectAndItemsNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field. +`func (o *NullableClass) SetObjectAndItemsNullablePropNil(b bool)` -### SetObjectAndItemsNullablePropExplicitNull + SetObjectAndItemsNullablePropNil sets the value for ObjectAndItemsNullableProp to be an explicit nil -`func (o *NullableClass) SetObjectAndItemsNullablePropExplicitNull(b bool)` +### UnsetObjectAndItemsNullableProp +`func (o *NullableClass) UnsetObjectAndItemsNullableProp()` -SetObjectAndItemsNullablePropExplicitNull (un)sets ObjectAndItemsNullableProp to be considered as explicit "null" value -when serializing to JSON (pass true as argument to set this, false to unset) -The ObjectAndItemsNullableProp value is set to nil even if false is passed +UnsetObjectAndItemsNullableProp ensures that no value is present for ObjectAndItemsNullableProp, not even an explicit nil ### GetObjectItemsNullable `func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface{}` @@ -389,22 +419,22 @@ GetObjectItemsNullable returns the ObjectItemsNullable field if non-nil, zero va ### GetObjectItemsNullableOk -`func (o *NullableClass) GetObjectItemsNullableOk() (map[string]map[string]interface{}, bool)` +`func (o *NullableClass) GetObjectItemsNullableOk() (*map[string]map[string]interface{}, bool)` GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasObjectItemsNullable +### SetObjectItemsNullable -`func (o *NullableClass) HasObjectItemsNullable() bool` +`func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface{})` -HasObjectItemsNullable returns a boolean if a field has been set. +SetObjectItemsNullable sets ObjectItemsNullable field to given value. -### SetObjectItemsNullable +### HasObjectItemsNullable -`func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface{})` +`func (o *NullableClass) HasObjectItemsNullable() bool` -SetObjectItemsNullable gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectItemsNullable field. +HasObjectItemsNullable returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md index 2a30b0b12836..81941828b623 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/NumberOnly.md @@ -33,22 +33,22 @@ GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. ### GetJustNumberOk -`func (o *NumberOnly) GetJustNumberOk() (float32, bool)` +`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 +### SetJustNumber -`func (o *NumberOnly) HasJustNumber() bool` +`func (o *NumberOnly) SetJustNumber(v float32)` -HasJustNumber returns a boolean if a field has been set. +SetJustNumber sets JustNumber field to given value. -### SetJustNumber +### HasJustNumber -`func (o *NumberOnly) SetJustNumber(v float32)` +`func (o *NumberOnly) HasJustNumber() bool` -SetJustNumber gets a reference to the given float32 and assigns it to the JustNumber field. +HasJustNumber returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md index 71bb824a6cac..78cace2f229d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Order.md @@ -38,22 +38,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Order) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *Order) HasId() bool` +`func (o *Order) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *Order) SetId(v int64)` +`func (o *Order) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetPetId @@ -63,22 +63,22 @@ GetPetId returns the PetId field if non-nil, zero value otherwise. ### GetPetIdOk -`func (o *Order) GetPetIdOk() (int64, bool)` +`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 +### SetPetId -`func (o *Order) HasPetId() bool` +`func (o *Order) SetPetId(v int64)` -HasPetId returns a boolean if a field has been set. +SetPetId sets PetId field to given value. -### SetPetId +### HasPetId -`func (o *Order) SetPetId(v int64)` +`func (o *Order) HasPetId() bool` -SetPetId gets a reference to the given int64 and assigns it to the PetId field. +HasPetId returns a boolean if a field has been set. ### GetQuantity @@ -88,22 +88,22 @@ GetQuantity returns the Quantity field if non-nil, zero value otherwise. ### GetQuantityOk -`func (o *Order) GetQuantityOk() (int32, bool)` +`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 +### SetQuantity -`func (o *Order) HasQuantity() bool` +`func (o *Order) SetQuantity(v int32)` -HasQuantity returns a boolean if a field has been set. +SetQuantity sets Quantity field to given value. -### SetQuantity +### HasQuantity -`func (o *Order) SetQuantity(v int32)` +`func (o *Order) HasQuantity() bool` -SetQuantity gets a reference to the given int32 and assigns it to the Quantity field. +HasQuantity returns a boolean if a field has been set. ### GetShipDate @@ -113,22 +113,22 @@ GetShipDate returns the ShipDate field if non-nil, zero value otherwise. ### GetShipDateOk -`func (o *Order) GetShipDateOk() (time.Time, bool)` +`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 +### SetShipDate -`func (o *Order) HasShipDate() bool` +`func (o *Order) SetShipDate(v time.Time)` -HasShipDate returns a boolean if a field has been set. +SetShipDate sets ShipDate field to given value. -### SetShipDate +### HasShipDate -`func (o *Order) SetShipDate(v time.Time)` +`func (o *Order) HasShipDate() bool` -SetShipDate gets a reference to the given time.Time and assigns it to the ShipDate field. +HasShipDate returns a boolean if a field has been set. ### GetStatus @@ -138,22 +138,22 @@ GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *Order) GetStatusOk() (string, bool)` +`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 +### SetStatus -`func (o *Order) HasStatus() bool` +`func (o *Order) SetStatus(v string)` -HasStatus returns a boolean if a field has been set. +SetStatus sets Status field to given value. -### SetStatus +### HasStatus -`func (o *Order) SetStatus(v string)` +`func (o *Order) HasStatus() bool` -SetStatus gets a reference to the given string and assigns it to the Status field. +HasStatus returns a boolean if a field has been set. ### GetComplete @@ -163,22 +163,22 @@ GetComplete returns the Complete field if non-nil, zero value otherwise. ### GetCompleteOk -`func (o *Order) GetCompleteOk() (bool, bool)` +`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 +### SetComplete -`func (o *Order) HasComplete() bool` +`func (o *Order) SetComplete(v bool)` -HasComplete returns a boolean if a field has been set. +SetComplete sets Complete field to given value. -### SetComplete +### HasComplete -`func (o *Order) SetComplete(v bool)` +`func (o *Order) HasComplete() bool` -SetComplete gets a reference to the given bool and assigns it to the Complete field. +HasComplete returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md index e91d7b978aeb..1ebf86c0a2ee 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/OuterComposite.md @@ -35,22 +35,22 @@ GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. ### GetMyNumberOk -`func (o *OuterComposite) GetMyNumberOk() (float32, bool)` +`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 +### SetMyNumber -`func (o *OuterComposite) HasMyNumber() bool` +`func (o *OuterComposite) SetMyNumber(v float32)` -HasMyNumber returns a boolean if a field has been set. +SetMyNumber sets MyNumber field to given value. -### SetMyNumber +### HasMyNumber -`func (o *OuterComposite) SetMyNumber(v float32)` +`func (o *OuterComposite) HasMyNumber() bool` -SetMyNumber gets a reference to the given float32 and assigns it to the MyNumber field. +HasMyNumber returns a boolean if a field has been set. ### GetMyString @@ -60,22 +60,22 @@ GetMyString returns the MyString field if non-nil, zero value otherwise. ### GetMyStringOk -`func (o *OuterComposite) GetMyStringOk() (string, bool)` +`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 +### SetMyString -`func (o *OuterComposite) HasMyString() bool` +`func (o *OuterComposite) SetMyString(v string)` -HasMyString returns a boolean if a field has been set. +SetMyString sets MyString field to given value. -### SetMyString +### HasMyString -`func (o *OuterComposite) SetMyString(v string)` +`func (o *OuterComposite) HasMyString() bool` -SetMyString gets a reference to the given string and assigns it to the MyString field. +HasMyString returns a boolean if a field has been set. ### GetMyBoolean @@ -85,22 +85,22 @@ GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. ### GetMyBooleanOk -`func (o *OuterComposite) GetMyBooleanOk() (bool, bool)` +`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 +### SetMyBoolean -`func (o *OuterComposite) HasMyBoolean() bool` +`func (o *OuterComposite) SetMyBoolean(v bool)` -HasMyBoolean returns a boolean if a field has been set. +SetMyBoolean sets MyBoolean field to given value. -### SetMyBoolean +### HasMyBoolean -`func (o *OuterComposite) SetMyBoolean(v bool)` +`func (o *OuterComposite) HasMyBoolean() bool` -SetMyBoolean gets a reference to the given bool and assigns it to the MyBoolean field. +HasMyBoolean returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md index faa1e31e8701..6b4776422396 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Pet.md @@ -38,22 +38,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Pet) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *Pet) HasId() bool` +`func (o *Pet) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *Pet) SetId(v int64)` +`func (o *Pet) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetCategory @@ -63,22 +63,22 @@ GetCategory returns the Category field if non-nil, zero value otherwise. ### GetCategoryOk -`func (o *Pet) GetCategoryOk() (Category, bool)` +`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 +### SetCategory -`func (o *Pet) HasCategory() bool` +`func (o *Pet) SetCategory(v Category)` -HasCategory returns a boolean if a field has been set. +SetCategory sets Category field to given value. -### SetCategory +### HasCategory -`func (o *Pet) SetCategory(v Category)` +`func (o *Pet) HasCategory() bool` -SetCategory gets a reference to the given Category and assigns it to the Category field. +HasCategory returns a boolean if a field has been set. ### GetName @@ -88,22 +88,17 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Pet) GetNameOk() (string, bool)` +`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. +SetName sets Name field to given value. + ### GetPhotoUrls @@ -113,22 +108,17 @@ GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. ### GetPhotoUrlsOk -`func (o *Pet) GetPhotoUrlsOk() ([]string, bool)` +`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. +SetPhotoUrls sets PhotoUrls field to given value. + ### GetTags @@ -138,22 +128,22 @@ GetTags returns the Tags field if non-nil, zero value otherwise. ### GetTagsOk -`func (o *Pet) GetTagsOk() ([]Tag, bool)` +`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 +### SetTags -`func (o *Pet) HasTags() bool` +`func (o *Pet) SetTags(v []Tag)` -HasTags returns a boolean if a field has been set. +SetTags sets Tags field to given value. -### SetTags +### HasTags -`func (o *Pet) SetTags(v []Tag)` +`func (o *Pet) HasTags() bool` -SetTags gets a reference to the given []Tag and assigns it to the Tags field. +HasTags returns a boolean if a field has been set. ### GetStatus @@ -163,22 +153,22 @@ GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *Pet) GetStatusOk() (string, bool)` +`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 +### SetStatus -`func (o *Pet) HasStatus() bool` +`func (o *Pet) SetStatus(v string)` -HasStatus returns a boolean if a field has been set. +SetStatus sets Status field to given value. -### SetStatus +### HasStatus -`func (o *Pet) SetStatus(v string)` +`func (o *Pet) HasStatus() bool` -SetStatus gets a reference to the given string and assigns it to the Status field. +HasStatus returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md index c0ee88a70367..2e25d6d230eb 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/ReadOnlyFirst.md @@ -34,22 +34,22 @@ GetBar returns the Bar field if non-nil, zero value otherwise. ### GetBarOk -`func (o *ReadOnlyFirst) GetBarOk() (string, bool)` +`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 +### SetBar -`func (o *ReadOnlyFirst) HasBar() bool` +`func (o *ReadOnlyFirst) SetBar(v string)` -HasBar returns a boolean if a field has been set. +SetBar sets Bar field to given value. -### SetBar +### HasBar -`func (o *ReadOnlyFirst) SetBar(v string)` +`func (o *ReadOnlyFirst) HasBar() bool` -SetBar gets a reference to the given string and assigns it to the Bar field. +HasBar returns a boolean if a field has been set. ### GetBaz @@ -59,22 +59,22 @@ GetBaz returns the Baz field if non-nil, zero value otherwise. ### GetBazOk -`func (o *ReadOnlyFirst) GetBazOk() (string, bool)` +`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 +### SetBaz -`func (o *ReadOnlyFirst) HasBaz() bool` +`func (o *ReadOnlyFirst) SetBaz(v string)` -HasBaz returns a boolean if a field has been set. +SetBaz sets Baz field to given value. -### SetBaz +### HasBaz -`func (o *ReadOnlyFirst) SetBaz(v string)` +`func (o *ReadOnlyFirst) HasBaz() bool` -SetBaz gets a reference to the given string and assigns it to the Baz field. +HasBaz returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md index 1437ef84e525..d6be5a42f31b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Return.md @@ -33,22 +33,22 @@ GetReturn returns the Return field if non-nil, zero value otherwise. ### GetReturnOk -`func (o *Return) GetReturnOk() (int32, bool)` +`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 +### SetReturn -`func (o *Return) HasReturn() bool` +`func (o *Return) SetReturn(v int32)` -HasReturn returns a boolean if a field has been set. +SetReturn sets Return field to given value. -### SetReturn +### HasReturn -`func (o *Return) SetReturn(v int32)` +`func (o *Return) HasReturn() bool` -SetReturn gets a reference to the given int32 and assigns it to the Return field. +HasReturn returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md index c273842c32b8..3e5a187c1d10 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/SpecialModelName.md @@ -33,22 +33,22 @@ GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero va ### GetSpecialPropertyNameOk -`func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool)` +`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 +### SetSpecialPropertyName -`func (o *SpecialModelName) HasSpecialPropertyName() bool` +`func (o *SpecialModelName) SetSpecialPropertyName(v int64)` -HasSpecialPropertyName returns a boolean if a field has been set. +SetSpecialPropertyName sets SpecialPropertyName field to given value. -### SetSpecialPropertyName +### HasSpecialPropertyName -`func (o *SpecialModelName) SetSpecialPropertyName(v int64)` +`func (o *SpecialModelName) HasSpecialPropertyName() bool` -SetSpecialPropertyName gets a reference to the given int64 and assigns it to the SpecialPropertyName field. +HasSpecialPropertyName returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md index 84b8770dac0f..391be6b49009 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/Tag.md @@ -34,22 +34,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Tag) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *Tag) HasId() bool` +`func (o *Tag) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *Tag) SetId(v int64)` +`func (o *Tag) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetName @@ -59,22 +59,22 @@ GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Tag) GetNameOk() (string, bool)` +`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 +### SetName -`func (o *Tag) HasName() bool` +`func (o *Tag) SetName(v string)` -HasName returns a boolean if a field has been set. +SetName sets Name field to given value. -### SetName +### HasName -`func (o *Tag) SetName(v string)` +`func (o *Tag) HasName() bool` -SetName gets a reference to the given string and assigns it to the Name field. +HasName returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md index e9720af9fb78..a6bea41030bf 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/User.md @@ -40,22 +40,22 @@ GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *User) GetIdOk() (int64, bool)` +`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 +### SetId -`func (o *User) HasId() bool` +`func (o *User) SetId(v int64)` -HasId returns a boolean if a field has been set. +SetId sets Id field to given value. -### SetId +### HasId -`func (o *User) SetId(v int64)` +`func (o *User) HasId() bool` -SetId gets a reference to the given int64 and assigns it to the Id field. +HasId returns a boolean if a field has been set. ### GetUsername @@ -65,22 +65,22 @@ GetUsername returns the Username field if non-nil, zero value otherwise. ### GetUsernameOk -`func (o *User) GetUsernameOk() (string, bool)` +`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 +### SetUsername -`func (o *User) HasUsername() bool` +`func (o *User) SetUsername(v string)` -HasUsername returns a boolean if a field has been set. +SetUsername sets Username field to given value. -### SetUsername +### HasUsername -`func (o *User) SetUsername(v string)` +`func (o *User) HasUsername() bool` -SetUsername gets a reference to the given string and assigns it to the Username field. +HasUsername returns a boolean if a field has been set. ### GetFirstName @@ -90,22 +90,22 @@ GetFirstName returns the FirstName field if non-nil, zero value otherwise. ### GetFirstNameOk -`func (o *User) GetFirstNameOk() (string, bool)` +`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 +### SetFirstName -`func (o *User) HasFirstName() bool` +`func (o *User) SetFirstName(v string)` -HasFirstName returns a boolean if a field has been set. +SetFirstName sets FirstName field to given value. -### SetFirstName +### HasFirstName -`func (o *User) SetFirstName(v string)` +`func (o *User) HasFirstName() bool` -SetFirstName gets a reference to the given string and assigns it to the FirstName field. +HasFirstName returns a boolean if a field has been set. ### GetLastName @@ -115,22 +115,22 @@ GetLastName returns the LastName field if non-nil, zero value otherwise. ### GetLastNameOk -`func (o *User) GetLastNameOk() (string, bool)` +`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 +### SetLastName -`func (o *User) HasLastName() bool` +`func (o *User) SetLastName(v string)` -HasLastName returns a boolean if a field has been set. +SetLastName sets LastName field to given value. -### SetLastName +### HasLastName -`func (o *User) SetLastName(v string)` +`func (o *User) HasLastName() bool` -SetLastName gets a reference to the given string and assigns it to the LastName field. +HasLastName returns a boolean if a field has been set. ### GetEmail @@ -140,22 +140,22 @@ GetEmail returns the Email field if non-nil, zero value otherwise. ### GetEmailOk -`func (o *User) GetEmailOk() (string, bool)` +`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 +### SetEmail -`func (o *User) HasEmail() bool` +`func (o *User) SetEmail(v string)` -HasEmail returns a boolean if a field has been set. +SetEmail sets Email field to given value. -### SetEmail +### HasEmail -`func (o *User) SetEmail(v string)` +`func (o *User) HasEmail() bool` -SetEmail gets a reference to the given string and assigns it to the Email field. +HasEmail returns a boolean if a field has been set. ### GetPassword @@ -165,22 +165,22 @@ GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk -`func (o *User) GetPasswordOk() (string, bool)` +`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 +### SetPassword -`func (o *User) HasPassword() bool` +`func (o *User) SetPassword(v string)` -HasPassword returns a boolean if a field has been set. +SetPassword sets Password field to given value. -### SetPassword +### HasPassword -`func (o *User) SetPassword(v string)` +`func (o *User) HasPassword() bool` -SetPassword gets a reference to the given string and assigns it to the Password field. +HasPassword returns a boolean if a field has been set. ### GetPhone @@ -190,22 +190,22 @@ GetPhone returns the Phone field if non-nil, zero value otherwise. ### GetPhoneOk -`func (o *User) GetPhoneOk() (string, bool)` +`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 +### SetPhone -`func (o *User) HasPhone() bool` +`func (o *User) SetPhone(v string)` -HasPhone returns a boolean if a field has been set. +SetPhone sets Phone field to given value. -### SetPhone +### HasPhone -`func (o *User) SetPhone(v string)` +`func (o *User) HasPhone() bool` -SetPhone gets a reference to the given string and assigns it to the Phone field. +HasPhone returns a boolean if a field has been set. ### GetUserStatus @@ -215,22 +215,22 @@ GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. ### GetUserStatusOk -`func (o *User) GetUserStatusOk() (int32, bool)` +`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 +### SetUserStatus -`func (o *User) HasUserStatus() bool` +`func (o *User) SetUserStatus(v int32)` -HasUserStatus returns a boolean if a field has been set. +SetUserStatus sets UserStatus field to given value. -### SetUserStatus +### HasUserStatus -`func (o *User) SetUserStatus(v int32)` +`func (o *User) HasUserStatus() bool` -SetUserStatus gets a reference to the given int32 and assigns it to the UserStatus field. +HasUserStatus returns a boolean if a field has been set. [[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/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go index 8c2c0f493c07..c36b5e6da67a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_200_response.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type Model200Response struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewModel200Response() *Model200Response { - this := Model200Response{} - return &this + this := Model200Response{} + return &this } // NewModel200ResponseWithDefaults instantiates a new Model200Response object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewModel200ResponseWithDefaults() *Model200Response { - this := Model200Response{} - return &this + this := Model200Response{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *Model200Response) GetName() int32 { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Model200Response) GetNameOk() (int32, bool) { +func (o *Model200Response) GetNameOk() (*int32, bool) { if o == nil || o.Name == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *Model200Response) GetClass() string { return *o.Class } -// GetClassOk returns a tuple with the Class field value if set, zero value otherwise +// GetClassOk returns a tuple with the Class field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Model200Response) GetClassOk() (string, bool) { +func (o *Model200Response) GetClassOk() (*string, bool) { if o == nil || o.Class == nil { - var ret string - return ret, false + return nil, false } - return *o.Class, true + return o.Class, true } // HasClass returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableModel200Response struct { - Value Model200Response - ExplicitNull bool + value *Model200Response + isSet bool +} + +func (v NullableModel200Response) Get() *Model200Response { + return v.value +} + +func (v *NullableModel200Response) Set(val *Model200Response) { + v.value = val + v.isSet = true +} + +func (v NullableModel200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModel200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModel200Response(val *Model200Response) *NullableModel200Response { + return &NullableModel200Response{value: val, isSet: true} } func (v NullableModel200Response) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableModel200Response) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go index 90de43b900f7..057caa3e4b2d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model__special_model_name_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type SpecialModelName struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewSpecialModelName() *SpecialModelName { - this := SpecialModelName{} - return &this + this := SpecialModelName{} + return &this } // NewSpecialModelNameWithDefaults instantiates a new SpecialModelName object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewSpecialModelNameWithDefaults() *SpecialModelName { - this := SpecialModelName{} - return &this + this := SpecialModelName{} + return &this } // GetSpecialPropertyName returns the SpecialPropertyName field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *SpecialModelName) GetSpecialPropertyName() int64 { return *o.SpecialPropertyName } -// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field value if set, zero value otherwise +// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SpecialModelName) GetSpecialPropertyNameOk() (int64, bool) { +func (o *SpecialModelName) GetSpecialPropertyNameOk() (*int64, bool) { if o == nil || o.SpecialPropertyName == nil { - var ret int64 - return ret, false + return nil, false } - return *o.SpecialPropertyName, true + return o.SpecialPropertyName, true } // HasSpecialPropertyName returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableSpecialModelName struct { - Value SpecialModelName - ExplicitNull bool + value *SpecialModelName + isSet bool +} + +func (v NullableSpecialModelName) Get() *SpecialModelName { + return v.value +} + +func (v *NullableSpecialModelName) Set(val *SpecialModelName) { + v.value = val + v.isSet = true +} + +func (v NullableSpecialModelName) IsSet() bool { + return v.isSet +} + +func (v *NullableSpecialModelName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpecialModelName(val *SpecialModelName) *NullableSpecialModelName { + return &NullableSpecialModelName{value: val, isSet: true} } func (v NullableSpecialModelName) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableSpecialModelName) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 55234aacb77f..eb00215c7fc9 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type AdditionalPropertiesClass struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAdditionalPropertiesClass() *AdditionalPropertiesClass { - this := AdditionalPropertiesClass{} - return &this + this := AdditionalPropertiesClass{} + return &this } // NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass { - this := AdditionalPropertiesClass{} - return &this + this := AdditionalPropertiesClass{} + return &this } // GetMapProperty returns the MapProperty field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string { return *o.MapProperty } -// GetMapPropertyOk returns a tuple with the MapProperty field value if set, zero value otherwise +// GetMapPropertyOk returns a tuple with the MapProperty field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapPropertyOk() (map[string]string, bool) { +func (o *AdditionalPropertiesClass) GetMapPropertyOk() (*map[string]string, bool) { if o == nil || o.MapProperty == nil { - var ret map[string]string - return ret, false + return nil, false } - return *o.MapProperty, true + return o.MapProperty, true } // HasMapProperty returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *AdditionalPropertiesClass) GetMapOfMapProperty() map[string]map[string] return *o.MapOfMapProperty } -// GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field value if set, zero value otherwise +// GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapOfMapPropertyOk() (map[string]map[string]string, bool) { +func (o *AdditionalPropertiesClass) GetMapOfMapPropertyOk() (*map[string]map[string]string, bool) { if o == nil || o.MapOfMapProperty == nil { - var ret map[string]map[string]string - return ret, false + return nil, false } - return *o.MapOfMapProperty, true + return o.MapOfMapProperty, true } // HasMapOfMapProperty returns a boolean if a field has been set. @@ -103,25 +100,49 @@ func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string] o.MapOfMapProperty = &v } +func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MapProperty != nil { + toSerialize["map_property"] = o.MapProperty + } + if o.MapOfMapProperty != nil { + toSerialize["map_of_map_property"] = o.MapOfMapProperty + } + return json.Marshal(toSerialize) +} + type NullableAdditionalPropertiesClass struct { - Value AdditionalPropertiesClass - ExplicitNull bool + value *AdditionalPropertiesClass + isSet bool +} + +func (v NullableAdditionalPropertiesClass) Get() *AdditionalPropertiesClass { + return v.value +} + +func (v *NullableAdditionalPropertiesClass) Set(val *AdditionalPropertiesClass) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalPropertiesClass) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalPropertiesClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalPropertiesClass(val *AdditionalPropertiesClass) *NullableAdditionalPropertiesClass { + return &NullableAdditionalPropertiesClass{value: val, isSet: true} } func (v NullableAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAdditionalPropertiesClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go index 47a4ba3a23aa..3ae97984bcd8 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_animal.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,26 +24,26 @@ type Animal struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewAnimal(className string, ) *Animal { - this := Animal{} - this.ClassName = className - var color string = "red" - this.Color = &color - return &this + this := Animal{} + this.ClassName = className + var color string = "red" + this.Color = &color + return &this } // NewAnimalWithDefaults instantiates a new Animal object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewAnimalWithDefaults() *Animal { - this := Animal{} - var color string = "red" - this.Color = &color - return &this + this := Animal{} + var color string = "red" + this.Color = &color + return &this } // GetClassName returns the ClassName field value func (o *Animal) GetClassName() string { - if o == nil { + if o == nil { var ret string return ret } @@ -52,6 +51,15 @@ func (o *Animal) GetClassName() string { return o.ClassName } +// GetClassNameOk returns a tuple with the ClassName field value +// and a boolean to check if the value has been set. +func (o *Animal) GetClassNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClassName, true +} + // SetClassName sets field value func (o *Animal) SetClassName(v string) { o.ClassName = v @@ -66,14 +74,13 @@ func (o *Animal) GetColor() string { return *o.Color } -// GetColorOk returns a tuple with the Color field value if set, zero value otherwise +// GetColorOk returns a tuple with the Color field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Animal) GetColorOk() (string, bool) { +func (o *Animal) GetColorOk() (*string, bool) { if o == nil || o.Color == nil { - var ret string - return ret, false + return nil, false } - return *o.Color, true + return o.Color, true } // HasColor returns a boolean if a field has been set. @@ -90,25 +97,49 @@ func (o *Animal) SetColor(v string) { o.Color = &v } +func (o Animal) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["className"] = o.ClassName + } + if o.Color != nil { + toSerialize["color"] = o.Color + } + return json.Marshal(toSerialize) +} + type NullableAnimal struct { - Value Animal - ExplicitNull bool + value *Animal + isSet bool +} + +func (v NullableAnimal) Get() *Animal { + return v.value +} + +func (v *NullableAnimal) Set(val *Animal) { + v.value = val + v.isSet = true +} + +func (v NullableAnimal) IsSet() bool { + return v.isSet +} + +func (v *NullableAnimal) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnimal(val *Animal) *NullableAnimal { + return &NullableAnimal{value: val, isSet: true} } func (v NullableAnimal) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableAnimal) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go index f150cfafa436..715916da9534 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_api_response.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -26,16 +25,16 @@ type ApiResponse struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewApiResponse() *ApiResponse { - this := ApiResponse{} - return &this + this := ApiResponse{} + return &this } // NewApiResponseWithDefaults instantiates a new ApiResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewApiResponseWithDefaults() *ApiResponse { - this := ApiResponse{} - return &this + this := ApiResponse{} + return &this } // GetCode returns the Code field value if set, zero value otherwise. @@ -47,14 +46,13 @@ func (o *ApiResponse) GetCode() int32 { return *o.Code } -// GetCodeOk returns a tuple with the Code field value if set, zero value otherwise +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetCodeOk() (int32, bool) { +func (o *ApiResponse) GetCodeOk() (*int32, bool) { if o == nil || o.Code == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Code, true + return o.Code, true } // HasCode returns a boolean if a field has been set. @@ -80,14 +78,13 @@ func (o *ApiResponse) GetType() string { return *o.Type } -// GetTypeOk returns a tuple with the Type field value if set, zero value otherwise +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetTypeOk() (string, bool) { +func (o *ApiResponse) GetTypeOk() (*string, bool) { if o == nil || o.Type == nil { - var ret string - return ret, false + return nil, false } - return *o.Type, true + return o.Type, true } // HasType returns a boolean if a field has been set. @@ -113,14 +110,13 @@ func (o *ApiResponse) GetMessage() string { return *o.Message } -// GetMessageOk returns a tuple with the Message field value if set, zero value otherwise +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ApiResponse) GetMessageOk() (string, bool) { +func (o *ApiResponse) GetMessageOk() (*string, bool) { if o == nil || o.Message == nil { - var ret string - return ret, false + return nil, false } - return *o.Message, true + return o.Message, true } // HasMessage returns a boolean if a field has been set. @@ -137,25 +133,52 @@ 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) +} + type NullableApiResponse struct { - Value ApiResponse - ExplicitNull bool + value *ApiResponse + isSet bool +} + +func (v NullableApiResponse) Get() *ApiResponse { + return v.value +} + +func (v *NullableApiResponse) Set(val *ApiResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiResponse(val *ApiResponse) *NullableApiResponse { + return &NullableApiResponse{value: val, isSet: true} } func (v NullableApiResponse) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableApiResponse) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go index cc9815c9873c..ce9c83bac776 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_array_of_number_only.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type ArrayOfArrayOfNumberOnly struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly { - this := ArrayOfArrayOfNumberOnly{} - return &this + this := ArrayOfArrayOfNumberOnly{} + return &this } // NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly { - this := ArrayOfArrayOfNumberOnly{} - return &this + this := ArrayOfArrayOfNumberOnly{} + return &this } // GetArrayArrayNumber returns the ArrayArrayNumber field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { return *o.ArrayArrayNumber } -// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, zero value otherwise +// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) { +func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() (*[][]float32, bool) { if o == nil || o.ArrayArrayNumber == nil { - var ret [][]float32 - return ret, false + return nil, false } - return *o.ArrayArrayNumber, true + return o.ArrayArrayNumber, true } // HasArrayArrayNumber returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableArrayOfArrayOfNumberOnly struct { - Value ArrayOfArrayOfNumberOnly - ExplicitNull bool + value *ArrayOfArrayOfNumberOnly + isSet bool +} + +func (v NullableArrayOfArrayOfNumberOnly) Get() *ArrayOfArrayOfNumberOnly { + return v.value +} + +func (v *NullableArrayOfArrayOfNumberOnly) Set(val *ArrayOfArrayOfNumberOnly) { + v.value = val + v.isSet = true +} + +func (v NullableArrayOfArrayOfNumberOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableArrayOfArrayOfNumberOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArrayOfArrayOfNumberOnly(val *ArrayOfArrayOfNumberOnly) *NullableArrayOfArrayOfNumberOnly { + return &NullableArrayOfArrayOfNumberOnly{value: val, isSet: true} } func (v NullableArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableArrayOfArrayOfNumberOnly) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go index 49c1292100df..9c8cf80ba85a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_of_number_only.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type ArrayOfNumberOnly struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewArrayOfNumberOnly() *ArrayOfNumberOnly { - this := ArrayOfNumberOnly{} - return &this + this := ArrayOfNumberOnly{} + return &this } // NewArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfNumberOnly object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewArrayOfNumberOnlyWithDefaults() *ArrayOfNumberOnly { - this := ArrayOfNumberOnly{} - return &this + this := ArrayOfNumberOnly{} + return &this } // GetArrayNumber returns the ArrayNumber field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { return *o.ArrayNumber } -// GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, zero value otherwise +// GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) { +func (o *ArrayOfNumberOnly) GetArrayNumberOk() (*[]float32, bool) { if o == nil || o.ArrayNumber == nil { - var ret []float32 - return ret, false + return nil, false } - return *o.ArrayNumber, true + return o.ArrayNumber, true } // HasArrayNumber returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableArrayOfNumberOnly struct { - Value ArrayOfNumberOnly - ExplicitNull bool + value *ArrayOfNumberOnly + isSet bool +} + +func (v NullableArrayOfNumberOnly) Get() *ArrayOfNumberOnly { + return v.value +} + +func (v *NullableArrayOfNumberOnly) Set(val *ArrayOfNumberOnly) { + v.value = val + v.isSet = true +} + +func (v NullableArrayOfNumberOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableArrayOfNumberOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArrayOfNumberOnly(val *ArrayOfNumberOnly) *NullableArrayOfNumberOnly { + return &NullableArrayOfNumberOnly{value: val, isSet: true} } func (v NullableArrayOfNumberOnly) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableArrayOfNumberOnly) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go index 545d8338e883..05abdef65034 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_array_test_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -26,16 +25,16 @@ type ArrayTest struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewArrayTest() *ArrayTest { - this := ArrayTest{} - return &this + this := ArrayTest{} + return &this } // NewArrayTestWithDefaults instantiates a new ArrayTest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewArrayTestWithDefaults() *ArrayTest { - this := ArrayTest{} - return &this + this := ArrayTest{} + return &this } // GetArrayOfString returns the ArrayOfString field value if set, zero value otherwise. @@ -47,14 +46,13 @@ func (o *ArrayTest) GetArrayOfString() []string { return *o.ArrayOfString } -// GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, zero value otherwise +// GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) { +func (o *ArrayTest) GetArrayOfStringOk() (*[]string, bool) { if o == nil || o.ArrayOfString == nil { - var ret []string - return ret, false + return nil, false } - return *o.ArrayOfString, true + return o.ArrayOfString, true } // HasArrayOfString returns a boolean if a field has been set. @@ -80,14 +78,13 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { return *o.ArrayArrayOfInteger } -// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, zero value otherwise +// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) { +func (o *ArrayTest) GetArrayArrayOfIntegerOk() (*[][]int64, bool) { if o == nil || o.ArrayArrayOfInteger == nil { - var ret [][]int64 - return ret, false + return nil, false } - return *o.ArrayArrayOfInteger, true + return o.ArrayArrayOfInteger, true } // HasArrayArrayOfInteger returns a boolean if a field has been set. @@ -113,14 +110,13 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { return *o.ArrayArrayOfModel } -// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, zero value otherwise +// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) { +func (o *ArrayTest) GetArrayArrayOfModelOk() (*[][]ReadOnlyFirst, bool) { if o == nil || o.ArrayArrayOfModel == nil { - var ret [][]ReadOnlyFirst - return ret, false + return nil, false } - return *o.ArrayArrayOfModel, true + return o.ArrayArrayOfModel, true } // HasArrayArrayOfModel returns a boolean if a field has been set. @@ -137,25 +133,52 @@ 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) +} + type NullableArrayTest struct { - Value ArrayTest - ExplicitNull bool + value *ArrayTest + isSet bool +} + +func (v NullableArrayTest) Get() *ArrayTest { + return v.value +} + +func (v *NullableArrayTest) Set(val *ArrayTest) { + v.value = val + v.isSet = true +} + +func (v NullableArrayTest) IsSet() bool { + return v.isSet +} + +func (v *NullableArrayTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArrayTest(val *ArrayTest) *NullableArrayTest { + return &NullableArrayTest{value: val, isSet: true} } func (v NullableArrayTest) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableArrayTest) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go index d1198ae8602e..bd950d64273d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_capitalization.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -30,16 +29,16 @@ type Capitalization struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewCapitalization() *Capitalization { - this := Capitalization{} - return &this + this := Capitalization{} + return &this } // NewCapitalizationWithDefaults instantiates a new Capitalization object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewCapitalizationWithDefaults() *Capitalization { - this := Capitalization{} - return &this + this := Capitalization{} + return &this } // GetSmallCamel returns the SmallCamel field value if set, zero value otherwise. @@ -51,14 +50,13 @@ func (o *Capitalization) GetSmallCamel() string { return *o.SmallCamel } -// GetSmallCamelOk returns a tuple with the SmallCamel field value if set, zero value otherwise +// GetSmallCamelOk returns a tuple with the SmallCamel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetSmallCamelOk() (string, bool) { +func (o *Capitalization) GetSmallCamelOk() (*string, bool) { if o == nil || o.SmallCamel == nil { - var ret string - return ret, false + return nil, false } - return *o.SmallCamel, true + return o.SmallCamel, true } // HasSmallCamel returns a boolean if a field has been set. @@ -84,14 +82,13 @@ func (o *Capitalization) GetCapitalCamel() string { return *o.CapitalCamel } -// GetCapitalCamelOk returns a tuple with the CapitalCamel field value if set, zero value otherwise +// GetCapitalCamelOk returns a tuple with the CapitalCamel field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetCapitalCamelOk() (string, bool) { +func (o *Capitalization) GetCapitalCamelOk() (*string, bool) { if o == nil || o.CapitalCamel == nil { - var ret string - return ret, false + return nil, false } - return *o.CapitalCamel, true + return o.CapitalCamel, true } // HasCapitalCamel returns a boolean if a field has been set. @@ -117,14 +114,13 @@ func (o *Capitalization) GetSmallSnake() string { return *o.SmallSnake } -// GetSmallSnakeOk returns a tuple with the SmallSnake field value if set, zero value otherwise +// GetSmallSnakeOk returns a tuple with the SmallSnake field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetSmallSnakeOk() (string, bool) { +func (o *Capitalization) GetSmallSnakeOk() (*string, bool) { if o == nil || o.SmallSnake == nil { - var ret string - return ret, false + return nil, false } - return *o.SmallSnake, true + return o.SmallSnake, true } // HasSmallSnake returns a boolean if a field has been set. @@ -150,14 +146,13 @@ func (o *Capitalization) GetCapitalSnake() string { return *o.CapitalSnake } -// GetCapitalSnakeOk returns a tuple with the CapitalSnake field value if set, zero value otherwise +// GetCapitalSnakeOk returns a tuple with the CapitalSnake field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetCapitalSnakeOk() (string, bool) { +func (o *Capitalization) GetCapitalSnakeOk() (*string, bool) { if o == nil || o.CapitalSnake == nil { - var ret string - return ret, false + return nil, false } - return *o.CapitalSnake, true + return o.CapitalSnake, true } // HasCapitalSnake returns a boolean if a field has been set. @@ -183,14 +178,13 @@ func (o *Capitalization) GetSCAETHFlowPoints() string { return *o.SCAETHFlowPoints } -// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field value if set, zero value otherwise +// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetSCAETHFlowPointsOk() (string, bool) { +func (o *Capitalization) GetSCAETHFlowPointsOk() (*string, bool) { if o == nil || o.SCAETHFlowPoints == nil { - var ret string - return ret, false + return nil, false } - return *o.SCAETHFlowPoints, true + return o.SCAETHFlowPoints, true } // HasSCAETHFlowPoints returns a boolean if a field has been set. @@ -216,14 +210,13 @@ func (o *Capitalization) GetATT_NAME() string { return *o.ATT_NAME } -// GetATT_NAMEOk returns a tuple with the ATT_NAME field value if set, zero value otherwise +// GetATT_NAMEOk returns a tuple with the ATT_NAME field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Capitalization) GetATT_NAMEOk() (string, bool) { +func (o *Capitalization) GetATT_NAMEOk() (*string, bool) { if o == nil || o.ATT_NAME == nil { - var ret string - return ret, false + return nil, false } - return *o.ATT_NAME, true + return o.ATT_NAME, true } // HasATT_NAME returns a boolean if a field has been set. @@ -240,25 +233,61 @@ 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) +} + type NullableCapitalization struct { - Value Capitalization - ExplicitNull bool + value *Capitalization + isSet bool +} + +func (v NullableCapitalization) Get() *Capitalization { + return v.value +} + +func (v *NullableCapitalization) Set(val *Capitalization) { + v.value = val + v.isSet = true +} + +func (v NullableCapitalization) IsSet() bool { + return v.isSet +} + +func (v *NullableCapitalization) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCapitalization(val *Capitalization) *NullableCapitalization { + return &NullableCapitalization{value: val, isSet: true} } func (v NullableCapitalization) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableCapitalization) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go index 4660d0cca093..fa7fe3699da1 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type Cat struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewCat() *Cat { - this := Cat{} - return &this + this := Cat{} + return &this } // NewCatWithDefaults instantiates a new Cat object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewCatWithDefaults() *Cat { - this := Cat{} - return &this + this := Cat{} + return &this } // GetDeclawed returns the Declawed field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *Cat) GetDeclawed() bool { return *o.Declawed } -// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise +// GetDeclawedOk returns a tuple with the Declawed field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Cat) GetDeclawedOk() (bool, bool) { +func (o *Cat) GetDeclawedOk() (*bool, bool) { if o == nil || o.Declawed == nil { - var ret bool - return ret, false + return nil, false } - return *o.Declawed, true + return o.Declawed, true } // HasDeclawed returns a boolean if a field has been set. @@ -70,25 +68,54 @@ func (o *Cat) SetDeclawed(v bool) { o.Declawed = &v } +func (o Cat) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + serializedAnimal, errAnimal := json.Marshal(o.Animal) + if errAnimal != nil { + return []byte{}, errAnimal + } + errAnimal = json.Unmarshal([]byte(serializedAnimal), &toSerialize) + if errAnimal != nil { + return []byte{}, errAnimal + } + if o.Declawed != nil { + toSerialize["declawed"] = o.Declawed + } + return json.Marshal(toSerialize) +} + type NullableCat struct { - Value Cat - ExplicitNull bool + value *Cat + isSet bool +} + +func (v NullableCat) Get() *Cat { + return v.value +} + +func (v *NullableCat) Set(val *Cat) { + v.value = val + v.isSet = true +} + +func (v NullableCat) IsSet() bool { + return v.isSet +} + +func (v *NullableCat) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCat(val *Cat) *NullableCat { + return &NullableCat{value: val, isSet: true} } func (v NullableCat) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableCat) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go index 27e6189a1e63..3ed56df463eb 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_cat_all_of.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type CatAllOf struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewCatAllOf() *CatAllOf { - this := CatAllOf{} - return &this + this := CatAllOf{} + return &this } // NewCatAllOfWithDefaults instantiates a new CatAllOf object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewCatAllOfWithDefaults() *CatAllOf { - this := CatAllOf{} - return &this + this := CatAllOf{} + return &this } // GetDeclawed returns the Declawed field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *CatAllOf) GetDeclawed() bool { return *o.Declawed } -// GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise +// GetDeclawedOk returns a tuple with the Declawed field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CatAllOf) GetDeclawedOk() (bool, bool) { +func (o *CatAllOf) GetDeclawedOk() (*bool, bool) { if o == nil || o.Declawed == nil { - var ret bool - return ret, false + return nil, false } - return *o.Declawed, true + return o.Declawed, true } // HasDeclawed returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableCatAllOf struct { - Value CatAllOf - ExplicitNull bool + value *CatAllOf + isSet bool +} + +func (v NullableCatAllOf) Get() *CatAllOf { + return v.value +} + +func (v *NullableCatAllOf) Set(val *CatAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableCatAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableCatAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCatAllOf(val *CatAllOf) *NullableCatAllOf { + return &NullableCatAllOf{value: val, isSet: true} } func (v NullableCatAllOf) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go index f3a22034c482..df490d1668f9 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_category.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,19 +24,19 @@ type Category struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewCategory(name string, ) *Category { - this := Category{} - this.Name = name - return &this + this := Category{} + this.Name = name + return &this } // NewCategoryWithDefaults instantiates a new Category object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewCategoryWithDefaults() *Category { - this := Category{} - var name string = "default-name" - this.Name = name - return &this + this := Category{} + var name string = "default-name" + this.Name = name + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -49,14 +48,13 @@ func (o *Category) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Category) GetIdOk() (int64, bool) { +func (o *Category) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -75,7 +73,7 @@ func (o *Category) SetId(v int64) { // GetName returns the Name field value func (o *Category) GetName() string { - if o == nil { + if o == nil { var ret string return ret } @@ -83,30 +81,63 @@ func (o *Category) GetName() string { return o.Name } +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Category) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + // SetName sets field value 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 true { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + type NullableCategory struct { - Value Category - ExplicitNull bool + value *Category + isSet bool +} + +func (v NullableCategory) Get() *Category { + return v.value +} + +func (v *NullableCategory) Set(val *Category) { + v.value = val + v.isSet = true +} + +func (v NullableCategory) IsSet() bool { + return v.isSet +} + +func (v *NullableCategory) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCategory(val *Category) *NullableCategory { + return &NullableCategory{value: val, isSet: true} } func (v NullableCategory) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableCategory) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go index cdc48b1bd9d0..518bf54ac3d9 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_class_model.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type ClassModel struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewClassModel() *ClassModel { - this := ClassModel{} - return &this + this := ClassModel{} + return &this } // NewClassModelWithDefaults instantiates a new ClassModel object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewClassModelWithDefaults() *ClassModel { - this := ClassModel{} - return &this + this := ClassModel{} + return &this } // GetClass returns the Class field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *ClassModel) GetClass() string { return *o.Class } -// GetClassOk returns a tuple with the Class field value if set, zero value otherwise +// GetClassOk returns a tuple with the Class field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ClassModel) GetClassOk() (string, bool) { +func (o *ClassModel) GetClassOk() (*string, bool) { if o == nil || o.Class == nil { - var ret string - return ret, false + return nil, false } - return *o.Class, true + return o.Class, true } // HasClass returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableClassModel struct { - Value ClassModel - ExplicitNull bool + value *ClassModel + isSet bool +} + +func (v NullableClassModel) Get() *ClassModel { + return v.value +} + +func (v *NullableClassModel) Set(val *ClassModel) { + v.value = val + v.isSet = true +} + +func (v NullableClassModel) IsSet() bool { + return v.isSet +} + +func (v *NullableClassModel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClassModel(val *ClassModel) *NullableClassModel { + return &NullableClassModel{value: val, isSet: true} } func (v NullableClassModel) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableClassModel) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go index 447c7e2da53a..cfc309393b16 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_client.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type Client struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewClient() *Client { - this := Client{} - return &this + this := Client{} + return &this } // NewClientWithDefaults instantiates a new Client object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewClientWithDefaults() *Client { - this := Client{} - return &this + this := Client{} + return &this } // GetClient returns the Client field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *Client) GetClient() string { return *o.Client } -// GetClientOk returns a tuple with the Client field value if set, zero value otherwise +// GetClientOk returns a tuple with the Client field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Client) GetClientOk() (string, bool) { +func (o *Client) GetClientOk() (*string, bool) { if o == nil || o.Client == nil { - var ret string - return ret, false + return nil, false } - return *o.Client, true + return o.Client, true } // HasClient returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableClient struct { - Value Client - ExplicitNull bool + value *Client + isSet bool +} + +func (v NullableClient) Get() *Client { + return v.value +} + +func (v *NullableClient) Set(val *Client) { + v.value = val + v.isSet = true +} + +func (v NullableClient) IsSet() bool { + return v.isSet +} + +func (v *NullableClient) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClient(val *Client) *NullableClient { + return &NullableClient{value: val, isSet: true} } func (v NullableClient) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableClient) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go index 4bbfbc208ded..607dcf455c57 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type Dog struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewDog() *Dog { - this := Dog{} - return &this + this := Dog{} + return &this } // NewDogWithDefaults instantiates a new Dog object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewDogWithDefaults() *Dog { - this := Dog{} - return &this + this := Dog{} + return &this } // GetBreed returns the Breed field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *Dog) GetBreed() string { return *o.Breed } -// GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise +// GetBreedOk returns a tuple with the Breed field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Dog) GetBreedOk() (string, bool) { +func (o *Dog) GetBreedOk() (*string, bool) { if o == nil || o.Breed == nil { - var ret string - return ret, false + return nil, false } - return *o.Breed, true + return o.Breed, true } // HasBreed returns a boolean if a field has been set. @@ -70,25 +68,54 @@ func (o *Dog) SetBreed(v string) { o.Breed = &v } +func (o Dog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + serializedAnimal, errAnimal := json.Marshal(o.Animal) + if errAnimal != nil { + return []byte{}, errAnimal + } + errAnimal = json.Unmarshal([]byte(serializedAnimal), &toSerialize) + if errAnimal != nil { + return []byte{}, errAnimal + } + if o.Breed != nil { + toSerialize["breed"] = o.Breed + } + return json.Marshal(toSerialize) +} + type NullableDog struct { - Value Dog - ExplicitNull bool + value *Dog + isSet bool +} + +func (v NullableDog) Get() *Dog { + return v.value +} + +func (v *NullableDog) Set(val *Dog) { + v.value = val + v.isSet = true +} + +func (v NullableDog) IsSet() bool { + return v.isSet +} + +func (v *NullableDog) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDog(val *Dog) *NullableDog { + return &NullableDog{value: val, isSet: true} } func (v NullableDog) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableDog) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go index 27cc1210b4b1..e30f7fafba61 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_dog_all_of.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type DogAllOf struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewDogAllOf() *DogAllOf { - this := DogAllOf{} - return &this + this := DogAllOf{} + return &this } // NewDogAllOfWithDefaults instantiates a new DogAllOf object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewDogAllOfWithDefaults() *DogAllOf { - this := DogAllOf{} - return &this + this := DogAllOf{} + return &this } // GetBreed returns the Breed field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *DogAllOf) GetBreed() string { return *o.Breed } -// GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise +// GetBreedOk returns a tuple with the Breed field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DogAllOf) GetBreedOk() (string, bool) { +func (o *DogAllOf) GetBreedOk() (*string, bool) { if o == nil || o.Breed == nil { - var ret string - return ret, false + return nil, false } - return *o.Breed, true + return o.Breed, true } // HasBreed returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableDogAllOf struct { - Value DogAllOf - ExplicitNull bool + value *DogAllOf + isSet bool +} + +func (v NullableDogAllOf) Get() *DogAllOf { + return v.value +} + +func (v *NullableDogAllOf) Set(val *DogAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableDogAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableDogAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDogAllOf(val *DogAllOf) *NullableDogAllOf { + return &NullableDogAllOf{value: val, isSet: true} } func (v NullableDogAllOf) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go index fe411a091b55..edc98c6ee478 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_arrays.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type EnumArrays struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewEnumArrays() *EnumArrays { - this := EnumArrays{} - return &this + this := EnumArrays{} + return &this } // NewEnumArraysWithDefaults instantiates a new EnumArrays object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewEnumArraysWithDefaults() *EnumArrays { - this := EnumArrays{} - return &this + this := EnumArrays{} + return &this } // GetJustSymbol returns the JustSymbol field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *EnumArrays) GetJustSymbol() string { return *o.JustSymbol } -// GetJustSymbolOk returns a tuple with the JustSymbol field value if set, zero value otherwise +// GetJustSymbolOk returns a tuple with the JustSymbol field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumArrays) GetJustSymbolOk() (string, bool) { +func (o *EnumArrays) GetJustSymbolOk() (*string, bool) { if o == nil || o.JustSymbol == nil { - var ret string - return ret, false + return nil, false } - return *o.JustSymbol, true + return o.JustSymbol, true } // HasJustSymbol returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *EnumArrays) GetArrayEnum() []string { return *o.ArrayEnum } -// GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, zero value otherwise +// GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) { +func (o *EnumArrays) GetArrayEnumOk() (*[]string, bool) { if o == nil || o.ArrayEnum == nil { - var ret []string - return ret, false + return nil, false } - return *o.ArrayEnum, true + return o.ArrayEnum, true } // HasArrayEnum returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableEnumArrays struct { - Value EnumArrays - ExplicitNull bool + value *EnumArrays + isSet bool +} + +func (v NullableEnumArrays) Get() *EnumArrays { + return v.value +} + +func (v *NullableEnumArrays) Set(val *EnumArrays) { + v.value = val + v.isSet = true +} + +func (v NullableEnumArrays) IsSet() bool { + return v.isSet +} + +func (v *NullableEnumArrays) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnumArrays(val *EnumArrays) *NullableEnumArrays { + return &NullableEnumArrays{value: val, isSet: true} } func (v NullableEnumArrays) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableEnumArrays) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_class.go index 826172fc39ba..c3d249b6fe7b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_class.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,24 +24,37 @@ const ( ) type NullableEnumClass struct { - Value EnumClass - ExplicitNull bool + value *EnumClass + isSet bool +} + +func (v NullableEnumClass) Get() *EnumClass { + return v.value +} + +func (v *NullableEnumClass) Set(val *EnumClass) { + v.value = val + v.isSet = true +} + +func (v NullableEnumClass) IsSet() bool { + return v.isSet +} + +func (v *NullableEnumClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnumClass(val *EnumClass) *NullableEnumClass { + return &NullableEnumClass{value: val, isSet: true} } func (v NullableEnumClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableEnumClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go index fd2e22d9b4e5..0098ee7682a0 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_enum_test_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -20,7 +19,7 @@ type EnumTest struct { EnumStringRequired string `json:"enum_string_required"` EnumInteger *int32 `json:"enum_integer,omitempty"` EnumNumber *float64 `json:"enum_number,omitempty"` - OuterEnum *NullableOuterEnum `json:"outerEnum,omitempty"` + OuterEnum NullableOuterEnum `json:"outerEnum,omitempty"` OuterEnumInteger *OuterEnumInteger `json:"outerEnumInteger,omitempty"` OuterEnumDefaultValue *OuterEnumDefaultValue `json:"outerEnumDefaultValue,omitempty"` OuterEnumIntegerDefaultValue *OuterEnumIntegerDefaultValue `json:"outerEnumIntegerDefaultValue,omitempty"` @@ -31,25 +30,25 @@ type EnumTest struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewEnumTest(enumStringRequired string, ) *EnumTest { - this := EnumTest{} - this.EnumStringRequired = enumStringRequired - var outerEnumDefaultValue OuterEnumDefaultValue = "placed" - this.OuterEnumDefaultValue = &outerEnumDefaultValue - var outerEnumIntegerDefaultValue OuterEnumIntegerDefaultValue = OUTERENUMINTEGERDEFAULTVALUE__0 - this.OuterEnumIntegerDefaultValue = &outerEnumIntegerDefaultValue - return &this + this := EnumTest{} + this.EnumStringRequired = enumStringRequired + var outerEnumDefaultValue OuterEnumDefaultValue = "placed" + this.OuterEnumDefaultValue = &outerEnumDefaultValue + var outerEnumIntegerDefaultValue OuterEnumIntegerDefaultValue = OUTERENUMINTEGERDEFAULTVALUE__0 + this.OuterEnumIntegerDefaultValue = &outerEnumIntegerDefaultValue + return &this } // NewEnumTestWithDefaults instantiates a new EnumTest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewEnumTestWithDefaults() *EnumTest { - this := EnumTest{} - var outerEnumDefaultValue OuterEnumDefaultValue = "placed" - this.OuterEnumDefaultValue = &outerEnumDefaultValue - var outerEnumIntegerDefaultValue OuterEnumIntegerDefaultValue = OUTERENUMINTEGERDEFAULTVALUE__0 - this.OuterEnumIntegerDefaultValue = &outerEnumIntegerDefaultValue - return &this + this := EnumTest{} + var outerEnumDefaultValue OuterEnumDefaultValue = "placed" + this.OuterEnumDefaultValue = &outerEnumDefaultValue + var outerEnumIntegerDefaultValue OuterEnumIntegerDefaultValue = OUTERENUMINTEGERDEFAULTVALUE__0 + this.OuterEnumIntegerDefaultValue = &outerEnumIntegerDefaultValue + return &this } // GetEnumString returns the EnumString field value if set, zero value otherwise. @@ -61,14 +60,13 @@ func (o *EnumTest) GetEnumString() string { return *o.EnumString } -// GetEnumStringOk returns a tuple with the EnumString field value if set, zero value otherwise +// GetEnumStringOk returns a tuple with the EnumString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetEnumStringOk() (string, bool) { +func (o *EnumTest) GetEnumStringOk() (*string, bool) { if o == nil || o.EnumString == nil { - var ret string - return ret, false + return nil, false } - return *o.EnumString, true + return o.EnumString, true } // HasEnumString returns a boolean if a field has been set. @@ -87,7 +85,7 @@ func (o *EnumTest) SetEnumString(v string) { // GetEnumStringRequired returns the EnumStringRequired field value func (o *EnumTest) GetEnumStringRequired() string { - if o == nil { + if o == nil { var ret string return ret } @@ -95,6 +93,15 @@ func (o *EnumTest) GetEnumStringRequired() string { return o.EnumStringRequired } +// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field value +// and a boolean to check if the value has been set. +func (o *EnumTest) GetEnumStringRequiredOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EnumStringRequired, true +} + // SetEnumStringRequired sets field value func (o *EnumTest) SetEnumStringRequired(v string) { o.EnumStringRequired = v @@ -109,14 +116,13 @@ func (o *EnumTest) GetEnumInteger() int32 { return *o.EnumInteger } -// GetEnumIntegerOk returns a tuple with the EnumInteger field value if set, zero value otherwise +// GetEnumIntegerOk returns a tuple with the EnumInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetEnumIntegerOk() (int32, bool) { +func (o *EnumTest) GetEnumIntegerOk() (*int32, bool) { if o == nil || o.EnumInteger == nil { - var ret int32 - return ret, false + return nil, false } - return *o.EnumInteger, true + return o.EnumInteger, true } // HasEnumInteger returns a boolean if a field has been set. @@ -142,14 +148,13 @@ func (o *EnumTest) GetEnumNumber() float64 { return *o.EnumNumber } -// GetEnumNumberOk returns a tuple with the EnumNumber field value if set, zero value otherwise +// GetEnumNumberOk returns a tuple with the EnumNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetEnumNumberOk() (float64, bool) { +func (o *EnumTest) GetEnumNumberOk() (*float64, bool) { if o == nil || o.EnumNumber == nil { - var ret float64 - return ret, false + return nil, false } - return *o.EnumNumber, true + return o.EnumNumber, true } // HasEnumNumber returns a boolean if a field has been set. @@ -166,28 +171,28 @@ func (o *EnumTest) SetEnumNumber(v float64) { o.EnumNumber = &v } -// GetOuterEnum returns the OuterEnum field value if set, zero value otherwise. -func (o *EnumTest) GetOuterEnum() NullableOuterEnum { - if o == nil || o.OuterEnum == nil { - var ret NullableOuterEnum +// GetOuterEnum returns the OuterEnum field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnumTest) GetOuterEnum() OuterEnum { + if o == nil || o.OuterEnum.Get() == nil { + var ret OuterEnum return ret } - return *o.OuterEnum + return *o.OuterEnum.Get() } -// GetOuterEnumOk returns a tuple with the OuterEnum field value if set, zero value otherwise +// GetOuterEnumOk returns a tuple with the OuterEnum field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetOuterEnumOk() (NullableOuterEnum, bool) { - if o == nil || o.OuterEnum == nil { - var ret NullableOuterEnum - return ret, false +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *EnumTest) GetOuterEnumOk() (*OuterEnum, bool) { + if o == nil { + return nil, false } - return *o.OuterEnum, true + return o.OuterEnum.Get(), o.OuterEnum.IsSet() } // HasOuterEnum returns a boolean if a field has been set. func (o *EnumTest) HasOuterEnum() bool { - if o != nil && o.OuterEnum != nil { + if o != nil && o.OuterEnum.IsSet() { return true } @@ -195,8 +200,17 @@ func (o *EnumTest) HasOuterEnum() bool { } // SetOuterEnum gets a reference to the given NullableOuterEnum and assigns it to the OuterEnum field. -func (o *EnumTest) SetOuterEnum(v NullableOuterEnum) { - o.OuterEnum = &v +func (o *EnumTest) SetOuterEnum(v OuterEnum) { + o.OuterEnum.Set(&v) +} +// SetOuterEnumNil sets the value for OuterEnum to be an explicit nil +func (o *EnumTest) SetOuterEnumNil() { + o.OuterEnum.Set(nil) +} + +// UnsetOuterEnum ensures that no value is present for OuterEnum, not even an explicit nil +func (o *EnumTest) UnsetOuterEnum() { + o.OuterEnum.Unset() } // GetOuterEnumInteger returns the OuterEnumInteger field value if set, zero value otherwise. @@ -208,14 +222,13 @@ func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger { return *o.OuterEnumInteger } -// GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field value if set, zero value otherwise +// GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetOuterEnumIntegerOk() (OuterEnumInteger, bool) { +func (o *EnumTest) GetOuterEnumIntegerOk() (*OuterEnumInteger, bool) { if o == nil || o.OuterEnumInteger == nil { - var ret OuterEnumInteger - return ret, false + return nil, false } - return *o.OuterEnumInteger, true + return o.OuterEnumInteger, true } // HasOuterEnumInteger returns a boolean if a field has been set. @@ -241,14 +254,13 @@ func (o *EnumTest) GetOuterEnumDefaultValue() OuterEnumDefaultValue { return *o.OuterEnumDefaultValue } -// GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field value if set, zero value otherwise +// GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetOuterEnumDefaultValueOk() (OuterEnumDefaultValue, bool) { +func (o *EnumTest) GetOuterEnumDefaultValueOk() (*OuterEnumDefaultValue, bool) { if o == nil || o.OuterEnumDefaultValue == nil { - var ret OuterEnumDefaultValue - return ret, false + return nil, false } - return *o.OuterEnumDefaultValue, true + return o.OuterEnumDefaultValue, true } // HasOuterEnumDefaultValue returns a boolean if a field has been set. @@ -274,14 +286,13 @@ func (o *EnumTest) GetOuterEnumIntegerDefaultValue() OuterEnumIntegerDefaultValu return *o.OuterEnumIntegerDefaultValue } -// GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field value if set, zero value otherwise +// GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EnumTest) GetOuterEnumIntegerDefaultValueOk() (OuterEnumIntegerDefaultValue, bool) { +func (o *EnumTest) GetOuterEnumIntegerDefaultValueOk() (*OuterEnumIntegerDefaultValue, bool) { if o == nil || o.OuterEnumIntegerDefaultValue == nil { - var ret OuterEnumIntegerDefaultValue - return ret, false + return nil, false } - return *o.OuterEnumIntegerDefaultValue, true + return o.OuterEnumIntegerDefaultValue, true } // HasOuterEnumIntegerDefaultValue returns a boolean if a field has been set. @@ -298,25 +309,67 @@ func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValu o.OuterEnumIntegerDefaultValue = &v } +func (o EnumTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.EnumString != nil { + toSerialize["enum_string"] = o.EnumString + } + if true { + 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.IsSet() { + toSerialize["outerEnum"] = o.OuterEnum.Get() + } + if o.OuterEnumInteger != nil { + toSerialize["outerEnumInteger"] = o.OuterEnumInteger + } + if o.OuterEnumDefaultValue != nil { + toSerialize["outerEnumDefaultValue"] = o.OuterEnumDefaultValue + } + if o.OuterEnumIntegerDefaultValue != nil { + toSerialize["outerEnumIntegerDefaultValue"] = o.OuterEnumIntegerDefaultValue + } + return json.Marshal(toSerialize) +} + type NullableEnumTest struct { - Value EnumTest - ExplicitNull bool + value *EnumTest + isSet bool +} + +func (v NullableEnumTest) Get() *EnumTest { + return v.value +} + +func (v *NullableEnumTest) Set(val *EnumTest) { + v.value = val + v.isSet = true +} + +func (v NullableEnumTest) IsSet() bool { + return v.isSet +} + +func (v *NullableEnumTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnumTest(val *EnumTest) *NullableEnumTest { + return &NullableEnumTest{value: val, isSet: true} } func (v NullableEnumTest) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableEnumTest) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go index 82e4bc173f80..61d028327e0b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type File struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewFile() *File { - this := File{} - return &this + this := File{} + return &this } // NewFileWithDefaults instantiates a new File object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewFileWithDefaults() *File { - this := File{} - return &this + this := File{} + return &this } // GetSourceURI returns the SourceURI field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *File) GetSourceURI() string { return *o.SourceURI } -// GetSourceURIOk returns a tuple with the SourceURI field value if set, zero value otherwise +// GetSourceURIOk returns a tuple with the SourceURI field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *File) GetSourceURIOk() (string, bool) { +func (o *File) GetSourceURIOk() (*string, bool) { if o == nil || o.SourceURI == nil { - var ret string - return ret, false + return nil, false } - return *o.SourceURI, true + return o.SourceURI, true } // HasSourceURI returns a boolean if a field has been set. @@ -70,25 +68,46 @@ 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) +} + type NullableFile struct { - Value File - ExplicitNull bool + value *File + isSet bool +} + +func (v NullableFile) Get() *File { + return v.value +} + +func (v *NullableFile) Set(val *File) { + v.value = val + v.isSet = true +} + +func (v NullableFile) IsSet() bool { + return v.isSet +} + +func (v *NullableFile) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFile(val *File) *NullableFile { + return &NullableFile{value: val, isSet: true} } func (v NullableFile) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFile) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go index 74fbd77e22d0..92b799a61630 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_file_schema_test_class.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type FileSchemaTestClass struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewFileSchemaTestClass() *FileSchemaTestClass { - this := FileSchemaTestClass{} - return &this + this := FileSchemaTestClass{} + return &this } // NewFileSchemaTestClassWithDefaults instantiates a new FileSchemaTestClass object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewFileSchemaTestClassWithDefaults() *FileSchemaTestClass { - this := FileSchemaTestClass{} - return &this + this := FileSchemaTestClass{} + return &this } // GetFile returns the File field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *FileSchemaTestClass) GetFile() File { return *o.File } -// GetFileOk returns a tuple with the File field value if set, zero value otherwise +// GetFileOk returns a tuple with the File field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FileSchemaTestClass) GetFileOk() (File, bool) { +func (o *FileSchemaTestClass) GetFileOk() (*File, bool) { if o == nil || o.File == nil { - var ret File - return ret, false + return nil, false } - return *o.File, true + return o.File, true } // HasFile returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *FileSchemaTestClass) GetFiles() []File { return *o.Files } -// GetFilesOk returns a tuple with the Files field value if set, zero value otherwise +// GetFilesOk returns a tuple with the Files field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) { +func (o *FileSchemaTestClass) GetFilesOk() (*[]File, bool) { if o == nil || o.Files == nil { - var ret []File - return ret, false + return nil, false } - return *o.Files, true + return o.Files, true } // HasFiles returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableFileSchemaTestClass struct { - Value FileSchemaTestClass - ExplicitNull bool + value *FileSchemaTestClass + isSet bool +} + +func (v NullableFileSchemaTestClass) Get() *FileSchemaTestClass { + return v.value +} + +func (v *NullableFileSchemaTestClass) Set(val *FileSchemaTestClass) { + v.value = val + v.isSet = true +} + +func (v NullableFileSchemaTestClass) IsSet() bool { + return v.isSet +} + +func (v *NullableFileSchemaTestClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileSchemaTestClass(val *FileSchemaTestClass) *NullableFileSchemaTestClass { + return &NullableFileSchemaTestClass{value: val, isSet: true} } func (v NullableFileSchemaTestClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFileSchemaTestClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go index fc7b85e49f6d..673ead81f0de 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_foo.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,20 +23,20 @@ type Foo struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewFoo() *Foo { - this := Foo{} - var bar string = "bar" - this.Bar = &bar - return &this + this := Foo{} + var bar string = "bar" + this.Bar = &bar + return &this } // NewFooWithDefaults instantiates a new Foo object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewFooWithDefaults() *Foo { - this := Foo{} - var bar string = "bar" - this.Bar = &bar - return &this + this := Foo{} + var bar string = "bar" + this.Bar = &bar + return &this } // GetBar returns the Bar field value if set, zero value otherwise. @@ -49,14 +48,13 @@ func (o *Foo) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Foo) GetBarOk() (string, bool) { +func (o *Foo) GetBarOk() (*string, bool) { if o == nil || o.Bar == nil { - var ret string - return ret, false + return nil, false } - return *o.Bar, true + return o.Bar, true } // HasBar returns a boolean if a field has been set. @@ -73,25 +71,46 @@ func (o *Foo) SetBar(v string) { o.Bar = &v } +func (o Foo) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Bar != nil { + toSerialize["bar"] = o.Bar + } + return json.Marshal(toSerialize) +} + type NullableFoo struct { - Value Foo - ExplicitNull bool + value *Foo + isSet bool +} + +func (v NullableFoo) Get() *Foo { + return v.value +} + +func (v *NullableFoo) Set(val *Foo) { + v.value = val + v.isSet = true +} + +func (v NullableFoo) IsSet() bool { + return v.isSet +} + +func (v *NullableFoo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFoo(val *Foo) *NullableFoo { + return &NullableFoo{value: val, isSet: true} } func (v NullableFoo) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFoo) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go index 13ff45149093..89e97de0a87c 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_format_test_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "os" "time" @@ -42,20 +41,20 @@ type FormatTest struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewFormatTest(number float32, byte_ string, date string, password string, ) *FormatTest { - this := FormatTest{} - this.Number = number - this.Byte = byte_ - this.Date = date - this.Password = password - return &this + this := FormatTest{} + this.Number = number + this.Byte = byte_ + this.Date = date + this.Password = password + return &this } // NewFormatTestWithDefaults instantiates a new FormatTest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewFormatTestWithDefaults() *FormatTest { - this := FormatTest{} - return &this + this := FormatTest{} + return &this } // GetInteger returns the Integer field value if set, zero value otherwise. @@ -67,14 +66,13 @@ func (o *FormatTest) GetInteger() int32 { return *o.Integer } -// GetIntegerOk returns a tuple with the Integer field value if set, zero value otherwise +// GetIntegerOk returns a tuple with the Integer field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetIntegerOk() (int32, bool) { +func (o *FormatTest) GetIntegerOk() (*int32, bool) { if o == nil || o.Integer == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Integer, true + return o.Integer, true } // HasInteger returns a boolean if a field has been set. @@ -100,14 +98,13 @@ func (o *FormatTest) GetInt32() int32 { return *o.Int32 } -// GetInt32Ok returns a tuple with the Int32 field value if set, zero value otherwise +// GetInt32Ok returns a tuple with the Int32 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetInt32Ok() (int32, bool) { +func (o *FormatTest) GetInt32Ok() (*int32, bool) { if o == nil || o.Int32 == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Int32, true + return o.Int32, true } // HasInt32 returns a boolean if a field has been set. @@ -133,14 +130,13 @@ func (o *FormatTest) GetInt64() int64 { return *o.Int64 } -// GetInt64Ok returns a tuple with the Int64 field value if set, zero value otherwise +// GetInt64Ok returns a tuple with the Int64 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetInt64Ok() (int64, bool) { +func (o *FormatTest) GetInt64Ok() (*int64, bool) { if o == nil || o.Int64 == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Int64, true + return o.Int64, true } // HasInt64 returns a boolean if a field has been set. @@ -159,7 +155,7 @@ func (o *FormatTest) SetInt64(v int64) { // GetNumber returns the Number field value func (o *FormatTest) GetNumber() float32 { - if o == nil { + if o == nil { var ret float32 return ret } @@ -167,6 +163,15 @@ func (o *FormatTest) GetNumber() float32 { return o.Number } +// GetNumberOk returns a tuple with the Number field value +// and a boolean to check if the value has been set. +func (o *FormatTest) GetNumberOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Number, true +} + // SetNumber sets field value func (o *FormatTest) SetNumber(v float32) { o.Number = v @@ -181,14 +186,13 @@ func (o *FormatTest) GetFloat() float32 { return *o.Float } -// GetFloatOk returns a tuple with the Float field value if set, zero value otherwise +// GetFloatOk returns a tuple with the Float field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetFloatOk() (float32, bool) { +func (o *FormatTest) GetFloatOk() (*float32, bool) { if o == nil || o.Float == nil { - var ret float32 - return ret, false + return nil, false } - return *o.Float, true + return o.Float, true } // HasFloat returns a boolean if a field has been set. @@ -214,14 +218,13 @@ func (o *FormatTest) GetDouble() float64 { return *o.Double } -// GetDoubleOk returns a tuple with the Double field value if set, zero value otherwise +// GetDoubleOk returns a tuple with the Double field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetDoubleOk() (float64, bool) { +func (o *FormatTest) GetDoubleOk() (*float64, bool) { if o == nil || o.Double == nil { - var ret float64 - return ret, false + return nil, false } - return *o.Double, true + return o.Double, true } // HasDouble returns a boolean if a field has been set. @@ -247,14 +250,13 @@ func (o *FormatTest) GetString() string { return *o.String } -// GetStringOk returns a tuple with the String field value if set, zero value otherwise +// GetStringOk returns a tuple with the String field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetStringOk() (string, bool) { +func (o *FormatTest) GetStringOk() (*string, bool) { if o == nil || o.String == nil { - var ret string - return ret, false + return nil, false } - return *o.String, true + return o.String, true } // HasString returns a boolean if a field has been set. @@ -273,7 +275,7 @@ func (o *FormatTest) SetString(v string) { // GetByte returns the Byte field value func (o *FormatTest) GetByte() string { - if o == nil { + if o == nil { var ret string return ret } @@ -281,6 +283,15 @@ func (o *FormatTest) GetByte() string { return o.Byte } +// GetByteOk returns a tuple with the Byte field value +// and a boolean to check if the value has been set. +func (o *FormatTest) GetByteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Byte, true +} + // SetByte sets field value func (o *FormatTest) SetByte(v string) { o.Byte = v @@ -295,14 +306,13 @@ func (o *FormatTest) GetBinary() *os.File { return *o.Binary } -// GetBinaryOk returns a tuple with the Binary field value if set, zero value otherwise +// GetBinaryOk returns a tuple with the Binary field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetBinaryOk() (*os.File, bool) { +func (o *FormatTest) GetBinaryOk() (**os.File, bool) { if o == nil || o.Binary == nil { - var ret *os.File - return ret, false + return nil, false } - return *o.Binary, true + return o.Binary, true } // HasBinary returns a boolean if a field has been set. @@ -321,7 +331,7 @@ func (o *FormatTest) SetBinary(v *os.File) { // GetDate returns the Date field value func (o *FormatTest) GetDate() string { - if o == nil { + if o == nil { var ret string return ret } @@ -329,6 +339,15 @@ func (o *FormatTest) GetDate() string { return o.Date } +// GetDateOk returns a tuple with the Date field value +// and a boolean to check if the value has been set. +func (o *FormatTest) GetDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Date, true +} + // SetDate sets field value func (o *FormatTest) SetDate(v string) { o.Date = v @@ -343,14 +362,13 @@ func (o *FormatTest) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetDateTimeOk() (time.Time, bool) { +func (o *FormatTest) GetDateTimeOk() (*time.Time, bool) { if o == nil || o.DateTime == nil { - var ret time.Time - return ret, false + return nil, false } - return *o.DateTime, true + return o.DateTime, true } // HasDateTime returns a boolean if a field has been set. @@ -376,14 +394,13 @@ func (o *FormatTest) GetUuid() string { return *o.Uuid } -// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetUuidOk() (string, bool) { +func (o *FormatTest) GetUuidOk() (*string, bool) { if o == nil || o.Uuid == nil { - var ret string - return ret, false + return nil, false } - return *o.Uuid, true + return o.Uuid, true } // HasUuid returns a boolean if a field has been set. @@ -402,7 +419,7 @@ func (o *FormatTest) SetUuid(v string) { // GetPassword returns the Password field value func (o *FormatTest) GetPassword() string { - if o == nil { + if o == nil { var ret string return ret } @@ -410,6 +427,15 @@ func (o *FormatTest) GetPassword() string { return o.Password } +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *FormatTest) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + // SetPassword sets field value func (o *FormatTest) SetPassword(v string) { o.Password = v @@ -424,14 +450,13 @@ func (o *FormatTest) GetPatternWithDigits() string { return *o.PatternWithDigits } -// GetPatternWithDigitsOk returns a tuple with the PatternWithDigits field value if set, zero value otherwise +// GetPatternWithDigitsOk returns a tuple with the PatternWithDigits field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetPatternWithDigitsOk() (string, bool) { +func (o *FormatTest) GetPatternWithDigitsOk() (*string, bool) { if o == nil || o.PatternWithDigits == nil { - var ret string - return ret, false + return nil, false } - return *o.PatternWithDigits, true + return o.PatternWithDigits, true } // HasPatternWithDigits returns a boolean if a field has been set. @@ -457,14 +482,13 @@ func (o *FormatTest) GetPatternWithDigitsAndDelimiter() string { return *o.PatternWithDigitsAndDelimiter } -// GetPatternWithDigitsAndDelimiterOk returns a tuple with the PatternWithDigitsAndDelimiter field value if set, zero value otherwise +// GetPatternWithDigitsAndDelimiterOk returns a tuple with the PatternWithDigitsAndDelimiter field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetPatternWithDigitsAndDelimiterOk() (string, bool) { +func (o *FormatTest) GetPatternWithDigitsAndDelimiterOk() (*string, bool) { if o == nil || o.PatternWithDigitsAndDelimiter == nil { - var ret string - return ret, false + return nil, false } - return *o.PatternWithDigitsAndDelimiter, true + return o.PatternWithDigitsAndDelimiter, true } // HasPatternWithDigitsAndDelimiter returns a boolean if a field has been set. @@ -481,25 +505,88 @@ func (o *FormatTest) SetPatternWithDigitsAndDelimiter(v string) { o.PatternWithDigitsAndDelimiter = &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 true { + 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 true { + toSerialize["byte"] = o.Byte + } + if o.Binary != nil { + toSerialize["binary"] = o.Binary + } + if true { + toSerialize["date"] = o.Date + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Uuid != nil { + toSerialize["uuid"] = o.Uuid + } + if true { + toSerialize["password"] = o.Password + } + if o.PatternWithDigits != nil { + toSerialize["pattern_with_digits"] = o.PatternWithDigits + } + if o.PatternWithDigitsAndDelimiter != nil { + toSerialize["pattern_with_digits_and_delimiter"] = o.PatternWithDigitsAndDelimiter + } + return json.Marshal(toSerialize) +} + type NullableFormatTest struct { - Value FormatTest - ExplicitNull bool + value *FormatTest + isSet bool +} + +func (v NullableFormatTest) Get() *FormatTest { + return v.value +} + +func (v *NullableFormatTest) Set(val *FormatTest) { + v.value = val + v.isSet = true +} + +func (v NullableFormatTest) IsSet() bool { + return v.isSet +} + +func (v *NullableFormatTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFormatTest(val *FormatTest) *NullableFormatTest { + return &NullableFormatTest{value: val, isSet: true} } func (v NullableFormatTest) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFormatTest) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go index b6d1dd64eee3..98d282bb39b3 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_has_only_read_only.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type HasOnlyReadOnly struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewHasOnlyReadOnly() *HasOnlyReadOnly { - this := HasOnlyReadOnly{} - return &this + this := HasOnlyReadOnly{} + return &this } // NewHasOnlyReadOnlyWithDefaults instantiates a new HasOnlyReadOnly object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewHasOnlyReadOnlyWithDefaults() *HasOnlyReadOnly { - this := HasOnlyReadOnly{} - return &this + this := HasOnlyReadOnly{} + return &this } // GetBar returns the Bar field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *HasOnlyReadOnly) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HasOnlyReadOnly) GetBarOk() (string, bool) { +func (o *HasOnlyReadOnly) GetBarOk() (*string, bool) { if o == nil || o.Bar == nil { - var ret string - return ret, false + return nil, false } - return *o.Bar, true + return o.Bar, true } // HasBar returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *HasOnlyReadOnly) GetFoo() string { return *o.Foo } -// GetFooOk returns a tuple with the Foo field value if set, zero value otherwise +// GetFooOk returns a tuple with the Foo field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HasOnlyReadOnly) GetFooOk() (string, bool) { +func (o *HasOnlyReadOnly) GetFooOk() (*string, bool) { if o == nil || o.Foo == nil { - var ret string - return ret, false + return nil, false } - return *o.Foo, true + return o.Foo, true } // HasFoo returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableHasOnlyReadOnly struct { - Value HasOnlyReadOnly - ExplicitNull bool + value *HasOnlyReadOnly + isSet bool +} + +func (v NullableHasOnlyReadOnly) Get() *HasOnlyReadOnly { + return v.value +} + +func (v *NullableHasOnlyReadOnly) Set(val *HasOnlyReadOnly) { + v.value = val + v.isSet = true +} + +func (v NullableHasOnlyReadOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableHasOnlyReadOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHasOnlyReadOnly(val *HasOnlyReadOnly) *NullableHasOnlyReadOnly { + return &NullableHasOnlyReadOnly{value: val, isSet: true} } func (v NullableHasOnlyReadOnly) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableHasOnlyReadOnly) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go index ec2f93760536..12719c684d3e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_health_check_result.go @@ -10,13 +10,12 @@ package petstore import ( - "bytes" "encoding/json" ) // HealthCheckResult Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. type HealthCheckResult struct { - NullableMessage *NullableString `json:"NullableMessage,omitempty"` + NullableMessage NullableString `json:"NullableMessage,omitempty"` } // NewHealthCheckResult instantiates a new HealthCheckResult object @@ -24,40 +23,40 @@ type HealthCheckResult struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewHealthCheckResult() *HealthCheckResult { - this := HealthCheckResult{} - return &this + this := HealthCheckResult{} + return &this } // NewHealthCheckResultWithDefaults instantiates a new HealthCheckResult object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewHealthCheckResultWithDefaults() *HealthCheckResult { - this := HealthCheckResult{} - return &this + this := HealthCheckResult{} + return &this } -// GetNullableMessage returns the NullableMessage field value if set, zero value otherwise. -func (o *HealthCheckResult) GetNullableMessage() NullableString { - if o == nil || o.NullableMessage == nil { - var ret NullableString +// GetNullableMessage returns the NullableMessage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HealthCheckResult) GetNullableMessage() string { + if o == nil || o.NullableMessage.Get() == nil { + var ret string return ret } - return *o.NullableMessage + return *o.NullableMessage.Get() } -// GetNullableMessageOk returns a tuple with the NullableMessage field value if set, zero value otherwise +// GetNullableMessageOk returns a tuple with the NullableMessage field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *HealthCheckResult) GetNullableMessageOk() (NullableString, bool) { - if o == nil || o.NullableMessage == nil { - var ret NullableString - return ret, false +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HealthCheckResult) GetNullableMessageOk() (*string, bool) { + if o == nil { + return nil, false } - return *o.NullableMessage, true + return o.NullableMessage.Get(), o.NullableMessage.IsSet() } // HasNullableMessage returns a boolean if a field has been set. func (o *HealthCheckResult) HasNullableMessage() bool { - if o != nil && o.NullableMessage != nil { + if o != nil && o.NullableMessage.IsSet() { return true } @@ -65,29 +64,59 @@ func (o *HealthCheckResult) HasNullableMessage() bool { } // SetNullableMessage gets a reference to the given NullableString and assigns it to the NullableMessage field. -func (o *HealthCheckResult) SetNullableMessage(v NullableString) { - o.NullableMessage = &v +func (o *HealthCheckResult) SetNullableMessage(v string) { + o.NullableMessage.Set(&v) +} +// SetNullableMessageNil sets the value for NullableMessage to be an explicit nil +func (o *HealthCheckResult) SetNullableMessageNil() { + o.NullableMessage.Set(nil) +} + +// UnsetNullableMessage ensures that no value is present for NullableMessage, not even an explicit nil +func (o *HealthCheckResult) UnsetNullableMessage() { + o.NullableMessage.Unset() +} + +func (o HealthCheckResult) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.NullableMessage.IsSet() { + toSerialize["NullableMessage"] = o.NullableMessage.Get() + } + return json.Marshal(toSerialize) } type NullableHealthCheckResult struct { - Value HealthCheckResult - ExplicitNull bool + value *HealthCheckResult + isSet bool +} + +func (v NullableHealthCheckResult) Get() *HealthCheckResult { + return v.value +} + +func (v *NullableHealthCheckResult) Set(val *HealthCheckResult) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckResult) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckResult(val *HealthCheckResult) *NullableHealthCheckResult { + return &NullableHealthCheckResult{value: val, isSet: true} } func (v NullableHealthCheckResult) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableHealthCheckResult) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go index 5606db36cc5f..0ae09b0d7462 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -27,16 +26,16 @@ type InlineObject struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewInlineObject() *InlineObject { - this := InlineObject{} - return &this + this := InlineObject{} + return &this } // NewInlineObjectWithDefaults instantiates a new InlineObject object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewInlineObjectWithDefaults() *InlineObject { - this := InlineObject{} - return &this + this := InlineObject{} + return &this } // GetName returns the Name field value if set, zero value otherwise. @@ -48,14 +47,13 @@ func (o *InlineObject) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject) GetNameOk() (string, bool) { +func (o *InlineObject) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -81,14 +79,13 @@ func (o *InlineObject) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject) GetStatusOk() (string, bool) { +func (o *InlineObject) GetStatusOk() (*string, bool) { if o == nil || o.Status == nil { - var ret string - return ret, false + return nil, false } - return *o.Status, true + return o.Status, true } // HasStatus returns a boolean if a field has been set. @@ -105,25 +102,49 @@ func (o *InlineObject) SetStatus(v string) { o.Status = &v } +func (o InlineObject) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + type NullableInlineObject struct { - Value InlineObject - ExplicitNull bool + value *InlineObject + isSet bool +} + +func (v NullableInlineObject) Get() *InlineObject { + return v.value +} + +func (v *NullableInlineObject) Set(val *InlineObject) { + v.value = val + v.isSet = true +} + +func (v NullableInlineObject) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineObject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineObject(val *InlineObject) *NullableInlineObject { + return &NullableInlineObject{value: val, isSet: true} } func (v NullableInlineObject) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInlineObject) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go index e7651a59b7b9..13a07bceee0a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_1.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "os" ) @@ -28,16 +27,16 @@ type InlineObject1 struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewInlineObject1() *InlineObject1 { - this := InlineObject1{} - return &this + this := InlineObject1{} + return &this } // NewInlineObject1WithDefaults instantiates a new InlineObject1 object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewInlineObject1WithDefaults() *InlineObject1 { - this := InlineObject1{} - return &this + this := InlineObject1{} + return &this } // GetAdditionalMetadata returns the AdditionalMetadata field value if set, zero value otherwise. @@ -49,14 +48,13 @@ func (o *InlineObject1) GetAdditionalMetadata() string { return *o.AdditionalMetadata } -// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field value if set, zero value otherwise +// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject1) GetAdditionalMetadataOk() (string, bool) { +func (o *InlineObject1) GetAdditionalMetadataOk() (*string, bool) { if o == nil || o.AdditionalMetadata == nil { - var ret string - return ret, false + return nil, false } - return *o.AdditionalMetadata, true + return o.AdditionalMetadata, true } // HasAdditionalMetadata returns a boolean if a field has been set. @@ -82,14 +80,13 @@ func (o *InlineObject1) GetFile() *os.File { return *o.File } -// GetFileOk returns a tuple with the File field value if set, zero value otherwise +// GetFileOk returns a tuple with the File field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject1) GetFileOk() (*os.File, bool) { +func (o *InlineObject1) GetFileOk() (**os.File, bool) { if o == nil || o.File == nil { - var ret *os.File - return ret, false + return nil, false } - return *o.File, true + return o.File, true } // HasFile returns a boolean if a field has been set. @@ -106,25 +103,49 @@ func (o *InlineObject1) SetFile(v *os.File) { o.File = &v } +func (o InlineObject1) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AdditionalMetadata != nil { + toSerialize["additionalMetadata"] = o.AdditionalMetadata + } + if o.File != nil { + toSerialize["file"] = o.File + } + return json.Marshal(toSerialize) +} + type NullableInlineObject1 struct { - Value InlineObject1 - ExplicitNull bool + value *InlineObject1 + isSet bool +} + +func (v NullableInlineObject1) Get() *InlineObject1 { + return v.value +} + +func (v *NullableInlineObject1) Set(val *InlineObject1) { + v.value = val + v.isSet = true +} + +func (v NullableInlineObject1) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineObject1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineObject1(val *InlineObject1) *NullableInlineObject1 { + return &NullableInlineObject1{value: val, isSet: true} } func (v NullableInlineObject1) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInlineObject1) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go index 3e667da5f072..fc33d433a883 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_2.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -27,20 +26,20 @@ type InlineObject2 struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewInlineObject2() *InlineObject2 { - this := InlineObject2{} - var enumFormString string = "-efg" - this.EnumFormString = &enumFormString - return &this + this := InlineObject2{} + var enumFormString string = "-efg" + this.EnumFormString = &enumFormString + return &this } // NewInlineObject2WithDefaults instantiates a new InlineObject2 object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewInlineObject2WithDefaults() *InlineObject2 { - this := InlineObject2{} - var enumFormString string = "-efg" - this.EnumFormString = &enumFormString - return &this + this := InlineObject2{} + var enumFormString string = "-efg" + this.EnumFormString = &enumFormString + return &this } // GetEnumFormStringArray returns the EnumFormStringArray field value if set, zero value otherwise. @@ -52,14 +51,13 @@ func (o *InlineObject2) GetEnumFormStringArray() []string { return *o.EnumFormStringArray } -// GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field value if set, zero value otherwise +// GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject2) GetEnumFormStringArrayOk() ([]string, bool) { +func (o *InlineObject2) GetEnumFormStringArrayOk() (*[]string, bool) { if o == nil || o.EnumFormStringArray == nil { - var ret []string - return ret, false + return nil, false } - return *o.EnumFormStringArray, true + return o.EnumFormStringArray, true } // HasEnumFormStringArray returns a boolean if a field has been set. @@ -85,14 +83,13 @@ func (o *InlineObject2) GetEnumFormString() string { return *o.EnumFormString } -// GetEnumFormStringOk returns a tuple with the EnumFormString field value if set, zero value otherwise +// GetEnumFormStringOk returns a tuple with the EnumFormString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject2) GetEnumFormStringOk() (string, bool) { +func (o *InlineObject2) GetEnumFormStringOk() (*string, bool) { if o == nil || o.EnumFormString == nil { - var ret string - return ret, false + return nil, false } - return *o.EnumFormString, true + return o.EnumFormString, true } // HasEnumFormString returns a boolean if a field has been set. @@ -109,25 +106,49 @@ func (o *InlineObject2) SetEnumFormString(v string) { o.EnumFormString = &v } +func (o InlineObject2) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.EnumFormStringArray != nil { + toSerialize["enum_form_string_array"] = o.EnumFormStringArray + } + if o.EnumFormString != nil { + toSerialize["enum_form_string"] = o.EnumFormString + } + return json.Marshal(toSerialize) +} + type NullableInlineObject2 struct { - Value InlineObject2 - ExplicitNull bool + value *InlineObject2 + isSet bool +} + +func (v NullableInlineObject2) Get() *InlineObject2 { + return v.value +} + +func (v *NullableInlineObject2) Set(val *InlineObject2) { + v.value = val + v.isSet = true +} + +func (v NullableInlineObject2) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineObject2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineObject2(val *InlineObject2) *NullableInlineObject2 { + return &NullableInlineObject2{value: val, isSet: true} } func (v NullableInlineObject2) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInlineObject2) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go index fef3dacc8525..3e7990cdeeaa 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_3.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "os" "time" @@ -53,20 +52,20 @@ type InlineObject3 struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string, ) *InlineObject3 { - this := InlineObject3{} - this.Number = number - this.Double = double - this.PatternWithoutDelimiter = patternWithoutDelimiter - this.Byte = byte_ - return &this + this := InlineObject3{} + this.Number = number + this.Double = double + this.PatternWithoutDelimiter = patternWithoutDelimiter + this.Byte = byte_ + return &this } // NewInlineObject3WithDefaults instantiates a new InlineObject3 object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewInlineObject3WithDefaults() *InlineObject3 { - this := InlineObject3{} - return &this + this := InlineObject3{} + return &this } // GetInteger returns the Integer field value if set, zero value otherwise. @@ -78,14 +77,13 @@ func (o *InlineObject3) GetInteger() int32 { return *o.Integer } -// GetIntegerOk returns a tuple with the Integer field value if set, zero value otherwise +// GetIntegerOk returns a tuple with the Integer field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetIntegerOk() (int32, bool) { +func (o *InlineObject3) GetIntegerOk() (*int32, bool) { if o == nil || o.Integer == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Integer, true + return o.Integer, true } // HasInteger returns a boolean if a field has been set. @@ -111,14 +109,13 @@ func (o *InlineObject3) GetInt32() int32 { return *o.Int32 } -// GetInt32Ok returns a tuple with the Int32 field value if set, zero value otherwise +// GetInt32Ok returns a tuple with the Int32 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetInt32Ok() (int32, bool) { +func (o *InlineObject3) GetInt32Ok() (*int32, bool) { if o == nil || o.Int32 == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Int32, true + return o.Int32, true } // HasInt32 returns a boolean if a field has been set. @@ -144,14 +141,13 @@ func (o *InlineObject3) GetInt64() int64 { return *o.Int64 } -// GetInt64Ok returns a tuple with the Int64 field value if set, zero value otherwise +// GetInt64Ok returns a tuple with the Int64 field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetInt64Ok() (int64, bool) { +func (o *InlineObject3) GetInt64Ok() (*int64, bool) { if o == nil || o.Int64 == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Int64, true + return o.Int64, true } // HasInt64 returns a boolean if a field has been set. @@ -170,7 +166,7 @@ func (o *InlineObject3) SetInt64(v int64) { // GetNumber returns the Number field value func (o *InlineObject3) GetNumber() float32 { - if o == nil { + if o == nil { var ret float32 return ret } @@ -178,6 +174,15 @@ func (o *InlineObject3) GetNumber() float32 { return o.Number } +// GetNumberOk returns a tuple with the Number field value +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetNumberOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Number, true +} + // SetNumber sets field value func (o *InlineObject3) SetNumber(v float32) { o.Number = v @@ -192,14 +197,13 @@ func (o *InlineObject3) GetFloat() float32 { return *o.Float } -// GetFloatOk returns a tuple with the Float field value if set, zero value otherwise +// GetFloatOk returns a tuple with the Float field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetFloatOk() (float32, bool) { +func (o *InlineObject3) GetFloatOk() (*float32, bool) { if o == nil || o.Float == nil { - var ret float32 - return ret, false + return nil, false } - return *o.Float, true + return o.Float, true } // HasFloat returns a boolean if a field has been set. @@ -218,7 +222,7 @@ func (o *InlineObject3) SetFloat(v float32) { // GetDouble returns the Double field value func (o *InlineObject3) GetDouble() float64 { - if o == nil { + if o == nil { var ret float64 return ret } @@ -226,6 +230,15 @@ func (o *InlineObject3) GetDouble() float64 { return o.Double } +// GetDoubleOk returns a tuple with the Double field value +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetDoubleOk() (*float64, bool) { + if o == nil { + return nil, false + } + return &o.Double, true +} + // SetDouble sets field value func (o *InlineObject3) SetDouble(v float64) { o.Double = v @@ -240,14 +253,13 @@ func (o *InlineObject3) GetString() string { return *o.String } -// GetStringOk returns a tuple with the String field value if set, zero value otherwise +// GetStringOk returns a tuple with the String field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetStringOk() (string, bool) { +func (o *InlineObject3) GetStringOk() (*string, bool) { if o == nil || o.String == nil { - var ret string - return ret, false + return nil, false } - return *o.String, true + return o.String, true } // HasString returns a boolean if a field has been set. @@ -266,7 +278,7 @@ func (o *InlineObject3) SetString(v string) { // GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field value func (o *InlineObject3) GetPatternWithoutDelimiter() string { - if o == nil { + if o == nil { var ret string return ret } @@ -274,6 +286,15 @@ func (o *InlineObject3) GetPatternWithoutDelimiter() string { return o.PatternWithoutDelimiter } +// GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field value +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetPatternWithoutDelimiterOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PatternWithoutDelimiter, true +} + // SetPatternWithoutDelimiter sets field value func (o *InlineObject3) SetPatternWithoutDelimiter(v string) { o.PatternWithoutDelimiter = v @@ -281,7 +302,7 @@ func (o *InlineObject3) SetPatternWithoutDelimiter(v string) { // GetByte returns the Byte field value func (o *InlineObject3) GetByte() string { - if o == nil { + if o == nil { var ret string return ret } @@ -289,6 +310,15 @@ func (o *InlineObject3) GetByte() string { return o.Byte } +// GetByteOk returns a tuple with the Byte field value +// and a boolean to check if the value has been set. +func (o *InlineObject3) GetByteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Byte, true +} + // SetByte sets field value func (o *InlineObject3) SetByte(v string) { o.Byte = v @@ -303,14 +333,13 @@ func (o *InlineObject3) GetBinary() *os.File { return *o.Binary } -// GetBinaryOk returns a tuple with the Binary field value if set, zero value otherwise +// GetBinaryOk returns a tuple with the Binary field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetBinaryOk() (*os.File, bool) { +func (o *InlineObject3) GetBinaryOk() (**os.File, bool) { if o == nil || o.Binary == nil { - var ret *os.File - return ret, false + return nil, false } - return *o.Binary, true + return o.Binary, true } // HasBinary returns a boolean if a field has been set. @@ -336,14 +365,13 @@ func (o *InlineObject3) GetDate() string { return *o.Date } -// GetDateOk returns a tuple with the Date field value if set, zero value otherwise +// GetDateOk returns a tuple with the Date field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetDateOk() (string, bool) { +func (o *InlineObject3) GetDateOk() (*string, bool) { if o == nil || o.Date == nil { - var ret string - return ret, false + return nil, false } - return *o.Date, true + return o.Date, true } // HasDate returns a boolean if a field has been set. @@ -369,14 +397,13 @@ func (o *InlineObject3) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetDateTimeOk() (time.Time, bool) { +func (o *InlineObject3) GetDateTimeOk() (*time.Time, bool) { if o == nil || o.DateTime == nil { - var ret time.Time - return ret, false + return nil, false } - return *o.DateTime, true + return o.DateTime, true } // HasDateTime returns a boolean if a field has been set. @@ -402,14 +429,13 @@ func (o *InlineObject3) GetPassword() string { return *o.Password } -// GetPasswordOk returns a tuple with the Password field value if set, zero value otherwise +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetPasswordOk() (string, bool) { +func (o *InlineObject3) GetPasswordOk() (*string, bool) { if o == nil || o.Password == nil { - var ret string - return ret, false + return nil, false } - return *o.Password, true + return o.Password, true } // HasPassword returns a boolean if a field has been set. @@ -435,14 +461,13 @@ func (o *InlineObject3) GetCallback() string { return *o.Callback } -// GetCallbackOk returns a tuple with the Callback field value if set, zero value otherwise +// GetCallbackOk returns a tuple with the Callback field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject3) GetCallbackOk() (string, bool) { +func (o *InlineObject3) GetCallbackOk() (*string, bool) { if o == nil || o.Callback == nil { - var ret string - return ret, false + return nil, false } - return *o.Callback, true + return o.Callback, true } // HasCallback returns a boolean if a field has been set. @@ -459,25 +484,85 @@ func (o *InlineObject3) SetCallback(v string) { o.Callback = &v } +func (o InlineObject3) 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 true { + toSerialize["number"] = o.Number + } + if o.Float != nil { + toSerialize["float"] = o.Float + } + if true { + toSerialize["double"] = o.Double + } + if o.String != nil { + toSerialize["string"] = o.String + } + if true { + toSerialize["pattern_without_delimiter"] = o.PatternWithoutDelimiter + } + if true { + toSerialize["byte"] = o.Byte + } + if o.Binary != nil { + toSerialize["binary"] = o.Binary + } + if o.Date != nil { + toSerialize["date"] = o.Date + } + if o.DateTime != nil { + toSerialize["dateTime"] = o.DateTime + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + if o.Callback != nil { + toSerialize["callback"] = o.Callback + } + return json.Marshal(toSerialize) +} + type NullableInlineObject3 struct { - Value InlineObject3 - ExplicitNull bool + value *InlineObject3 + isSet bool +} + +func (v NullableInlineObject3) Get() *InlineObject3 { + return v.value +} + +func (v *NullableInlineObject3) Set(val *InlineObject3) { + v.value = val + v.isSet = true +} + +func (v NullableInlineObject3) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineObject3) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineObject3(val *InlineObject3) *NullableInlineObject3 { + return &NullableInlineObject3{value: val, isSet: true} } func (v NullableInlineObject3) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInlineObject3) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go index 0f98842c8fb5..646fa87e3755 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_4.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -27,23 +26,23 @@ type InlineObject4 struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewInlineObject4(param string, param2 string, ) *InlineObject4 { - this := InlineObject4{} - this.Param = param - this.Param2 = param2 - return &this + this := InlineObject4{} + this.Param = param + this.Param2 = param2 + return &this } // NewInlineObject4WithDefaults instantiates a new InlineObject4 object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewInlineObject4WithDefaults() *InlineObject4 { - this := InlineObject4{} - return &this + this := InlineObject4{} + return &this } // GetParam returns the Param field value func (o *InlineObject4) GetParam() string { - if o == nil { + if o == nil { var ret string return ret } @@ -51,6 +50,15 @@ func (o *InlineObject4) GetParam() string { return o.Param } +// GetParamOk returns a tuple with the Param field value +// and a boolean to check if the value has been set. +func (o *InlineObject4) GetParamOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Param, true +} + // SetParam sets field value func (o *InlineObject4) SetParam(v string) { o.Param = v @@ -58,7 +66,7 @@ func (o *InlineObject4) SetParam(v string) { // GetParam2 returns the Param2 field value func (o *InlineObject4) GetParam2() string { - if o == nil { + if o == nil { var ret string return ret } @@ -66,30 +74,63 @@ func (o *InlineObject4) GetParam2() string { return o.Param2 } +// GetParam2Ok returns a tuple with the Param2 field value +// and a boolean to check if the value has been set. +func (o *InlineObject4) GetParam2Ok() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Param2, true +} + // SetParam2 sets field value func (o *InlineObject4) SetParam2(v string) { o.Param2 = v } +func (o InlineObject4) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["param"] = o.Param + } + if true { + toSerialize["param2"] = o.Param2 + } + return json.Marshal(toSerialize) +} + type NullableInlineObject4 struct { - Value InlineObject4 - ExplicitNull bool + value *InlineObject4 + isSet bool +} + +func (v NullableInlineObject4) Get() *InlineObject4 { + return v.value +} + +func (v *NullableInlineObject4) Set(val *InlineObject4) { + v.value = val + v.isSet = true +} + +func (v NullableInlineObject4) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineObject4) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineObject4(val *InlineObject4) *NullableInlineObject4 { + return &NullableInlineObject4{value: val, isSet: true} } func (v NullableInlineObject4) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInlineObject4) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go index b623f4cda9e3..d565e10a4341 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_object_5.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "os" ) @@ -28,17 +27,17 @@ type InlineObject5 struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewInlineObject5(requiredFile *os.File, ) *InlineObject5 { - this := InlineObject5{} - this.RequiredFile = requiredFile - return &this + this := InlineObject5{} + this.RequiredFile = requiredFile + return &this } // NewInlineObject5WithDefaults instantiates a new InlineObject5 object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewInlineObject5WithDefaults() *InlineObject5 { - this := InlineObject5{} - return &this + this := InlineObject5{} + return &this } // GetAdditionalMetadata returns the AdditionalMetadata field value if set, zero value otherwise. @@ -50,14 +49,13 @@ func (o *InlineObject5) GetAdditionalMetadata() string { return *o.AdditionalMetadata } -// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field value if set, zero value otherwise +// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineObject5) GetAdditionalMetadataOk() (string, bool) { +func (o *InlineObject5) GetAdditionalMetadataOk() (*string, bool) { if o == nil || o.AdditionalMetadata == nil { - var ret string - return ret, false + return nil, false } - return *o.AdditionalMetadata, true + return o.AdditionalMetadata, true } // HasAdditionalMetadata returns a boolean if a field has been set. @@ -76,7 +74,7 @@ func (o *InlineObject5) SetAdditionalMetadata(v string) { // GetRequiredFile returns the RequiredFile field value func (o *InlineObject5) GetRequiredFile() *os.File { - if o == nil { + if o == nil { var ret *os.File return ret } @@ -84,30 +82,63 @@ func (o *InlineObject5) GetRequiredFile() *os.File { return o.RequiredFile } +// GetRequiredFileOk returns a tuple with the RequiredFile field value +// and a boolean to check if the value has been set. +func (o *InlineObject5) GetRequiredFileOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.RequiredFile, true +} + // SetRequiredFile sets field value func (o *InlineObject5) SetRequiredFile(v *os.File) { o.RequiredFile = v } +func (o InlineObject5) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AdditionalMetadata != nil { + toSerialize["additionalMetadata"] = o.AdditionalMetadata + } + if true { + toSerialize["requiredFile"] = o.RequiredFile + } + return json.Marshal(toSerialize) +} + type NullableInlineObject5 struct { - Value InlineObject5 - ExplicitNull bool + value *InlineObject5 + isSet bool +} + +func (v NullableInlineObject5) Get() *InlineObject5 { + return v.value +} + +func (v *NullableInlineObject5) Set(val *InlineObject5) { + v.value = val + v.isSet = true +} + +func (v NullableInlineObject5) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineObject5) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineObject5(val *InlineObject5) *NullableInlineObject5 { + return &NullableInlineObject5{value: val, isSet: true} } func (v NullableInlineObject5) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInlineObject5) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go index 9134406f6cfe..619830ddc35e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_inline_response_default.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type InlineResponseDefault struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewInlineResponseDefault() *InlineResponseDefault { - this := InlineResponseDefault{} - return &this + this := InlineResponseDefault{} + return &this } // NewInlineResponseDefaultWithDefaults instantiates a new InlineResponseDefault object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewInlineResponseDefaultWithDefaults() *InlineResponseDefault { - this := InlineResponseDefault{} - return &this + this := InlineResponseDefault{} + return &this } // GetString returns the String field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *InlineResponseDefault) GetString() Foo { return *o.String } -// GetStringOk returns a tuple with the String field value if set, zero value otherwise +// GetStringOk returns a tuple with the String field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InlineResponseDefault) GetStringOk() (Foo, bool) { +func (o *InlineResponseDefault) GetStringOk() (*Foo, bool) { if o == nil || o.String == nil { - var ret Foo - return ret, false + return nil, false } - return *o.String, true + return o.String, true } // HasString returns a boolean if a field has been set. @@ -69,25 +67,46 @@ func (o *InlineResponseDefault) SetString(v Foo) { o.String = &v } +func (o InlineResponseDefault) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.String != nil { + toSerialize["string"] = o.String + } + return json.Marshal(toSerialize) +} + type NullableInlineResponseDefault struct { - Value InlineResponseDefault - ExplicitNull bool + value *InlineResponseDefault + isSet bool +} + +func (v NullableInlineResponseDefault) Get() *InlineResponseDefault { + return v.value +} + +func (v *NullableInlineResponseDefault) Set(val *InlineResponseDefault) { + v.value = val + v.isSet = true +} + +func (v NullableInlineResponseDefault) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineResponseDefault) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineResponseDefault(val *InlineResponseDefault) *NullableInlineResponseDefault { + return &NullableInlineResponseDefault{value: val, isSet: true} } func (v NullableInlineResponseDefault) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInlineResponseDefault) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go index 228c9d61fba2..de655731a9b6 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_list.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type List struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewList() *List { - this := List{} - return &this + this := List{} + return &this } // NewListWithDefaults instantiates a new List object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewListWithDefaults() *List { - this := List{} - return &this + this := List{} + return &this } // GetVar123List returns the Var123List field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *List) GetVar123List() string { return *o.Var123List } -// GetVar123ListOk returns a tuple with the Var123List field value if set, zero value otherwise +// GetVar123ListOk returns a tuple with the Var123List field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *List) GetVar123ListOk() (string, bool) { +func (o *List) GetVar123ListOk() (*string, bool) { if o == nil || o.Var123List == nil { - var ret string - return ret, false + return nil, false } - return *o.Var123List, true + return o.Var123List, true } // HasVar123List returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableList struct { - Value List - ExplicitNull bool + value *List + isSet bool +} + +func (v NullableList) Get() *List { + return v.value +} + +func (v *NullableList) Set(val *List) { + v.value = val + v.isSet = true +} + +func (v NullableList) IsSet() bool { + return v.isSet +} + +func (v *NullableList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableList(val *List) *NullableList { + return &NullableList{value: val, isSet: true} } func (v NullableList) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableList) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go index e78ae4bf9b8f..5a1d29671cb8 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_map_test_.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -27,16 +26,16 @@ type MapTest struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewMapTest() *MapTest { - this := MapTest{} - return &this + this := MapTest{} + return &this } // NewMapTestWithDefaults instantiates a new MapTest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewMapTestWithDefaults() *MapTest { - this := MapTest{} - return &this + this := MapTest{} + return &this } // GetMapMapOfString returns the MapMapOfString field value if set, zero value otherwise. @@ -48,14 +47,13 @@ func (o *MapTest) GetMapMapOfString() map[string]map[string]string { return *o.MapMapOfString } -// GetMapMapOfStringOk returns a tuple with the MapMapOfString field value if set, zero value otherwise +// GetMapMapOfStringOk returns a tuple with the MapMapOfString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapTest) GetMapMapOfStringOk() (map[string]map[string]string, bool) { +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 nil, false } - return *o.MapMapOfString, true + return o.MapMapOfString, true } // HasMapMapOfString returns a boolean if a field has been set. @@ -81,14 +79,13 @@ func (o *MapTest) GetMapOfEnumString() map[string]string { return *o.MapOfEnumString } -// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field value if set, zero value otherwise +// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapTest) GetMapOfEnumStringOk() (map[string]string, bool) { +func (o *MapTest) GetMapOfEnumStringOk() (*map[string]string, bool) { if o == nil || o.MapOfEnumString == nil { - var ret map[string]string - return ret, false + return nil, false } - return *o.MapOfEnumString, true + return o.MapOfEnumString, true } // HasMapOfEnumString returns a boolean if a field has been set. @@ -114,14 +111,13 @@ func (o *MapTest) GetDirectMap() map[string]bool { return *o.DirectMap } -// GetDirectMapOk returns a tuple with the DirectMap field value if set, zero value otherwise +// GetDirectMapOk returns a tuple with the DirectMap field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapTest) GetDirectMapOk() (map[string]bool, bool) { +func (o *MapTest) GetDirectMapOk() (*map[string]bool, bool) { if o == nil || o.DirectMap == nil { - var ret map[string]bool - return ret, false + return nil, false } - return *o.DirectMap, true + return o.DirectMap, true } // HasDirectMap returns a boolean if a field has been set. @@ -147,14 +143,13 @@ func (o *MapTest) GetIndirectMap() map[string]bool { return *o.IndirectMap } -// GetIndirectMapOk returns a tuple with the IndirectMap field value if set, zero value otherwise +// GetIndirectMapOk returns a tuple with the IndirectMap field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapTest) GetIndirectMapOk() (map[string]bool, bool) { +func (o *MapTest) GetIndirectMapOk() (*map[string]bool, bool) { if o == nil || o.IndirectMap == nil { - var ret map[string]bool - return ret, false + return nil, false } - return *o.IndirectMap, true + return o.IndirectMap, true } // HasIndirectMap returns a boolean if a field has been set. @@ -171,25 +166,55 @@ 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) +} + type NullableMapTest struct { - Value MapTest - ExplicitNull bool + value *MapTest + isSet bool +} + +func (v NullableMapTest) Get() *MapTest { + return v.value +} + +func (v *NullableMapTest) Set(val *MapTest) { + v.value = val + v.isSet = true +} + +func (v NullableMapTest) IsSet() bool { + return v.isSet +} + +func (v *NullableMapTest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMapTest(val *MapTest) *NullableMapTest { + return &NullableMapTest{value: val, isSet: true} } func (v NullableMapTest) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableMapTest) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go index 95a311b65435..355bcab85031 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "time" ) @@ -27,16 +26,16 @@ type MixedPropertiesAndAdditionalPropertiesClass struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewMixedPropertiesAndAdditionalPropertiesClass() *MixedPropertiesAndAdditionalPropertiesClass { - this := MixedPropertiesAndAdditionalPropertiesClass{} - return &this + this := MixedPropertiesAndAdditionalPropertiesClass{} + return &this } // NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults instantiates a new MixedPropertiesAndAdditionalPropertiesClass object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults() *MixedPropertiesAndAdditionalPropertiesClass { - this := MixedPropertiesAndAdditionalPropertiesClass{} - return &this + this := MixedPropertiesAndAdditionalPropertiesClass{} + return &this } // GetUuid returns the Uuid field value if set, zero value otherwise. @@ -48,14 +47,13 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { return *o.Uuid } -// GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (string, bool) { +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuidOk() (*string, bool) { if o == nil || o.Uuid == nil { - var ret string - return ret, false + return nil, false } - return *o.Uuid, true + return o.Uuid, true } // HasUuid returns a boolean if a field has been set. @@ -81,14 +79,13 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { return *o.DateTime } -// GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise +// GetDateTimeOk returns a tuple with the DateTime field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (time.Time, bool) { +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTimeOk() (*time.Time, bool) { if o == nil || o.DateTime == nil { - var ret time.Time - return ret, false + return nil, false } - return *o.DateTime, true + return o.DateTime, true } // HasDateTime returns a boolean if a field has been set. @@ -114,14 +111,13 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal return *o.Map } -// GetMapOk returns a tuple with the Map field value if set, zero value otherwise +// GetMapOk returns a tuple with the Map field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (map[string]Animal, bool) { +func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMapOk() (*map[string]Animal, bool) { if o == nil || o.Map == nil { - var ret map[string]Animal - return ret, false + return nil, false } - return *o.Map, true + return o.Map, true } // HasMap returns a boolean if a field has been set. @@ -138,25 +134,52 @@ 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) +} + type NullableMixedPropertiesAndAdditionalPropertiesClass struct { - Value MixedPropertiesAndAdditionalPropertiesClass - ExplicitNull bool + value *MixedPropertiesAndAdditionalPropertiesClass + isSet bool +} + +func (v NullableMixedPropertiesAndAdditionalPropertiesClass) Get() *MixedPropertiesAndAdditionalPropertiesClass { + return v.value +} + +func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) Set(val *MixedPropertiesAndAdditionalPropertiesClass) { + v.value = val + v.isSet = true +} + +func (v NullableMixedPropertiesAndAdditionalPropertiesClass) IsSet() bool { + return v.isSet +} + +func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMixedPropertiesAndAdditionalPropertiesClass(val *MixedPropertiesAndAdditionalPropertiesClass) *NullableMixedPropertiesAndAdditionalPropertiesClass { + return &NullableMixedPropertiesAndAdditionalPropertiesClass{value: val, isSet: true} } func (v NullableMixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableMixedPropertiesAndAdditionalPropertiesClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go index c205987518cc..39cf81c6a4d0 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_name.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -27,22 +26,22 @@ type Name struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewName(name int32, ) *Name { - this := Name{} - this.Name = name - return &this + this := Name{} + this.Name = name + return &this } // NewNameWithDefaults instantiates a new Name object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewNameWithDefaults() *Name { - this := Name{} - return &this + this := Name{} + return &this } // GetName returns the Name field value func (o *Name) GetName() int32 { - if o == nil { + if o == nil { var ret int32 return ret } @@ -50,6 +49,15 @@ func (o *Name) GetName() int32 { return o.Name } +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Name) GetNameOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + // SetName sets field value func (o *Name) SetName(v int32) { o.Name = v @@ -64,14 +72,13 @@ func (o *Name) GetSnakeCase() int32 { return *o.SnakeCase } -// GetSnakeCaseOk returns a tuple with the SnakeCase field value if set, zero value otherwise +// GetSnakeCaseOk returns a tuple with the SnakeCase field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Name) GetSnakeCaseOk() (int32, bool) { +func (o *Name) GetSnakeCaseOk() (*int32, bool) { if o == nil || o.SnakeCase == nil { - var ret int32 - return ret, false + return nil, false } - return *o.SnakeCase, true + return o.SnakeCase, true } // HasSnakeCase returns a boolean if a field has been set. @@ -97,14 +104,13 @@ func (o *Name) GetProperty() string { return *o.Property } -// GetPropertyOk returns a tuple with the Property field value if set, zero value otherwise +// GetPropertyOk returns a tuple with the Property field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Name) GetPropertyOk() (string, bool) { +func (o *Name) GetPropertyOk() (*string, bool) { if o == nil || o.Property == nil { - var ret string - return ret, false + return nil, false } - return *o.Property, true + return o.Property, true } // HasProperty returns a boolean if a field has been set. @@ -130,14 +136,13 @@ func (o *Name) GetVar123Number() int32 { return *o.Var123Number } -// GetVar123NumberOk returns a tuple with the Var123Number field value if set, zero value otherwise +// GetVar123NumberOk returns a tuple with the Var123Number field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Name) GetVar123NumberOk() (int32, bool) { +func (o *Name) GetVar123NumberOk() (*int32, bool) { if o == nil || o.Var123Number == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Var123Number, true + return o.Var123Number, true } // HasVar123Number returns a boolean if a field has been set. @@ -154,25 +159,55 @@ func (o *Name) SetVar123Number(v int32) { o.Var123Number = &v } +func (o Name) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + 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) +} + type NullableName struct { - Value Name - ExplicitNull bool + value *Name + isSet bool +} + +func (v NullableName) Get() *Name { + return v.value +} + +func (v *NullableName) Set(val *Name) { + v.value = val + v.isSet = true +} + +func (v NullableName) IsSet() bool { + return v.isSet +} + +func (v *NullableName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableName(val *Name) *NullableName { + return &NullableName{value: val, isSet: true} } func (v NullableName) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableName) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go index 41501edeb5e2..c9d8facc2a84 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_nullable_class.go @@ -10,23 +10,23 @@ package petstore import ( - "bytes" "encoding/json" + "time" ) // NullableClass struct for NullableClass type NullableClass struct { - IntegerProp *NullableInt32 `json:"integer_prop,omitempty"` - NumberProp *NullableFloat32 `json:"number_prop,omitempty"` - BooleanProp *NullableBool `json:"boolean_prop,omitempty"` - StringProp *NullableString `json:"string_prop,omitempty"` - DateProp *NullableString `json:"date_prop,omitempty"` - DatetimeProp *NullableTime `json:"datetime_prop,omitempty"` - ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"` - ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` + IntegerProp NullableInt32 `json:"integer_prop,omitempty"` + NumberProp NullableFloat32 `json:"number_prop,omitempty"` + BooleanProp NullableBool `json:"boolean_prop,omitempty"` + StringProp NullableString `json:"string_prop,omitempty"` + DateProp NullableString `json:"date_prop,omitempty"` + DatetimeProp NullableTime `json:"datetime_prop,omitempty"` + ArrayNullableProp []map[string]interface{} `json:"array_nullable_prop,omitempty"` + ArrayAndItemsNullableProp []map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` ArrayItemsNullable *[]map[string]interface{} `json:"array_items_nullable,omitempty"` - ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` - ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` + ObjectNullableProp map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` + ObjectAndItemsNullableProp map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` ObjectItemsNullable *map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` } @@ -35,40 +35,40 @@ type NullableClass struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewNullableClass() *NullableClass { - this := NullableClass{} - return &this + this := NullableClass{} + return &this } // NewNullableClassWithDefaults instantiates a new NullableClass object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewNullableClassWithDefaults() *NullableClass { - this := NullableClass{} - return &this + this := NullableClass{} + return &this } -// GetIntegerProp returns the IntegerProp field value if set, zero value otherwise. -func (o *NullableClass) GetIntegerProp() NullableInt32 { - if o == nil || o.IntegerProp == nil { - var ret NullableInt32 +// GetIntegerProp returns the IntegerProp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NullableClass) GetIntegerProp() int32 { + if o == nil || o.IntegerProp.Get() == nil { + var ret int32 return ret } - return *o.IntegerProp + return *o.IntegerProp.Get() } -// GetIntegerPropOk returns a tuple with the IntegerProp field value if set, zero value otherwise +// GetIntegerPropOk returns a tuple with the IntegerProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetIntegerPropOk() (NullableInt32, bool) { - if o == nil || o.IntegerProp == nil { - var ret NullableInt32 - return ret, false +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetIntegerPropOk() (*int32, bool) { + if o == nil { + return nil, false } - return *o.IntegerProp, true + return o.IntegerProp.Get(), o.IntegerProp.IsSet() } // HasIntegerProp returns a boolean if a field has been set. func (o *NullableClass) HasIntegerProp() bool { - if o != nil && o.IntegerProp != nil { + if o != nil && o.IntegerProp.IsSet() { return true } @@ -76,32 +76,41 @@ func (o *NullableClass) HasIntegerProp() bool { } // SetIntegerProp gets a reference to the given NullableInt32 and assigns it to the IntegerProp field. -func (o *NullableClass) SetIntegerProp(v NullableInt32) { - o.IntegerProp = &v +func (o *NullableClass) SetIntegerProp(v int32) { + o.IntegerProp.Set(&v) +} +// SetIntegerPropNil sets the value for IntegerProp to be an explicit nil +func (o *NullableClass) SetIntegerPropNil() { + o.IntegerProp.Set(nil) +} + +// UnsetIntegerProp ensures that no value is present for IntegerProp, not even an explicit nil +func (o *NullableClass) UnsetIntegerProp() { + o.IntegerProp.Unset() } -// GetNumberProp returns the NumberProp field value if set, zero value otherwise. -func (o *NullableClass) GetNumberProp() NullableFloat32 { - if o == nil || o.NumberProp == nil { - var ret NullableFloat32 +// GetNumberProp returns the NumberProp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NullableClass) GetNumberProp() float32 { + if o == nil || o.NumberProp.Get() == nil { + var ret float32 return ret } - return *o.NumberProp + return *o.NumberProp.Get() } -// GetNumberPropOk returns a tuple with the NumberProp field value if set, zero value otherwise +// GetNumberPropOk returns a tuple with the NumberProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetNumberPropOk() (NullableFloat32, bool) { - if o == nil || o.NumberProp == nil { - var ret NullableFloat32 - return ret, false +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetNumberPropOk() (*float32, bool) { + if o == nil { + return nil, false } - return *o.NumberProp, true + return o.NumberProp.Get(), o.NumberProp.IsSet() } // HasNumberProp returns a boolean if a field has been set. func (o *NullableClass) HasNumberProp() bool { - if o != nil && o.NumberProp != nil { + if o != nil && o.NumberProp.IsSet() { return true } @@ -109,32 +118,41 @@ func (o *NullableClass) HasNumberProp() bool { } // SetNumberProp gets a reference to the given NullableFloat32 and assigns it to the NumberProp field. -func (o *NullableClass) SetNumberProp(v NullableFloat32) { - o.NumberProp = &v +func (o *NullableClass) SetNumberProp(v float32) { + o.NumberProp.Set(&v) +} +// SetNumberPropNil sets the value for NumberProp to be an explicit nil +func (o *NullableClass) SetNumberPropNil() { + o.NumberProp.Set(nil) } -// GetBooleanProp returns the BooleanProp field value if set, zero value otherwise. -func (o *NullableClass) GetBooleanProp() NullableBool { - if o == nil || o.BooleanProp == nil { - var ret NullableBool +// UnsetNumberProp ensures that no value is present for NumberProp, not even an explicit nil +func (o *NullableClass) UnsetNumberProp() { + o.NumberProp.Unset() +} + +// GetBooleanProp returns the BooleanProp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NullableClass) GetBooleanProp() bool { + if o == nil || o.BooleanProp.Get() == nil { + var ret bool return ret } - return *o.BooleanProp + return *o.BooleanProp.Get() } -// GetBooleanPropOk returns a tuple with the BooleanProp field value if set, zero value otherwise +// GetBooleanPropOk returns a tuple with the BooleanProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetBooleanPropOk() (NullableBool, bool) { - if o == nil || o.BooleanProp == nil { - var ret NullableBool - return ret, false +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetBooleanPropOk() (*bool, bool) { + if o == nil { + return nil, false } - return *o.BooleanProp, true + return o.BooleanProp.Get(), o.BooleanProp.IsSet() } // HasBooleanProp returns a boolean if a field has been set. func (o *NullableClass) HasBooleanProp() bool { - if o != nil && o.BooleanProp != nil { + if o != nil && o.BooleanProp.IsSet() { return true } @@ -142,32 +160,41 @@ func (o *NullableClass) HasBooleanProp() bool { } // SetBooleanProp gets a reference to the given NullableBool and assigns it to the BooleanProp field. -func (o *NullableClass) SetBooleanProp(v NullableBool) { - o.BooleanProp = &v +func (o *NullableClass) SetBooleanProp(v bool) { + o.BooleanProp.Set(&v) +} +// SetBooleanPropNil sets the value for BooleanProp to be an explicit nil +func (o *NullableClass) SetBooleanPropNil() { + o.BooleanProp.Set(nil) } -// GetStringProp returns the StringProp field value if set, zero value otherwise. -func (o *NullableClass) GetStringProp() NullableString { - if o == nil || o.StringProp == nil { - var ret NullableString +// UnsetBooleanProp ensures that no value is present for BooleanProp, not even an explicit nil +func (o *NullableClass) UnsetBooleanProp() { + o.BooleanProp.Unset() +} + +// GetStringProp returns the StringProp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NullableClass) GetStringProp() string { + if o == nil || o.StringProp.Get() == nil { + var ret string return ret } - return *o.StringProp + return *o.StringProp.Get() } -// GetStringPropOk returns a tuple with the StringProp field value if set, zero value otherwise +// GetStringPropOk returns a tuple with the StringProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetStringPropOk() (NullableString, bool) { - if o == nil || o.StringProp == nil { - var ret NullableString - return ret, false +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetStringPropOk() (*string, bool) { + if o == nil { + return nil, false } - return *o.StringProp, true + return o.StringProp.Get(), o.StringProp.IsSet() } // HasStringProp returns a boolean if a field has been set. func (o *NullableClass) HasStringProp() bool { - if o != nil && o.StringProp != nil { + if o != nil && o.StringProp.IsSet() { return true } @@ -175,32 +202,41 @@ func (o *NullableClass) HasStringProp() bool { } // SetStringProp gets a reference to the given NullableString and assigns it to the StringProp field. -func (o *NullableClass) SetStringProp(v NullableString) { - o.StringProp = &v +func (o *NullableClass) SetStringProp(v string) { + o.StringProp.Set(&v) +} +// SetStringPropNil sets the value for StringProp to be an explicit nil +func (o *NullableClass) SetStringPropNil() { + o.StringProp.Set(nil) } -// GetDateProp returns the DateProp field value if set, zero value otherwise. -func (o *NullableClass) GetDateProp() NullableString { - if o == nil || o.DateProp == nil { - var ret NullableString +// UnsetStringProp ensures that no value is present for StringProp, not even an explicit nil +func (o *NullableClass) UnsetStringProp() { + o.StringProp.Unset() +} + +// GetDateProp returns the DateProp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NullableClass) GetDateProp() string { + if o == nil || o.DateProp.Get() == nil { + var ret string return ret } - return *o.DateProp + return *o.DateProp.Get() } -// GetDatePropOk returns a tuple with the DateProp field value if set, zero value otherwise +// GetDatePropOk returns a tuple with the DateProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetDatePropOk() (NullableString, bool) { - if o == nil || o.DateProp == nil { - var ret NullableString - return ret, false +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetDatePropOk() (*string, bool) { + if o == nil { + return nil, false } - return *o.DateProp, true + return o.DateProp.Get(), o.DateProp.IsSet() } // HasDateProp returns a boolean if a field has been set. func (o *NullableClass) HasDateProp() bool { - if o != nil && o.DateProp != nil { + if o != nil && o.DateProp.IsSet() { return true } @@ -208,32 +244,41 @@ func (o *NullableClass) HasDateProp() bool { } // SetDateProp gets a reference to the given NullableString and assigns it to the DateProp field. -func (o *NullableClass) SetDateProp(v NullableString) { - o.DateProp = &v +func (o *NullableClass) SetDateProp(v string) { + o.DateProp.Set(&v) +} +// SetDatePropNil sets the value for DateProp to be an explicit nil +func (o *NullableClass) SetDatePropNil() { + o.DateProp.Set(nil) +} + +// UnsetDateProp ensures that no value is present for DateProp, not even an explicit nil +func (o *NullableClass) UnsetDateProp() { + o.DateProp.Unset() } -// GetDatetimeProp returns the DatetimeProp field value if set, zero value otherwise. -func (o *NullableClass) GetDatetimeProp() NullableTime { - if o == nil || o.DatetimeProp == nil { - var ret NullableTime +// GetDatetimeProp returns the DatetimeProp field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NullableClass) GetDatetimeProp() time.Time { + if o == nil || o.DatetimeProp.Get() == nil { + var ret time.Time return ret } - return *o.DatetimeProp + return *o.DatetimeProp.Get() } -// GetDatetimePropOk returns a tuple with the DatetimeProp field value if set, zero value otherwise +// GetDatetimePropOk returns a tuple with the DatetimeProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetDatetimePropOk() (NullableTime, bool) { - if o == nil || o.DatetimeProp == nil { - var ret NullableTime - return ret, false +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetDatetimePropOk() (*time.Time, bool) { + if o == nil { + return nil, false } - return *o.DatetimeProp, true + return o.DatetimeProp.Get(), o.DatetimeProp.IsSet() } // HasDatetimeProp returns a boolean if a field has been set. func (o *NullableClass) HasDatetimeProp() bool { - if o != nil && o.DatetimeProp != nil { + if o != nil && o.DatetimeProp.IsSet() { return true } @@ -241,27 +286,36 @@ func (o *NullableClass) HasDatetimeProp() bool { } // SetDatetimeProp gets a reference to the given NullableTime and assigns it to the DatetimeProp field. -func (o *NullableClass) SetDatetimeProp(v NullableTime) { - o.DatetimeProp = &v +func (o *NullableClass) SetDatetimeProp(v time.Time) { + o.DatetimeProp.Set(&v) +} +// SetDatetimePropNil sets the value for DatetimeProp to be an explicit nil +func (o *NullableClass) SetDatetimePropNil() { + o.DatetimeProp.Set(nil) +} + +// UnsetDatetimeProp ensures that no value is present for DatetimeProp, not even an explicit nil +func (o *NullableClass) UnsetDatetimeProp() { + o.DatetimeProp.Unset() } -// GetArrayNullableProp returns the ArrayNullableProp field value if set, zero value otherwise. +// GetArrayNullableProp returns the ArrayNullableProp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NullableClass) GetArrayNullableProp() []map[string]interface{} { - if o == nil || o.ArrayNullableProp == nil { + if o == nil { var ret []map[string]interface{} return ret } - return *o.ArrayNullableProp + return o.ArrayNullableProp } -// GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field value if set, zero value otherwise +// GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetArrayNullablePropOk() (*[]map[string]interface{}, bool) { if o == nil || o.ArrayNullableProp == nil { - var ret []map[string]interface{} - return ret, false + return nil, false } - return *o.ArrayNullableProp, true + return &o.ArrayNullableProp, true } // HasArrayNullableProp returns a boolean if a field has been set. @@ -275,26 +329,26 @@ func (o *NullableClass) HasArrayNullableProp() bool { // SetArrayNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayNullableProp field. func (o *NullableClass) SetArrayNullableProp(v []map[string]interface{}) { - o.ArrayNullableProp = &v + o.ArrayNullableProp = v } -// GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field value if set, zero value otherwise. +// GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NullableClass) GetArrayAndItemsNullableProp() []map[string]interface{} { - if o == nil || o.ArrayAndItemsNullableProp == nil { + if o == nil { var ret []map[string]interface{} return ret } - return *o.ArrayAndItemsNullableProp + return o.ArrayAndItemsNullableProp } -// GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field value if set, zero value otherwise +// GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetArrayAndItemsNullablePropOk() (*[]map[string]interface{}, bool) { if o == nil || o.ArrayAndItemsNullableProp == nil { - var ret []map[string]interface{} - return ret, false + return nil, false } - return *o.ArrayAndItemsNullableProp, true + return &o.ArrayAndItemsNullableProp, true } // HasArrayAndItemsNullableProp returns a boolean if a field has been set. @@ -308,7 +362,7 @@ func (o *NullableClass) HasArrayAndItemsNullableProp() bool { // SetArrayAndItemsNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field. func (o *NullableClass) SetArrayAndItemsNullableProp(v []map[string]interface{}) { - o.ArrayAndItemsNullableProp = &v + o.ArrayAndItemsNullableProp = v } // GetArrayItemsNullable returns the ArrayItemsNullable field value if set, zero value otherwise. @@ -320,14 +374,13 @@ func (o *NullableClass) GetArrayItemsNullable() []map[string]interface{} { return *o.ArrayItemsNullable } -// GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field value if set, zero value otherwise +// GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetArrayItemsNullableOk() ([]map[string]interface{}, bool) { +func (o *NullableClass) GetArrayItemsNullableOk() (*[]map[string]interface{}, bool) { if o == nil || o.ArrayItemsNullable == nil { - var ret []map[string]interface{} - return ret, false + return nil, false } - return *o.ArrayItemsNullable, true + return o.ArrayItemsNullable, true } // HasArrayItemsNullable returns a boolean if a field has been set. @@ -344,23 +397,23 @@ func (o *NullableClass) SetArrayItemsNullable(v []map[string]interface{}) { o.ArrayItemsNullable = &v } -// GetObjectNullableProp returns the ObjectNullableProp field value if set, zero value otherwise. +// GetObjectNullableProp returns the ObjectNullableProp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NullableClass) GetObjectNullableProp() map[string]map[string]interface{} { - if o == nil || o.ObjectNullableProp == nil { + if o == nil { var ret map[string]map[string]interface{} return ret } - return *o.ObjectNullableProp + return o.ObjectNullableProp } -// GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field value if set, zero value otherwise +// GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetObjectNullablePropOk() (*map[string]map[string]interface{}, bool) { if o == nil || o.ObjectNullableProp == nil { - var ret map[string]map[string]interface{} - return ret, false + return nil, false } - return *o.ObjectNullableProp, true + return &o.ObjectNullableProp, true } // HasObjectNullableProp returns a boolean if a field has been set. @@ -374,26 +427,26 @@ func (o *NullableClass) HasObjectNullableProp() bool { // SetObjectNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectNullableProp field. func (o *NullableClass) SetObjectNullableProp(v map[string]map[string]interface{}) { - o.ObjectNullableProp = &v + o.ObjectNullableProp = v } -// GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field value if set, zero value otherwise. +// GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field value if set, zero value otherwise (both if not set or set to explicit null). func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]interface{} { - if o == nil || o.ObjectAndItemsNullableProp == nil { + if o == nil { var ret map[string]map[string]interface{} return ret } - return *o.ObjectAndItemsNullableProp + return o.ObjectAndItemsNullableProp } -// GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field value if set, zero value otherwise +// GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NullableClass) GetObjectAndItemsNullablePropOk() (*map[string]map[string]interface{}, bool) { if o == nil || o.ObjectAndItemsNullableProp == nil { - var ret map[string]map[string]interface{} - return ret, false + return nil, false } - return *o.ObjectAndItemsNullableProp, true + return &o.ObjectAndItemsNullableProp, true } // HasObjectAndItemsNullableProp returns a boolean if a field has been set. @@ -407,7 +460,7 @@ func (o *NullableClass) HasObjectAndItemsNullableProp() bool { // SetObjectAndItemsNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field. func (o *NullableClass) SetObjectAndItemsNullableProp(v map[string]map[string]interface{}) { - o.ObjectAndItemsNullableProp = &v + o.ObjectAndItemsNullableProp = v } // GetObjectItemsNullable returns the ObjectItemsNullable field value if set, zero value otherwise. @@ -419,14 +472,13 @@ func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface return *o.ObjectItemsNullable } -// GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field value if set, zero value otherwise +// GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NullableClass) GetObjectItemsNullableOk() (map[string]map[string]interface{}, bool) { +func (o *NullableClass) GetObjectItemsNullableOk() (*map[string]map[string]interface{}, bool) { if o == nil || o.ObjectItemsNullable == nil { - var ret map[string]map[string]interface{} - return ret, false + return nil, false } - return *o.ObjectItemsNullable, true + return o.ObjectItemsNullable, true } // HasObjectItemsNullable returns a boolean if a field has been set. @@ -443,25 +495,79 @@ func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface o.ObjectItemsNullable = &v } +func (o NullableClass) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.IntegerProp.IsSet() { + toSerialize["integer_prop"] = o.IntegerProp.Get() + } + if o.NumberProp.IsSet() { + toSerialize["number_prop"] = o.NumberProp.Get() + } + if o.BooleanProp.IsSet() { + toSerialize["boolean_prop"] = o.BooleanProp.Get() + } + if o.StringProp.IsSet() { + toSerialize["string_prop"] = o.StringProp.Get() + } + if o.DateProp.IsSet() { + toSerialize["date_prop"] = o.DateProp.Get() + } + if o.DatetimeProp.IsSet() { + toSerialize["datetime_prop"] = o.DatetimeProp.Get() + } + if o.ArrayNullableProp != nil { + toSerialize["array_nullable_prop"] = o.ArrayNullableProp + } + if o.ArrayAndItemsNullableProp != nil { + toSerialize["array_and_items_nullable_prop"] = o.ArrayAndItemsNullableProp + } + if o.ArrayItemsNullable != nil { + toSerialize["array_items_nullable"] = o.ArrayItemsNullable + } + if o.ObjectNullableProp != nil { + toSerialize["object_nullable_prop"] = o.ObjectNullableProp + } + if o.ObjectAndItemsNullableProp != nil { + toSerialize["object_and_items_nullable_prop"] = o.ObjectAndItemsNullableProp + } + if o.ObjectItemsNullable != nil { + toSerialize["object_items_nullable"] = o.ObjectItemsNullable + } + return json.Marshal(toSerialize) +} + type NullableNullableClass struct { - Value NullableClass - ExplicitNull bool + value *NullableClass + isSet bool +} + +func (v NullableNullableClass) Get() *NullableClass { + return v.value +} + +func (v *NullableNullableClass) Set(val *NullableClass) { + v.value = val + v.isSet = true +} + +func (v NullableNullableClass) IsSet() bool { + return v.isSet +} + +func (v *NullableNullableClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNullableClass(val *NullableClass) *NullableNullableClass { + return &NullableNullableClass{value: val, isSet: true} } func (v NullableNullableClass) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableNullableClass) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go index 576dcff80401..dbb70c5c1f71 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_number_only.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type NumberOnly struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewNumberOnly() *NumberOnly { - this := NumberOnly{} - return &this + this := NumberOnly{} + return &this } // NewNumberOnlyWithDefaults instantiates a new NumberOnly object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewNumberOnlyWithDefaults() *NumberOnly { - this := NumberOnly{} - return &this + this := NumberOnly{} + return &this } // GetJustNumber returns the JustNumber field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *NumberOnly) GetJustNumber() float32 { return *o.JustNumber } -// GetJustNumberOk returns a tuple with the JustNumber field value if set, zero value otherwise +// GetJustNumberOk returns a tuple with the JustNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *NumberOnly) GetJustNumberOk() (float32, bool) { +func (o *NumberOnly) GetJustNumberOk() (*float32, bool) { if o == nil || o.JustNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.JustNumber, true + return o.JustNumber, true } // HasJustNumber returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableNumberOnly struct { - Value NumberOnly - ExplicitNull bool + value *NumberOnly + isSet bool +} + +func (v NullableNumberOnly) Get() *NumberOnly { + return v.value +} + +func (v *NullableNumberOnly) Set(val *NumberOnly) { + v.value = val + v.isSet = true +} + +func (v NullableNumberOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableNumberOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNumberOnly(val *NumberOnly) *NullableNumberOnly { + return &NullableNumberOnly{value: val, isSet: true} } func (v NullableNumberOnly) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableNumberOnly) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go index aa4da6cf1b7f..895475b260c2 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_order.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" "time" ) @@ -31,20 +30,20 @@ type Order struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewOrder() *Order { - this := Order{} - var complete bool = false - this.Complete = &complete - return &this + this := Order{} + var complete bool = false + this.Complete = &complete + return &this } // NewOrderWithDefaults instantiates a new Order object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewOrderWithDefaults() *Order { - this := Order{} - var complete bool = false - this.Complete = &complete - return &this + this := Order{} + var complete bool = false + this.Complete = &complete + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -56,14 +55,13 @@ func (o *Order) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetIdOk() (int64, bool) { +func (o *Order) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -89,14 +87,13 @@ func (o *Order) GetPetId() int64 { return *o.PetId } -// GetPetIdOk returns a tuple with the PetId field value if set, zero value otherwise +// GetPetIdOk returns a tuple with the PetId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetPetIdOk() (int64, bool) { +func (o *Order) GetPetIdOk() (*int64, bool) { if o == nil || o.PetId == nil { - var ret int64 - return ret, false + return nil, false } - return *o.PetId, true + return o.PetId, true } // HasPetId returns a boolean if a field has been set. @@ -122,14 +119,13 @@ func (o *Order) GetQuantity() int32 { return *o.Quantity } -// GetQuantityOk returns a tuple with the Quantity field value if set, zero value otherwise +// GetQuantityOk returns a tuple with the Quantity field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetQuantityOk() (int32, bool) { +func (o *Order) GetQuantityOk() (*int32, bool) { if o == nil || o.Quantity == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Quantity, true + return o.Quantity, true } // HasQuantity returns a boolean if a field has been set. @@ -155,14 +151,13 @@ func (o *Order) GetShipDate() time.Time { return *o.ShipDate } -// GetShipDateOk returns a tuple with the ShipDate field value if set, zero value otherwise +// GetShipDateOk returns a tuple with the ShipDate field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetShipDateOk() (time.Time, bool) { +func (o *Order) GetShipDateOk() (*time.Time, bool) { if o == nil || o.ShipDate == nil { - var ret time.Time - return ret, false + return nil, false } - return *o.ShipDate, true + return o.ShipDate, true } // HasShipDate returns a boolean if a field has been set. @@ -188,14 +183,13 @@ func (o *Order) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetStatusOk() (string, bool) { +func (o *Order) GetStatusOk() (*string, bool) { if o == nil || o.Status == nil { - var ret string - return ret, false + return nil, false } - return *o.Status, true + return o.Status, true } // HasStatus returns a boolean if a field has been set. @@ -221,14 +215,13 @@ func (o *Order) GetComplete() bool { return *o.Complete } -// GetCompleteOk returns a tuple with the Complete field value if set, zero value otherwise +// GetCompleteOk returns a tuple with the Complete field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Order) GetCompleteOk() (bool, bool) { +func (o *Order) GetCompleteOk() (*bool, bool) { if o == nil || o.Complete == nil { - var ret bool - return ret, false + return nil, false } - return *o.Complete, true + return o.Complete, true } // HasComplete returns a boolean if a field has been set. @@ -245,25 +238,61 @@ 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) +} + type NullableOrder struct { - Value Order - ExplicitNull bool + value *Order + isSet bool +} + +func (v NullableOrder) Get() *Order { + return v.value +} + +func (v *NullableOrder) Set(val *Order) { + v.value = val + v.isSet = true +} + +func (v NullableOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrder(val *Order) *NullableOrder { + return &NullableOrder{value: val, isSet: true} } func (v NullableOrder) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOrder) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go index a9a28d74233d..26a09e445c69 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_composite.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -26,16 +25,16 @@ type OuterComposite struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewOuterComposite() *OuterComposite { - this := OuterComposite{} - return &this + this := OuterComposite{} + return &this } // NewOuterCompositeWithDefaults instantiates a new OuterComposite object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewOuterCompositeWithDefaults() *OuterComposite { - this := OuterComposite{} - return &this + this := OuterComposite{} + return &this } // GetMyNumber returns the MyNumber field value if set, zero value otherwise. @@ -47,14 +46,13 @@ func (o *OuterComposite) GetMyNumber() float32 { return *o.MyNumber } -// GetMyNumberOk returns a tuple with the MyNumber field value if set, zero value otherwise +// GetMyNumberOk returns a tuple with the MyNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OuterComposite) GetMyNumberOk() (float32, bool) { +func (o *OuterComposite) GetMyNumberOk() (*float32, bool) { if o == nil || o.MyNumber == nil { - var ret float32 - return ret, false + return nil, false } - return *o.MyNumber, true + return o.MyNumber, true } // HasMyNumber returns a boolean if a field has been set. @@ -80,14 +78,13 @@ func (o *OuterComposite) GetMyString() string { return *o.MyString } -// GetMyStringOk returns a tuple with the MyString field value if set, zero value otherwise +// GetMyStringOk returns a tuple with the MyString field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OuterComposite) GetMyStringOk() (string, bool) { +func (o *OuterComposite) GetMyStringOk() (*string, bool) { if o == nil || o.MyString == nil { - var ret string - return ret, false + return nil, false } - return *o.MyString, true + return o.MyString, true } // HasMyString returns a boolean if a field has been set. @@ -113,14 +110,13 @@ func (o *OuterComposite) GetMyBoolean() bool { return *o.MyBoolean } -// GetMyBooleanOk returns a tuple with the MyBoolean field value if set, zero value otherwise +// GetMyBooleanOk returns a tuple with the MyBoolean field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OuterComposite) GetMyBooleanOk() (bool, bool) { +func (o *OuterComposite) GetMyBooleanOk() (*bool, bool) { if o == nil || o.MyBoolean == nil { - var ret bool - return ret, false + return nil, false } - return *o.MyBoolean, true + return o.MyBoolean, true } // HasMyBoolean returns a boolean if a field has been set. @@ -137,25 +133,52 @@ 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) +} + type NullableOuterComposite struct { - Value OuterComposite - ExplicitNull bool + value *OuterComposite + isSet bool +} + +func (v NullableOuterComposite) Get() *OuterComposite { + return v.value +} + +func (v *NullableOuterComposite) Set(val *OuterComposite) { + v.value = val + v.isSet = true +} + +func (v NullableOuterComposite) IsSet() bool { + return v.isSet +} + +func (v *NullableOuterComposite) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOuterComposite(val *OuterComposite) *NullableOuterComposite { + return &NullableOuterComposite{value: val, isSet: true} } func (v NullableOuterComposite) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOuterComposite) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum.go index b24d4b48d719..eab012a5aab5 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,24 +24,37 @@ const ( ) type NullableOuterEnum struct { - Value OuterEnum - ExplicitNull bool + value *OuterEnum + isSet bool +} + +func (v NullableOuterEnum) Get() *OuterEnum { + return v.value +} + +func (v *NullableOuterEnum) Set(val *OuterEnum) { + v.value = val + v.isSet = true +} + +func (v NullableOuterEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableOuterEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOuterEnum(val *OuterEnum) *NullableOuterEnum { + return &NullableOuterEnum{value: val, isSet: true} } func (v NullableOuterEnum) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOuterEnum) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_default_value.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_default_value.go index a9514cdfaf9b..ffa11df173f8 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_default_value.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_default_value.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,24 +24,37 @@ const ( ) type NullableOuterEnumDefaultValue struct { - Value OuterEnumDefaultValue - ExplicitNull bool + value *OuterEnumDefaultValue + isSet bool +} + +func (v NullableOuterEnumDefaultValue) Get() *OuterEnumDefaultValue { + return v.value +} + +func (v *NullableOuterEnumDefaultValue) Set(val *OuterEnumDefaultValue) { + v.value = val + v.isSet = true +} + +func (v NullableOuterEnumDefaultValue) IsSet() bool { + return v.isSet +} + +func (v *NullableOuterEnumDefaultValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOuterEnumDefaultValue(val *OuterEnumDefaultValue) *NullableOuterEnumDefaultValue { + return &NullableOuterEnumDefaultValue{value: val, isSet: true} } func (v NullableOuterEnumDefaultValue) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOuterEnumDefaultValue) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer.go index 6555f0a98225..7ab390d12e6d 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,24 +24,37 @@ const ( ) type NullableOuterEnumInteger struct { - Value OuterEnumInteger - ExplicitNull bool + value *OuterEnumInteger + isSet bool +} + +func (v NullableOuterEnumInteger) Get() *OuterEnumInteger { + return v.value +} + +func (v *NullableOuterEnumInteger) Set(val *OuterEnumInteger) { + v.value = val + v.isSet = true +} + +func (v NullableOuterEnumInteger) IsSet() bool { + return v.isSet +} + +func (v *NullableOuterEnumInteger) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOuterEnumInteger(val *OuterEnumInteger) *NullableOuterEnumInteger { + return &NullableOuterEnumInteger{value: val, isSet: true} } func (v NullableOuterEnumInteger) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOuterEnumInteger) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer_default_value.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer_default_value.go index 022dd527ec06..60943bd462a6 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer_default_value.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_outer_enum_integer_default_value.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,24 +24,37 @@ const ( ) type NullableOuterEnumIntegerDefaultValue struct { - Value OuterEnumIntegerDefaultValue - ExplicitNull bool + value *OuterEnumIntegerDefaultValue + isSet bool +} + +func (v NullableOuterEnumIntegerDefaultValue) Get() *OuterEnumIntegerDefaultValue { + return v.value +} + +func (v *NullableOuterEnumIntegerDefaultValue) Set(val *OuterEnumIntegerDefaultValue) { + v.value = val + v.isSet = true +} + +func (v NullableOuterEnumIntegerDefaultValue) IsSet() bool { + return v.isSet +} + +func (v *NullableOuterEnumIntegerDefaultValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOuterEnumIntegerDefaultValue(val *OuterEnumIntegerDefaultValue) *NullableOuterEnumIntegerDefaultValue { + return &NullableOuterEnumIntegerDefaultValue{value: val, isSet: true} } func (v NullableOuterEnumIntegerDefaultValue) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableOuterEnumIntegerDefaultValue) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go index be7887184490..a72afed465aa 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_pet.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -30,18 +29,18 @@ type Pet struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewPet(name string, photoUrls []string, ) *Pet { - this := Pet{} - this.Name = name - this.PhotoUrls = photoUrls - return &this + this := Pet{} + this.Name = name + this.PhotoUrls = photoUrls + return &this } // NewPetWithDefaults instantiates a new Pet object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewPetWithDefaults() *Pet { - this := Pet{} - return &this + this := Pet{} + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -53,14 +52,13 @@ func (o *Pet) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetIdOk() (int64, bool) { +func (o *Pet) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -86,14 +84,13 @@ func (o *Pet) GetCategory() Category { return *o.Category } -// GetCategoryOk returns a tuple with the Category field value if set, zero value otherwise +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetCategoryOk() (Category, bool) { +func (o *Pet) GetCategoryOk() (*Category, bool) { if o == nil || o.Category == nil { - var ret Category - return ret, false + return nil, false } - return *o.Category, true + return o.Category, true } // HasCategory returns a boolean if a field has been set. @@ -112,7 +109,7 @@ func (o *Pet) SetCategory(v Category) { // GetName returns the Name field value func (o *Pet) GetName() string { - if o == nil { + if o == nil { var ret string return ret } @@ -120,6 +117,15 @@ func (o *Pet) GetName() string { return o.Name } +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Pet) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + // SetName sets field value func (o *Pet) SetName(v string) { o.Name = v @@ -127,7 +133,7 @@ func (o *Pet) SetName(v string) { // GetPhotoUrls returns the PhotoUrls field value func (o *Pet) GetPhotoUrls() []string { - if o == nil { + if o == nil { var ret []string return ret } @@ -135,6 +141,15 @@ func (o *Pet) GetPhotoUrls() []string { return o.PhotoUrls } +// GetPhotoUrlsOk returns a tuple with the PhotoUrls field value +// and a boolean to check if the value has been set. +func (o *Pet) GetPhotoUrlsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.PhotoUrls, true +} + // SetPhotoUrls sets field value func (o *Pet) SetPhotoUrls(v []string) { o.PhotoUrls = v @@ -149,14 +164,13 @@ func (o *Pet) GetTags() []Tag { return *o.Tags } -// GetTagsOk returns a tuple with the Tags field value if set, zero value otherwise +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetTagsOk() ([]Tag, bool) { +func (o *Pet) GetTagsOk() (*[]Tag, bool) { if o == nil || o.Tags == nil { - var ret []Tag - return ret, false + return nil, false } - return *o.Tags, true + return o.Tags, true } // HasTags returns a boolean if a field has been set. @@ -182,14 +196,13 @@ func (o *Pet) GetStatus() string { return *o.Status } -// GetStatusOk returns a tuple with the Status field value if set, zero value otherwise +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Pet) GetStatusOk() (string, bool) { +func (o *Pet) GetStatusOk() (*string, bool) { if o == nil || o.Status == nil { - var ret string - return ret, false + return nil, false } - return *o.Status, true + return o.Status, true } // HasStatus returns a boolean if a field has been set. @@ -206,25 +219,61 @@ 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 true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["photoUrls"] = o.PhotoUrls + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + type NullablePet struct { - Value Pet - ExplicitNull bool + value *Pet + isSet bool +} + +func (v NullablePet) Get() *Pet { + return v.value +} + +func (v *NullablePet) Set(val *Pet) { + v.value = val + v.isSet = true +} + +func (v NullablePet) IsSet() bool { + return v.isSet +} + +func (v *NullablePet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePet(val *Pet) *NullablePet { + return &NullablePet{value: val, isSet: true} } func (v NullablePet) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullablePet) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go index d2668d830418..277badc58cf3 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_read_only_first.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type ReadOnlyFirst struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewReadOnlyFirst() *ReadOnlyFirst { - this := ReadOnlyFirst{} - return &this + this := ReadOnlyFirst{} + return &this } // NewReadOnlyFirstWithDefaults instantiates a new ReadOnlyFirst object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewReadOnlyFirstWithDefaults() *ReadOnlyFirst { - this := ReadOnlyFirst{} - return &this + this := ReadOnlyFirst{} + return &this } // GetBar returns the Bar field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *ReadOnlyFirst) GetBar() string { return *o.Bar } -// GetBarOk returns a tuple with the Bar field value if set, zero value otherwise +// GetBarOk returns a tuple with the Bar field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ReadOnlyFirst) GetBarOk() (string, bool) { +func (o *ReadOnlyFirst) GetBarOk() (*string, bool) { if o == nil || o.Bar == nil { - var ret string - return ret, false + return nil, false } - return *o.Bar, true + return o.Bar, true } // HasBar returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *ReadOnlyFirst) GetBaz() string { return *o.Baz } -// GetBazOk returns a tuple with the Baz field value if set, zero value otherwise +// GetBazOk returns a tuple with the Baz field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ReadOnlyFirst) GetBazOk() (string, bool) { +func (o *ReadOnlyFirst) GetBazOk() (*string, bool) { if o == nil || o.Baz == nil { - var ret string - return ret, false + return nil, false } - return *o.Baz, true + return o.Baz, true } // HasBaz returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableReadOnlyFirst struct { - Value ReadOnlyFirst - ExplicitNull bool + value *ReadOnlyFirst + isSet bool +} + +func (v NullableReadOnlyFirst) Get() *ReadOnlyFirst { + return v.value +} + +func (v *NullableReadOnlyFirst) Set(val *ReadOnlyFirst) { + v.value = val + v.isSet = true +} + +func (v NullableReadOnlyFirst) IsSet() bool { + return v.isSet +} + +func (v *NullableReadOnlyFirst) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReadOnlyFirst(val *ReadOnlyFirst) *NullableReadOnlyFirst { + return &NullableReadOnlyFirst{value: val, isSet: true} } func (v NullableReadOnlyFirst) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableReadOnlyFirst) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go index 304c5ffafeed..b8821489c0eb 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_return.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -24,16 +23,16 @@ type Return struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewReturn() *Return { - this := Return{} - return &this + this := Return{} + return &this } // NewReturnWithDefaults instantiates a new Return object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewReturnWithDefaults() *Return { - this := Return{} - return &this + this := Return{} + return &this } // GetReturn returns the Return field value if set, zero value otherwise. @@ -45,14 +44,13 @@ func (o *Return) GetReturn() int32 { return *o.Return } -// GetReturnOk returns a tuple with the Return field value if set, zero value otherwise +// GetReturnOk returns a tuple with the Return field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Return) GetReturnOk() (int32, bool) { +func (o *Return) GetReturnOk() (*int32, bool) { if o == nil || o.Return == nil { - var ret int32 - return ret, false + return nil, false } - return *o.Return, true + return o.Return, true } // HasReturn returns a boolean if a field has been set. @@ -69,25 +67,46 @@ 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) +} + type NullableReturn struct { - Value Return - ExplicitNull bool + value *Return + isSet bool +} + +func (v NullableReturn) Get() *Return { + return v.value +} + +func (v *NullableReturn) Set(val *Return) { + v.value = val + v.isSet = true +} + +func (v NullableReturn) IsSet() bool { + return v.isSet +} + +func (v *NullableReturn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReturn(val *Return) *NullableReturn { + return &NullableReturn{value: val, isSet: true} } func (v NullableReturn) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableReturn) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go index abfc6737323c..6ba3864c6121 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_tag.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -25,16 +24,16 @@ type Tag struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewTag() *Tag { - this := Tag{} - return &this + this := Tag{} + return &this } // NewTagWithDefaults instantiates a new Tag object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewTagWithDefaults() *Tag { - this := Tag{} - return &this + this := Tag{} + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -46,14 +45,13 @@ func (o *Tag) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Tag) GetIdOk() (int64, bool) { +func (o *Tag) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -79,14 +77,13 @@ func (o *Tag) GetName() string { return *o.Name } -// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Tag) GetNameOk() (string, bool) { +func (o *Tag) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { - var ret string - return ret, false + return nil, false } - return *o.Name, true + return o.Name, true } // HasName returns a boolean if a field has been set. @@ -103,25 +100,49 @@ 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) +} + type NullableTag struct { - Value Tag - ExplicitNull bool + value *Tag + isSet bool +} + +func (v NullableTag) Get() *Tag { + return v.value +} + +func (v *NullableTag) Set(val *Tag) { + v.value = val + v.isSet = true +} + +func (v NullableTag) IsSet() bool { + return v.isSet +} + +func (v *NullableTag) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTag(val *Tag) *NullableTag { + return &NullableTag{value: val, isSet: true} } func (v NullableTag) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableTag) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go index 54ed39fb709a..838cf38d9790 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/model_user.go @@ -10,7 +10,6 @@ package petstore import ( - "bytes" "encoding/json" ) @@ -32,16 +31,16 @@ type User struct { // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewUser() *User { - this := User{} - return &this + this := User{} + return &this } // NewUserWithDefaults instantiates a new User object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewUserWithDefaults() *User { - this := User{} - return &this + this := User{} + return &this } // GetId returns the Id field value if set, zero value otherwise. @@ -53,14 +52,13 @@ func (o *User) GetId() int64 { return *o.Id } -// GetIdOk returns a tuple with the Id field value if set, zero value otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetIdOk() (int64, bool) { +func (o *User) GetIdOk() (*int64, bool) { if o == nil || o.Id == nil { - var ret int64 - return ret, false + return nil, false } - return *o.Id, true + return o.Id, true } // HasId returns a boolean if a field has been set. @@ -86,14 +84,13 @@ func (o *User) GetUsername() string { return *o.Username } -// GetUsernameOk returns a tuple with the Username field value if set, zero value otherwise +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetUsernameOk() (string, bool) { +func (o *User) GetUsernameOk() (*string, bool) { if o == nil || o.Username == nil { - var ret string - return ret, false + return nil, false } - return *o.Username, true + return o.Username, true } // HasUsername returns a boolean if a field has been set. @@ -119,14 +116,13 @@ func (o *User) GetFirstName() string { return *o.FirstName } -// GetFirstNameOk returns a tuple with the FirstName field value if set, zero value otherwise +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetFirstNameOk() (string, bool) { +func (o *User) GetFirstNameOk() (*string, bool) { if o == nil || o.FirstName == nil { - var ret string - return ret, false + return nil, false } - return *o.FirstName, true + return o.FirstName, true } // HasFirstName returns a boolean if a field has been set. @@ -152,14 +148,13 @@ func (o *User) GetLastName() string { return *o.LastName } -// GetLastNameOk returns a tuple with the LastName field value if set, zero value otherwise +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetLastNameOk() (string, bool) { +func (o *User) GetLastNameOk() (*string, bool) { if o == nil || o.LastName == nil { - var ret string - return ret, false + return nil, false } - return *o.LastName, true + return o.LastName, true } // HasLastName returns a boolean if a field has been set. @@ -185,14 +180,13 @@ func (o *User) GetEmail() string { return *o.Email } -// GetEmailOk returns a tuple with the Email field value if set, zero value otherwise +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetEmailOk() (string, bool) { +func (o *User) GetEmailOk() (*string, bool) { if o == nil || o.Email == nil { - var ret string - return ret, false + return nil, false } - return *o.Email, true + return o.Email, true } // HasEmail returns a boolean if a field has been set. @@ -218,14 +212,13 @@ func (o *User) GetPassword() string { return *o.Password } -// GetPasswordOk returns a tuple with the Password field value if set, zero value otherwise +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetPasswordOk() (string, bool) { +func (o *User) GetPasswordOk() (*string, bool) { if o == nil || o.Password == nil { - var ret string - return ret, false + return nil, false } - return *o.Password, true + return o.Password, true } // HasPassword returns a boolean if a field has been set. @@ -251,14 +244,13 @@ func (o *User) GetPhone() string { return *o.Phone } -// GetPhoneOk returns a tuple with the Phone field value if set, zero value otherwise +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetPhoneOk() (string, bool) { +func (o *User) GetPhoneOk() (*string, bool) { if o == nil || o.Phone == nil { - var ret string - return ret, false + return nil, false } - return *o.Phone, true + return o.Phone, true } // HasPhone returns a boolean if a field has been set. @@ -284,14 +276,13 @@ func (o *User) GetUserStatus() int32 { return *o.UserStatus } -// GetUserStatusOk returns a tuple with the UserStatus field value if set, zero value otherwise +// GetUserStatusOk returns a tuple with the UserStatus field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetUserStatusOk() (int32, bool) { +func (o *User) GetUserStatusOk() (*int32, bool) { if o == nil || o.UserStatus == nil { - var ret int32 - return ret, false + return nil, false } - return *o.UserStatus, true + return o.UserStatus, true } // HasUserStatus returns a boolean if a field has been set. @@ -308,25 +299,67 @@ 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) +} + type NullableUser struct { - Value User - ExplicitNull bool + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} } func (v NullableUser) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableUser) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/utils.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/utils.go index 3a3303b24451..9fb7a1847cd3 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/utils.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/utils.go @@ -10,14 +10,10 @@ package petstore import ( - "bytes" - "encoding/json" - "errors" - "time" + "encoding/json" + "time" ) -var ErrInvalidNullable = errors.New("nullable cannot have non-zero Value and ExplicitNull simultaneously") - // PtrBool is a helper routine that returns a pointer to given integer value. func PtrBool(v bool) *bool { return &v } @@ -43,202 +39,296 @@ func PtrString(v string) *string { return &v } func PtrTime(v time.Time) *time.Time { return &v } type NullableBool struct { - Value bool - ExplicitNull bool + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} } func (v NullableBool) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableBool) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt struct { - Value int - ExplicitNull bool + value *int + isSet bool } -func (v NullableInt) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } +func (v NullableInt) Get() *int { + return v.value } +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} -func (v *NullableInt) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} - return json.Unmarshal(src, &v.Value) +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt32 struct { - Value int32 - ExplicitNull bool + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} } func (v NullableInt32) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInt32) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableInt64 struct { - Value int64 - ExplicitNull bool + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} } func (v NullableInt64) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableInt64) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableFloat32 struct { - Value float32 - ExplicitNull bool + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} } func (v NullableFloat32) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0.0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableFloat64 struct { - Value float64 - ExplicitNull bool + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} } func (v NullableFloat64) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != 0.0: - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableString struct { - Value string - ExplicitNull bool + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} } func (v NullableString) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && v.Value != "": - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return json.Marshal(v.Value) - } + return json.Marshal(v.value) } func (v *NullableString) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) + v.isSet = true + return json.Unmarshal(src, &v.value) } + type NullableTime struct { - Value time.Time - ExplicitNull bool + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} } func (v NullableTime) MarshalJSON() ([]byte, error) { - switch { - case v.ExplicitNull && !v.Value.IsZero(): - return nil, ErrInvalidNullable - case v.ExplicitNull: - return []byte("null"), nil - default: - return v.Value.MarshalJSON() - } + return v.value.MarshalJSON() } func (v *NullableTime) UnmarshalJSON(src []byte) error { - if bytes.Equal(src, []byte("null")) { - v.ExplicitNull = true - return nil - } - - return json.Unmarshal(src, &v.Value) -} \ No newline at end of file + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/samples/openapi3/client/petstore/go-experimental/nullable_marshalling_test.go b/samples/openapi3/client/petstore/go-experimental/nullable_marshalling_test.go new file mode 100644 index 000000000000..6422846c29e1 --- /dev/null +++ b/samples/openapi3/client/petstore/go-experimental/nullable_marshalling_test.go @@ -0,0 +1,71 @@ +package main + +import ( + "encoding/json" + "fmt" + "testing" + + sw "./go-petstore" +) + +func TestNullableMarshalling(t *testing.T) { + var fv float32 = 1.1 + nc := sw.NullableClass{ + IntegerProp: *sw.NewNullableInt32(nil), + NumberProp: *sw.NewNullableFloat32(&fv), + // BooleanProp is also nullable, but we leave it unset, so it shouldn't be in the JSON + } + res, err := json.Marshal(nc) + if err != nil { + t.Errorf("Error while marshalling structure with Nullables: %v", err) + } + expected := `{"integer_prop":null,"number_prop":1.1}` + assertStringsEqual(t, expected, string(res)) + // try unmarshalling now + var unc sw.NullableClass + err = json.Unmarshal(res, &unc) + if err != nil { + t.Errorf("Error while unmarshalling structure with Nullables: %v", err) + } + if unc.BooleanProp.IsSet() || unc.BooleanProp.Get() != nil { + t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc.BooleanProp) + } + if !unc.IntegerProp.IsSet() || unc.IntegerProp.Get() != nil { + t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc.IntegerProp) + } + if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv { + t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp) + } + + // change the values a bit to make sure the Set/Unset methods work correctly + nc.IntegerProp.Unset() + bv := false + nc.BooleanProp.Set(&bv) + res, err = json.Marshal(nc) + if err != nil { + t.Errorf("Error while marshalling structure with Nullables: %v", err) + } + expected = `{"boolean_prop":false,"number_prop":1.1}` + assertStringsEqual(t, expected, string(res)) + // try unmarshalling now + var unc2 sw.NullableClass + err = json.Unmarshal(res, &unc2) + if err != nil { + t.Errorf("Error while unmarshalling structure with Nullables: %v", err) + } + if !unc2.BooleanProp.IsSet() || *unc2.BooleanProp.Get() != false { + t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc2.BooleanProp) + } + if unc2.IntegerProp.IsSet() || unc2.IntegerProp.Get() != nil { + t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc2.IntegerProp) + } + if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv { + t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp) + } +} + +func assertStringsEqual(t *testing.T, expected, actual string) { + if expected != actual { + t.Errorf(fmt.Sprintf("`%s` (expected) != `%s` (actual)", expected, actual)) + } +}