[go-experimental] Add model constructors to initialize non-container vars with defaults (#5175)

* [go-experimental] Add model constructors to initialize non-container vars with defaults

* Add docstring and extend model_doc to include the constructor

* Make variable names in constructor follow Go naming guidelines

* Provide 2 different constructurs as suggested + couple fixes to generate constructors right under all circumstances

* Fix defaults for enums

* Properly escape vars that have reserved names
This commit is contained in:
Slavek Kabrda 2020-02-20 16:13:53 +01:00 committed by GitHub
parent 33483b2f20
commit 010dad209a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
185 changed files with 3266 additions and 21 deletions

View File

@ -16,6 +16,7 @@
package org.openapitools.codegen.languages;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenProperty;
@ -23,14 +24,12 @@ import org.openapitools.codegen.CodegenSecurity;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.meta.GeneratorMetadata;
import org.openapitools.codegen.meta.Stability;
import org.openapitools.codegen.utils.ModelUtils;
import org.openapitools.codegen.utils.ProcessUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import static org.openapitools.codegen.utils.StringUtils.camelize;
@ -97,6 +96,59 @@ public class GoClientExperimentalCodegen extends GoClientCodegen {
return camelize(toModel(name, false));
}
public String escapeReservedWord(String name) {
if (this.reservedWordsMappings().containsKey(name)) {
return this.reservedWordsMappings().get(name);
}
return name + '_';
}
@Override
public String toEnumDefaultValue(String value, String datatype) {
String prefix = "";
if (enumClassPrefix) {
prefix = datatype.toUpperCase(Locale.ROOT) + "_";
}
return prefix + value;
}
@Override
public void updateCodegenPropertyEnum(CodegenProperty var) {
// make sure the inline enums have plain defaults (e.g. string, int, float)
String enumDefault = null;
if (var.isEnum && var.defaultValue != null) {
enumDefault = var.defaultValue;
}
super.updateCodegenPropertyEnum(var);
if (var.isEnum && enumDefault != null) {
var.defaultValue = enumDefault;
}
}
@Override
public String toDefaultValue(Schema p) {
p = ModelUtils.getReferencedSchema(this.openAPI, p);
if (ModelUtils.isStringSchema(p)) {
if (p.getDefault() != null) {
return "\"" + escapeText((String) p.getDefault()) + "\"";
}
return null;
}
return super.toDefaultValue(p);
}
@Override
public CodegenProperty fromProperty(String name, Schema p) {
CodegenProperty prop = super.fromProperty(name, p);
String cc = camelize(prop.name, true);
if (isReservedWord(cc)) {
cc = escapeReservedWord(cc);
}
prop.nameInCamelCase = cc;
return prop;
}
@Override
public Map<String, Object> postProcessModels(Map<String, Object> objs) {

View File

@ -52,6 +52,44 @@ type {{classname}} struct {
{{^isEnum}}
{{^vendorExtensions.x-is-one-of-interface}}
// New{{classname}} instantiates a new {{classname}} object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}} {
this := {{classname}}{}
{{#vars}}
{{#required}}
this.{{name}} = {{nameInCamelCase}}
{{/required}}
{{^required}}
{{#defaultValue}}
{{^isContainer}}
var {{nameInCamelCase}} {{{dataType}}} = {{#isNullable}}{{{dataType}}}{Value: {{/isNullable}}{{{.}}}{{#isNullable}} }{{/isNullable}}
this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}}
{{/isContainer}}
{{/defaultValue}}
{{/required}}
{{/vars}}
return &this
}
// New{{classname}}WithDefaults instantiates a new {{classname}} object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func New{{classname}}WithDefaults() *{{classname}} {
this := {{classname}}{}
{{#vars}}
{{#defaultValue}}
{{^isContainer}}
var {{nameInCamelCase}} {{{dataType}}} = {{#isNullable}}{{{dataType}}}{Value: {{/isNullable}}{{{.}}}{{#isNullable}} }{{/isNullable}}
this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}}
{{/isContainer}}
{{/defaultValue}}
{{/vars}}
return &this
}
{{#vars}}
{{#required}}
// Get{{name}} returns the {{name}} field value

View File

@ -16,6 +16,23 @@ Name | Type | Description | Notes
## Methods
{{^vendorExtensions.x-is-one-of-interface}}
### New{{classname}}
`func New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}}`
New{{classname}} instantiates a new {{classname}} object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### New{{classname}}WithDefaults
`func New{{classname}}WithDefaults() *{{classname}}`
New{{classname}}WithDefaults instantiates a new {{classname}} object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
{{#vars}}
### Get{{name}}

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesAnyType
`func NewAdditionalPropertiesAnyType() *AdditionalPropertiesAnyType`
NewAdditionalPropertiesAnyType instantiates a new AdditionalPropertiesAnyType object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesAnyTypeWithDefaults
`func NewAdditionalPropertiesAnyTypeWithDefaults() *AdditionalPropertiesAnyType`
NewAdditionalPropertiesAnyTypeWithDefaults instantiates a new AdditionalPropertiesAnyType object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *AdditionalPropertiesAnyType) GetName() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesArray
`func NewAdditionalPropertiesArray() *AdditionalPropertiesArray`
NewAdditionalPropertiesArray instantiates a new AdditionalPropertiesArray object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesArrayWithDefaults
`func NewAdditionalPropertiesArrayWithDefaults() *AdditionalPropertiesArray`
NewAdditionalPropertiesArrayWithDefaults instantiates a new AdditionalPropertiesArray object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *AdditionalPropertiesArray) GetName() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesBoolean
`func NewAdditionalPropertiesBoolean() *AdditionalPropertiesBoolean`
NewAdditionalPropertiesBoolean instantiates a new AdditionalPropertiesBoolean object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesBooleanWithDefaults
`func NewAdditionalPropertiesBooleanWithDefaults() *AdditionalPropertiesBoolean`
NewAdditionalPropertiesBooleanWithDefaults instantiates a new AdditionalPropertiesBoolean object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *AdditionalPropertiesBoolean) GetName() string`

View File

@ -18,6 +18,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesClass
`func NewAdditionalPropertiesClass() *AdditionalPropertiesClass`
NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesClassWithDefaults
`func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass`
NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetMapString
`func (o *AdditionalPropertiesClass) GetMapString() map[string]string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesInteger
`func NewAdditionalPropertiesInteger() *AdditionalPropertiesInteger`
NewAdditionalPropertiesInteger instantiates a new AdditionalPropertiesInteger object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesIntegerWithDefaults
`func NewAdditionalPropertiesIntegerWithDefaults() *AdditionalPropertiesInteger`
NewAdditionalPropertiesIntegerWithDefaults instantiates a new AdditionalPropertiesInteger object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *AdditionalPropertiesInteger) GetName() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesNumber
`func NewAdditionalPropertiesNumber() *AdditionalPropertiesNumber`
NewAdditionalPropertiesNumber instantiates a new AdditionalPropertiesNumber object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesNumberWithDefaults
`func NewAdditionalPropertiesNumberWithDefaults() *AdditionalPropertiesNumber`
NewAdditionalPropertiesNumberWithDefaults instantiates a new AdditionalPropertiesNumber object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *AdditionalPropertiesNumber) GetName() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesObject
`func NewAdditionalPropertiesObject() *AdditionalPropertiesObject`
NewAdditionalPropertiesObject instantiates a new AdditionalPropertiesObject object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesObjectWithDefaults
`func NewAdditionalPropertiesObjectWithDefaults() *AdditionalPropertiesObject`
NewAdditionalPropertiesObjectWithDefaults instantiates a new AdditionalPropertiesObject object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *AdditionalPropertiesObject) GetName() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesString
`func NewAdditionalPropertiesString() *AdditionalPropertiesString`
NewAdditionalPropertiesString instantiates a new AdditionalPropertiesString object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesStringWithDefaults
`func NewAdditionalPropertiesStringWithDefaults() *AdditionalPropertiesString`
NewAdditionalPropertiesStringWithDefaults instantiates a new AdditionalPropertiesString object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *AdditionalPropertiesString) GetName() string`

View File

@ -5,10 +5,27 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | Pointer to **string** | |
**Color** | Pointer to **string** | | [optional] [default to red]
**Color** | Pointer to **string** | | [optional] [default to "red"]
## Methods
### NewAnimal
`func NewAnimal(className string, ) *Animal`
NewAnimal instantiates a new Animal object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAnimalWithDefaults
`func NewAnimalWithDefaults() *Animal`
NewAnimalWithDefaults instantiates a new Animal object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetClassName
`func (o *Animal) GetClassName() string`

View File

@ -10,6 +10,23 @@ Name | Type | Description | Notes
## Methods
### NewApiResponse
`func NewApiResponse() *ApiResponse`
NewApiResponse instantiates a new ApiResponse object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewApiResponseWithDefaults
`func NewApiResponseWithDefaults() *ApiResponse`
NewApiResponseWithDefaults instantiates a new ApiResponse object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCode
`func (o *ApiResponse) GetCode() int32`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewArrayOfArrayOfNumberOnly
`func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly`
NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewArrayOfArrayOfNumberOnlyWithDefaults
`func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly`
NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetArrayArrayNumber
`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewArrayOfNumberOnly
`func NewArrayOfNumberOnly() *ArrayOfNumberOnly`
NewArrayOfNumberOnly instantiates a new ArrayOfNumberOnly object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewArrayOfNumberOnlyWithDefaults
`func NewArrayOfNumberOnlyWithDefaults() *ArrayOfNumberOnly`
NewArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfNumberOnly object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetArrayNumber
`func (o *ArrayOfNumberOnly) GetArrayNumber() []float32`

View File

@ -10,6 +10,23 @@ Name | Type | Description | Notes
## Methods
### NewArrayTest
`func NewArrayTest() *ArrayTest`
NewArrayTest instantiates a new ArrayTest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewArrayTestWithDefaults
`func NewArrayTestWithDefaults() *ArrayTest`
NewArrayTestWithDefaults instantiates a new ArrayTest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetArrayOfString
`func (o *ArrayTest) GetArrayOfString() []string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewBigCat
`func NewBigCat() *BigCat`
NewBigCat instantiates a new BigCat object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewBigCatWithDefaults
`func NewBigCatWithDefaults() *BigCat`
NewBigCatWithDefaults instantiates a new BigCat object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetKind
`func (o *BigCat) GetKind() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewBigCatAllOf
`func NewBigCatAllOf() *BigCatAllOf`
NewBigCatAllOf instantiates a new BigCatAllOf object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewBigCatAllOfWithDefaults
`func NewBigCatAllOfWithDefaults() *BigCatAllOf`
NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetKind
`func (o *BigCatAllOf) GetKind() string`

View File

@ -13,6 +13,23 @@ Name | Type | Description | Notes
## Methods
### NewCapitalization
`func NewCapitalization() *Capitalization`
NewCapitalization instantiates a new Capitalization object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCapitalizationWithDefaults
`func NewCapitalizationWithDefaults() *Capitalization`
NewCapitalizationWithDefaults instantiates a new Capitalization object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSmallCamel
`func (o *Capitalization) GetSmallCamel() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewCat
`func NewCat() *Cat`
NewCat instantiates a new Cat object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCatWithDefaults
`func NewCatWithDefaults() *Cat`
NewCatWithDefaults instantiates a new Cat object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetDeclawed
`func (o *Cat) GetDeclawed() bool`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewCatAllOf
`func NewCatAllOf() *CatAllOf`
NewCatAllOf instantiates a new CatAllOf object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCatAllOfWithDefaults
`func NewCatAllOfWithDefaults() *CatAllOf`
NewCatAllOfWithDefaults instantiates a new CatAllOf object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetDeclawed
`func (o *CatAllOf) GetDeclawed() bool`

View File

@ -5,10 +5,27 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int64** | | [optional]
**Name** | Pointer to **string** | | [default to default-name]
**Name** | Pointer to **string** | | [default to "default-name"]
## Methods
### NewCategory
`func NewCategory(name string, ) *Category`
NewCategory instantiates a new Category object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCategoryWithDefaults
`func NewCategoryWithDefaults() *Category`
NewCategoryWithDefaults instantiates a new Category object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *Category) GetId() int64`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewClassModel
`func NewClassModel() *ClassModel`
NewClassModel instantiates a new ClassModel object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewClassModelWithDefaults
`func NewClassModelWithDefaults() *ClassModel`
NewClassModelWithDefaults instantiates a new ClassModel object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetClass
`func (o *ClassModel) GetClass() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewClient
`func NewClient() *Client`
NewClient instantiates a new Client object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewClientWithDefaults
`func NewClientWithDefaults() *Client`
NewClientWithDefaults instantiates a new Client object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetClient
`func (o *Client) GetClient() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewDog
`func NewDog() *Dog`
NewDog instantiates a new Dog object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDogWithDefaults
`func NewDogWithDefaults() *Dog`
NewDogWithDefaults instantiates a new Dog object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetBreed
`func (o *Dog) GetBreed() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewDogAllOf
`func NewDogAllOf() *DogAllOf`
NewDogAllOf instantiates a new DogAllOf object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDogAllOfWithDefaults
`func NewDogAllOfWithDefaults() *DogAllOf`
NewDogAllOfWithDefaults instantiates a new DogAllOf object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetBreed
`func (o *DogAllOf) GetBreed() string`

View File

@ -9,6 +9,23 @@ Name | Type | Description | Notes
## Methods
### NewEnumArrays
`func NewEnumArrays() *EnumArrays`
NewEnumArrays instantiates a new EnumArrays object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewEnumArraysWithDefaults
`func NewEnumArraysWithDefaults() *EnumArrays`
NewEnumArraysWithDefaults instantiates a new EnumArrays object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetJustSymbol
`func (o *EnumArrays) GetJustSymbol() string`

View File

@ -12,6 +12,23 @@ Name | Type | Description | Notes
## Methods
### NewEnumTest
`func NewEnumTest(enumStringRequired string, ) *EnumTest`
NewEnumTest instantiates a new EnumTest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewEnumTestWithDefaults
`func NewEnumTestWithDefaults() *EnumTest`
NewEnumTestWithDefaults instantiates a new EnumTest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetEnumString
`func (o *EnumTest) GetEnumString() string`

View File

@ -404,13 +404,13 @@ Other parameters are passed through a pointer to a apiTestEnumParametersRequest
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enumHeaderStringArray** | [**[]string**](string.md) | Header parameter enum test (string array) |
**enumHeaderString** | **string** | Header parameter enum test (string) | [default to -efg]
**enumHeaderString** | **string** | Header parameter enum test (string) | [default to &quot;-efg&quot;]
**enumQueryStringArray** | [**[]string**](string.md) | Query parameter enum test (string array) |
**enumQueryString** | **string** | Query parameter enum test (string) | [default to -efg]
**enumQueryString** | **string** | Query parameter enum test (string) | [default to &quot;-efg&quot;]
**enumQueryInteger** | **int32** | Query parameter enum test (double) |
**enumQueryDouble** | **float64** | Query parameter enum test (double) |
**enumFormStringArray** | [**[]string**](string.md) | Form parameter enum test (string array) | [default to $]
**enumFormString** | **string** | Form parameter enum test (string) | [default to -efg]
**enumFormStringArray** | [**[]string**](string.md) | Form parameter enum test (string array) | [default to &quot;$&quot;]
**enumFormString** | **string** | Form parameter enum test (string) | [default to &quot;-efg&quot;]
### Return type

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewFile
`func NewFile() *File`
NewFile instantiates a new File object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewFileWithDefaults
`func NewFileWithDefaults() *File`
NewFileWithDefaults instantiates a new File object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSourceURI
`func (o *File) GetSourceURI() string`

View File

@ -9,6 +9,23 @@ Name | Type | Description | Notes
## Methods
### NewFileSchemaTestClass
`func NewFileSchemaTestClass() *FileSchemaTestClass`
NewFileSchemaTestClass instantiates a new FileSchemaTestClass object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewFileSchemaTestClassWithDefaults
`func NewFileSchemaTestClassWithDefaults() *FileSchemaTestClass`
NewFileSchemaTestClassWithDefaults instantiates a new FileSchemaTestClass object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetFile
`func (o *FileSchemaTestClass) GetFile() File`

View File

@ -21,6 +21,23 @@ Name | Type | Description | Notes
## Methods
### NewFormatTest
`func NewFormatTest(number float32, byte_ string, date string, password string, ) *FormatTest`
NewFormatTest instantiates a new FormatTest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewFormatTestWithDefaults
`func NewFormatTestWithDefaults() *FormatTest`
NewFormatTestWithDefaults instantiates a new FormatTest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetInteger
`func (o *FormatTest) GetInteger() int32`

View File

@ -9,6 +9,23 @@ Name | Type | Description | Notes
## Methods
### NewHasOnlyReadOnly
`func NewHasOnlyReadOnly() *HasOnlyReadOnly`
NewHasOnlyReadOnly instantiates a new HasOnlyReadOnly object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewHasOnlyReadOnlyWithDefaults
`func NewHasOnlyReadOnlyWithDefaults() *HasOnlyReadOnly`
NewHasOnlyReadOnlyWithDefaults instantiates a new HasOnlyReadOnly object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetBar
`func (o *HasOnlyReadOnly) GetBar() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewList
`func NewList() *List`
NewList instantiates a new List object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewListWithDefaults
`func NewListWithDefaults() *List`
NewListWithDefaults instantiates a new List object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetVar123List
`func (o *List) GetVar123List() string`

View File

@ -11,6 +11,23 @@ Name | Type | Description | Notes
## Methods
### NewMapTest
`func NewMapTest() *MapTest`
NewMapTest instantiates a new MapTest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewMapTestWithDefaults
`func NewMapTestWithDefaults() *MapTest`
NewMapTestWithDefaults instantiates a new MapTest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetMapMapOfString
`func (o *MapTest) GetMapMapOfString() map[string]map[string]string`

View File

@ -10,6 +10,23 @@ Name | Type | Description | Notes
## Methods
### NewMixedPropertiesAndAdditionalPropertiesClass
`func NewMixedPropertiesAndAdditionalPropertiesClass() *MixedPropertiesAndAdditionalPropertiesClass`
NewMixedPropertiesAndAdditionalPropertiesClass instantiates a new MixedPropertiesAndAdditionalPropertiesClass object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults
`func NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults() *MixedPropertiesAndAdditionalPropertiesClass`
NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults instantiates a new MixedPropertiesAndAdditionalPropertiesClass object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetUuid
`func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string`

View File

@ -9,6 +9,23 @@ Name | Type | Description | Notes
## Methods
### NewModel200Response
`func NewModel200Response() *Model200Response`
NewModel200Response instantiates a new Model200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewModel200ResponseWithDefaults
`func NewModel200ResponseWithDefaults() *Model200Response`
NewModel200ResponseWithDefaults instantiates a new Model200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *Model200Response) GetName() int32`

View File

@ -11,6 +11,23 @@ Name | Type | Description | Notes
## Methods
### NewName
`func NewName(name int32, ) *Name`
NewName instantiates a new Name object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNameWithDefaults
`func NewNameWithDefaults() *Name`
NewNameWithDefaults instantiates a new Name object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *Name) GetName() int32`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewNumberOnly
`func NewNumberOnly() *NumberOnly`
NewNumberOnly instantiates a new NumberOnly object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNumberOnlyWithDefaults
`func NewNumberOnlyWithDefaults() *NumberOnly`
NewNumberOnlyWithDefaults instantiates a new NumberOnly object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetJustNumber
`func (o *NumberOnly) GetJustNumber() float32`

View File

@ -13,6 +13,23 @@ Name | Type | Description | Notes
## Methods
### NewOrder
`func NewOrder() *Order`
NewOrder instantiates a new Order object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewOrderWithDefaults
`func NewOrderWithDefaults() *Order`
NewOrderWithDefaults instantiates a new Order object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *Order) GetId() int64`

View File

@ -10,6 +10,23 @@ Name | Type | Description | Notes
## Methods
### NewOuterComposite
`func NewOuterComposite() *OuterComposite`
NewOuterComposite instantiates a new OuterComposite object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewOuterCompositeWithDefaults
`func NewOuterCompositeWithDefaults() *OuterComposite`
NewOuterCompositeWithDefaults instantiates a new OuterComposite object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetMyNumber
`func (o *OuterComposite) GetMyNumber() float32`

View File

@ -13,6 +13,23 @@ Name | Type | Description | Notes
## Methods
### NewPet
`func NewPet(name string, photoUrls []string, ) *Pet`
NewPet instantiates a new Pet object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPetWithDefaults
`func NewPetWithDefaults() *Pet`
NewPetWithDefaults instantiates a new Pet object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *Pet) GetId() int64`

View File

@ -9,6 +9,23 @@ Name | Type | Description | Notes
## Methods
### NewReadOnlyFirst
`func NewReadOnlyFirst() *ReadOnlyFirst`
NewReadOnlyFirst instantiates a new ReadOnlyFirst object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewReadOnlyFirstWithDefaults
`func NewReadOnlyFirstWithDefaults() *ReadOnlyFirst`
NewReadOnlyFirstWithDefaults instantiates a new ReadOnlyFirst object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetBar
`func (o *ReadOnlyFirst) GetBar() string`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewReturn
`func NewReturn() *Return`
NewReturn instantiates a new Return object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewReturnWithDefaults
`func NewReturnWithDefaults() *Return`
NewReturnWithDefaults instantiates a new Return object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetReturn
`func (o *Return) GetReturn() int32`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewSpecialModelName
`func NewSpecialModelName() *SpecialModelName`
NewSpecialModelName instantiates a new SpecialModelName object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewSpecialModelNameWithDefaults
`func NewSpecialModelNameWithDefaults() *SpecialModelName`
NewSpecialModelNameWithDefaults instantiates a new SpecialModelName object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSpecialPropertyName
`func (o *SpecialModelName) GetSpecialPropertyName() int64`

View File

@ -9,6 +9,23 @@ Name | Type | Description | Notes
## Methods
### NewTag
`func NewTag() *Tag`
NewTag instantiates a new Tag object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewTagWithDefaults
`func NewTagWithDefaults() *Tag`
NewTagWithDefaults instantiates a new Tag object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *Tag) GetId() int64`

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**StringItem** | Pointer to **string** | | [default to what]
**StringItem** | Pointer to **string** | | [default to "what"]
**NumberItem** | Pointer to **float32** | |
**IntegerItem** | Pointer to **int32** | |
**BoolItem** | Pointer to **bool** | | [default to true]
@ -12,6 +12,23 @@ Name | Type | Description | Notes
## Methods
### NewTypeHolderDefault
`func NewTypeHolderDefault(stringItem string, numberItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderDefault`
NewTypeHolderDefault instantiates a new TypeHolderDefault object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewTypeHolderDefaultWithDefaults
`func NewTypeHolderDefaultWithDefaults() *TypeHolderDefault`
NewTypeHolderDefaultWithDefaults instantiates a new TypeHolderDefault object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetStringItem
`func (o *TypeHolderDefault) GetStringItem() string`

View File

@ -13,6 +13,23 @@ Name | Type | Description | Notes
## Methods
### NewTypeHolderExample
`func NewTypeHolderExample(stringItem string, numberItem float32, floatItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderExample`
NewTypeHolderExample instantiates a new TypeHolderExample object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewTypeHolderExampleWithDefaults
`func NewTypeHolderExampleWithDefaults() *TypeHolderExample`
NewTypeHolderExampleWithDefaults instantiates a new TypeHolderExample object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetStringItem
`func (o *TypeHolderExample) GetStringItem() string`

View File

@ -15,6 +15,23 @@ Name | Type | Description | Notes
## Methods
### NewUser
`func NewUser() *User`
NewUser instantiates a new User object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewUserWithDefaults
`func NewUserWithDefaults() *User`
NewUserWithDefaults instantiates a new User object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *User) GetId() int64`

View File

@ -36,6 +36,23 @@ Name | Type | Description | Notes
## Methods
### NewXmlItem
`func NewXmlItem() *XmlItem`
NewXmlItem instantiates a new XmlItem object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewXmlItemWithDefaults
`func NewXmlItemWithDefaults() *XmlItem`
NewXmlItemWithDefaults instantiates a new XmlItem object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAttributeString
`func (o *XmlItem) GetAttributeString() string`

View File

@ -20,6 +20,23 @@ type Model200Response struct {
Class *string `json:"class,omitempty"`
}
// NewModel200Response instantiates a new Model200Response object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewModel200Response() *Model200Response {
this := Model200Response{}
return &this
}
// NewModel200ResponseWithDefaults instantiates a new Model200Response object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewModel200ResponseWithDefaults() *Model200Response {
this := Model200Response{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Model200Response) GetName() int32 {
if o == nil || o.Name == nil {

View File

@ -19,6 +19,23 @@ type AdditionalPropertiesAnyType struct {
Name *string `json:"name,omitempty"`
}
// NewAdditionalPropertiesAnyType instantiates a new AdditionalPropertiesAnyType object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAdditionalPropertiesAnyType() *AdditionalPropertiesAnyType {
this := AdditionalPropertiesAnyType{}
return &this
}
// NewAdditionalPropertiesAnyTypeWithDefaults instantiates a new AdditionalPropertiesAnyType object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAdditionalPropertiesAnyTypeWithDefaults() *AdditionalPropertiesAnyType {
this := AdditionalPropertiesAnyType{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AdditionalPropertiesAnyType) GetName() string {
if o == nil || o.Name == nil {

View File

@ -19,6 +19,23 @@ type AdditionalPropertiesArray struct {
Name *string `json:"name,omitempty"`
}
// NewAdditionalPropertiesArray instantiates a new AdditionalPropertiesArray object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAdditionalPropertiesArray() *AdditionalPropertiesArray {
this := AdditionalPropertiesArray{}
return &this
}
// NewAdditionalPropertiesArrayWithDefaults instantiates a new AdditionalPropertiesArray object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAdditionalPropertiesArrayWithDefaults() *AdditionalPropertiesArray {
this := AdditionalPropertiesArray{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AdditionalPropertiesArray) GetName() string {
if o == nil || o.Name == nil {

View File

@ -19,6 +19,23 @@ type AdditionalPropertiesBoolean struct {
Name *string `json:"name,omitempty"`
}
// NewAdditionalPropertiesBoolean instantiates a new AdditionalPropertiesBoolean object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAdditionalPropertiesBoolean() *AdditionalPropertiesBoolean {
this := AdditionalPropertiesBoolean{}
return &this
}
// NewAdditionalPropertiesBooleanWithDefaults instantiates a new AdditionalPropertiesBoolean object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAdditionalPropertiesBooleanWithDefaults() *AdditionalPropertiesBoolean {
this := AdditionalPropertiesBoolean{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AdditionalPropertiesBoolean) GetName() string {
if o == nil || o.Name == nil {

View File

@ -29,6 +29,23 @@ type AdditionalPropertiesClass struct {
Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"`
}
// NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAdditionalPropertiesClass() *AdditionalPropertiesClass {
this := AdditionalPropertiesClass{}
return &this
}
// NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass {
this := AdditionalPropertiesClass{}
return &this
}
// GetMapString returns the MapString field value if set, zero value otherwise.
func (o *AdditionalPropertiesClass) GetMapString() map[string]string {
if o == nil || o.MapString == nil {

View File

@ -19,6 +19,23 @@ type AdditionalPropertiesInteger struct {
Name *string `json:"name,omitempty"`
}
// NewAdditionalPropertiesInteger instantiates a new AdditionalPropertiesInteger object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAdditionalPropertiesInteger() *AdditionalPropertiesInteger {
this := AdditionalPropertiesInteger{}
return &this
}
// NewAdditionalPropertiesIntegerWithDefaults instantiates a new AdditionalPropertiesInteger object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAdditionalPropertiesIntegerWithDefaults() *AdditionalPropertiesInteger {
this := AdditionalPropertiesInteger{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AdditionalPropertiesInteger) GetName() string {
if o == nil || o.Name == nil {

View File

@ -19,6 +19,23 @@ type AdditionalPropertiesNumber struct {
Name *string `json:"name,omitempty"`
}
// NewAdditionalPropertiesNumber instantiates a new AdditionalPropertiesNumber object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAdditionalPropertiesNumber() *AdditionalPropertiesNumber {
this := AdditionalPropertiesNumber{}
return &this
}
// NewAdditionalPropertiesNumberWithDefaults instantiates a new AdditionalPropertiesNumber object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAdditionalPropertiesNumberWithDefaults() *AdditionalPropertiesNumber {
this := AdditionalPropertiesNumber{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AdditionalPropertiesNumber) GetName() string {
if o == nil || o.Name == nil {

View File

@ -19,6 +19,23 @@ type AdditionalPropertiesObject struct {
Name *string `json:"name,omitempty"`
}
// NewAdditionalPropertiesObject instantiates a new AdditionalPropertiesObject object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAdditionalPropertiesObject() *AdditionalPropertiesObject {
this := AdditionalPropertiesObject{}
return &this
}
// NewAdditionalPropertiesObjectWithDefaults instantiates a new AdditionalPropertiesObject object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAdditionalPropertiesObjectWithDefaults() *AdditionalPropertiesObject {
this := AdditionalPropertiesObject{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AdditionalPropertiesObject) GetName() string {
if o == nil || o.Name == nil {

View File

@ -19,6 +19,23 @@ type AdditionalPropertiesString struct {
Name *string `json:"name,omitempty"`
}
// NewAdditionalPropertiesString instantiates a new AdditionalPropertiesString object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAdditionalPropertiesString() *AdditionalPropertiesString {
this := AdditionalPropertiesString{}
return &this
}
// NewAdditionalPropertiesStringWithDefaults instantiates a new AdditionalPropertiesString object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAdditionalPropertiesStringWithDefaults() *AdditionalPropertiesString {
this := AdditionalPropertiesString{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AdditionalPropertiesString) GetName() string {
if o == nil || o.Name == nil {

View File

@ -20,6 +20,28 @@ type Animal struct {
Color *string `json:"color,omitempty"`
}
// NewAnimal instantiates a new Animal object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAnimal(className string, ) *Animal {
this := Animal{}
this.ClassName = className
var color string = "red"
this.Color = &color
return &this
}
// NewAnimalWithDefaults instantiates a new Animal object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAnimalWithDefaults() *Animal {
this := Animal{}
var color string = "red"
this.Color = &color
return &this
}
// GetClassName returns the ClassName field value
func (o *Animal) GetClassName() string {
if o == nil {

View File

@ -21,6 +21,23 @@ type ApiResponse struct {
Message *string `json:"message,omitempty"`
}
// NewApiResponse instantiates a new ApiResponse object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewApiResponse() *ApiResponse {
this := ApiResponse{}
return &this
}
// NewApiResponseWithDefaults instantiates a new ApiResponse object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewApiResponseWithDefaults() *ApiResponse {
this := ApiResponse{}
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *ApiResponse) GetCode() int32 {
if o == nil || o.Code == nil {

View File

@ -19,6 +19,23 @@ type ArrayOfArrayOfNumberOnly struct {
ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"`
}
// NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly {
this := ArrayOfArrayOfNumberOnly{}
return &this
}
// NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly {
this := ArrayOfArrayOfNumberOnly{}
return &this
}
// GetArrayArrayNumber returns the ArrayArrayNumber field value if set, zero value otherwise.
func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 {
if o == nil || o.ArrayArrayNumber == nil {

View File

@ -19,6 +19,23 @@ type ArrayOfNumberOnly struct {
ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"`
}
// NewArrayOfNumberOnly instantiates a new ArrayOfNumberOnly object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewArrayOfNumberOnly() *ArrayOfNumberOnly {
this := ArrayOfNumberOnly{}
return &this
}
// NewArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfNumberOnly object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewArrayOfNumberOnlyWithDefaults() *ArrayOfNumberOnly {
this := ArrayOfNumberOnly{}
return &this
}
// GetArrayNumber returns the ArrayNumber field value if set, zero value otherwise.
func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 {
if o == nil || o.ArrayNumber == nil {

View File

@ -21,6 +21,23 @@ type ArrayTest struct {
ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
}
// NewArrayTest instantiates a new ArrayTest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewArrayTest() *ArrayTest {
this := ArrayTest{}
return &this
}
// NewArrayTestWithDefaults instantiates a new ArrayTest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewArrayTestWithDefaults() *ArrayTest {
this := ArrayTest{}
return &this
}
// GetArrayOfString returns the ArrayOfString field value if set, zero value otherwise.
func (o *ArrayTest) GetArrayOfString() []string {
if o == nil || o.ArrayOfString == nil {

View File

@ -20,6 +20,23 @@ type BigCat struct {
Kind *string `json:"kind,omitempty"`
}
// NewBigCat instantiates a new BigCat object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewBigCat() *BigCat {
this := BigCat{}
return &this
}
// NewBigCatWithDefaults instantiates a new BigCat object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewBigCatWithDefaults() *BigCat {
this := BigCat{}
return &this
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *BigCat) GetKind() string {
if o == nil || o.Kind == nil {

View File

@ -19,6 +19,23 @@ type BigCatAllOf struct {
Kind *string `json:"kind,omitempty"`
}
// NewBigCatAllOf instantiates a new BigCatAllOf object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewBigCatAllOf() *BigCatAllOf {
this := BigCatAllOf{}
return &this
}
// NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewBigCatAllOfWithDefaults() *BigCatAllOf {
this := BigCatAllOf{}
return &this
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *BigCatAllOf) GetKind() string {
if o == nil || o.Kind == nil {

View File

@ -25,6 +25,23 @@ type Capitalization struct {
ATT_NAME *string `json:"ATT_NAME,omitempty"`
}
// NewCapitalization instantiates a new Capitalization object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCapitalization() *Capitalization {
this := Capitalization{}
return &this
}
// NewCapitalizationWithDefaults instantiates a new Capitalization object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCapitalizationWithDefaults() *Capitalization {
this := Capitalization{}
return &this
}
// GetSmallCamel returns the SmallCamel field value if set, zero value otherwise.
func (o *Capitalization) GetSmallCamel() string {
if o == nil || o.SmallCamel == nil {

View File

@ -20,6 +20,23 @@ type Cat struct {
Declawed *bool `json:"declawed,omitempty"`
}
// NewCat instantiates a new Cat object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCat() *Cat {
this := Cat{}
return &this
}
// NewCatWithDefaults instantiates a new Cat object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCatWithDefaults() *Cat {
this := Cat{}
return &this
}
// GetDeclawed returns the Declawed field value if set, zero value otherwise.
func (o *Cat) GetDeclawed() bool {
if o == nil || o.Declawed == nil {

View File

@ -19,6 +19,23 @@ type CatAllOf struct {
Declawed *bool `json:"declawed,omitempty"`
}
// NewCatAllOf instantiates a new CatAllOf object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCatAllOf() *CatAllOf {
this := CatAllOf{}
return &this
}
// NewCatAllOfWithDefaults instantiates a new CatAllOf object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCatAllOfWithDefaults() *CatAllOf {
this := CatAllOf{}
return &this
}
// GetDeclawed returns the Declawed field value if set, zero value otherwise.
func (o *CatAllOf) GetDeclawed() bool {
if o == nil || o.Declawed == nil {

View File

@ -20,6 +20,26 @@ type Category struct {
Name string `json:"name"`
}
// NewCategory instantiates a new Category object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCategory(name string, ) *Category {
this := Category{}
this.Name = name
return &this
}
// NewCategoryWithDefaults instantiates a new Category object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCategoryWithDefaults() *Category {
this := Category{}
var name string = "default-name"
this.Name = name
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Category) GetId() int64 {
if o == nil || o.Id == nil {

View File

@ -19,6 +19,23 @@ type ClassModel struct {
Class *string `json:"_class,omitempty"`
}
// NewClassModel instantiates a new ClassModel object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewClassModel() *ClassModel {
this := ClassModel{}
return &this
}
// NewClassModelWithDefaults instantiates a new ClassModel object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewClassModelWithDefaults() *ClassModel {
this := ClassModel{}
return &this
}
// GetClass returns the Class field value if set, zero value otherwise.
func (o *ClassModel) GetClass() string {
if o == nil || o.Class == nil {

View File

@ -19,6 +19,23 @@ type Client struct {
Client *string `json:"client,omitempty"`
}
// NewClient instantiates a new Client object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewClient() *Client {
this := Client{}
return &this
}
// NewClientWithDefaults instantiates a new Client object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewClientWithDefaults() *Client {
this := Client{}
return &this
}
// GetClient returns the Client field value if set, zero value otherwise.
func (o *Client) GetClient() string {
if o == nil || o.Client == nil {

View File

@ -20,6 +20,23 @@ type Dog struct {
Breed *string `json:"breed,omitempty"`
}
// NewDog instantiates a new Dog object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDog() *Dog {
this := Dog{}
return &this
}
// NewDogWithDefaults instantiates a new Dog object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDogWithDefaults() *Dog {
this := Dog{}
return &this
}
// GetBreed returns the Breed field value if set, zero value otherwise.
func (o *Dog) GetBreed() string {
if o == nil || o.Breed == nil {

View File

@ -19,6 +19,23 @@ type DogAllOf struct {
Breed *string `json:"breed,omitempty"`
}
// NewDogAllOf instantiates a new DogAllOf object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDogAllOf() *DogAllOf {
this := DogAllOf{}
return &this
}
// NewDogAllOfWithDefaults instantiates a new DogAllOf object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDogAllOfWithDefaults() *DogAllOf {
this := DogAllOf{}
return &this
}
// GetBreed returns the Breed field value if set, zero value otherwise.
func (o *DogAllOf) GetBreed() string {
if o == nil || o.Breed == nil {

View File

@ -20,6 +20,23 @@ type EnumArrays struct {
ArrayEnum *[]string `json:"array_enum,omitempty"`
}
// NewEnumArrays instantiates a new EnumArrays object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewEnumArrays() *EnumArrays {
this := EnumArrays{}
return &this
}
// NewEnumArraysWithDefaults instantiates a new EnumArrays object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewEnumArraysWithDefaults() *EnumArrays {
this := EnumArrays{}
return &this
}
// GetJustSymbol returns the JustSymbol field value if set, zero value otherwise.
func (o *EnumArrays) GetJustSymbol() string {
if o == nil || o.JustSymbol == nil {

View File

@ -23,6 +23,24 @@ type EnumTest struct {
OuterEnum *OuterEnum `json:"outerEnum,omitempty"`
}
// NewEnumTest instantiates a new EnumTest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewEnumTest(enumStringRequired string, ) *EnumTest {
this := EnumTest{}
this.EnumStringRequired = enumStringRequired
return &this
}
// NewEnumTestWithDefaults instantiates a new EnumTest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewEnumTestWithDefaults() *EnumTest {
this := EnumTest{}
return &this
}
// GetEnumString returns the EnumString field value if set, zero value otherwise.
func (o *EnumTest) GetEnumString() string {
if o == nil || o.EnumString == nil {

View File

@ -20,6 +20,23 @@ type File struct {
SourceURI *string `json:"sourceURI,omitempty"`
}
// NewFile instantiates a new File object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewFile() *File {
this := File{}
return &this
}
// NewFileWithDefaults instantiates a new File object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewFileWithDefaults() *File {
this := File{}
return &this
}
// GetSourceURI returns the SourceURI field value if set, zero value otherwise.
func (o *File) GetSourceURI() string {
if o == nil || o.SourceURI == nil {

View File

@ -20,6 +20,23 @@ type FileSchemaTestClass struct {
Files *[]File `json:"files,omitempty"`
}
// NewFileSchemaTestClass instantiates a new FileSchemaTestClass object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewFileSchemaTestClass() *FileSchemaTestClass {
this := FileSchemaTestClass{}
return &this
}
// NewFileSchemaTestClassWithDefaults instantiates a new FileSchemaTestClass object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewFileSchemaTestClassWithDefaults() *FileSchemaTestClass {
this := FileSchemaTestClass{}
return &this
}
// GetFile returns the File field value if set, zero value otherwise.
func (o *FileSchemaTestClass) GetFile() File {
if o == nil || o.File == nil {

View File

@ -34,6 +34,27 @@ type FormatTest struct {
BigDecimal *float64 `json:"BigDecimal,omitempty"`
}
// NewFormatTest instantiates a new FormatTest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewFormatTest(number float32, byte_ string, date string, password string, ) *FormatTest {
this := FormatTest{}
this.Number = number
this.Byte = byte_
this.Date = date
this.Password = password
return &this
}
// NewFormatTestWithDefaults instantiates a new FormatTest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewFormatTestWithDefaults() *FormatTest {
this := FormatTest{}
return &this
}
// GetInteger returns the Integer field value if set, zero value otherwise.
func (o *FormatTest) GetInteger() int32 {
if o == nil || o.Integer == nil {

View File

@ -20,6 +20,23 @@ type HasOnlyReadOnly struct {
Foo *string `json:"foo,omitempty"`
}
// NewHasOnlyReadOnly instantiates a new HasOnlyReadOnly object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewHasOnlyReadOnly() *HasOnlyReadOnly {
this := HasOnlyReadOnly{}
return &this
}
// NewHasOnlyReadOnlyWithDefaults instantiates a new HasOnlyReadOnly object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewHasOnlyReadOnlyWithDefaults() *HasOnlyReadOnly {
this := HasOnlyReadOnly{}
return &this
}
// GetBar returns the Bar field value if set, zero value otherwise.
func (o *HasOnlyReadOnly) GetBar() string {
if o == nil || o.Bar == nil {

View File

@ -19,6 +19,23 @@ type List struct {
Var123List *string `json:"123-list,omitempty"`
}
// NewList instantiates a new List object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewList() *List {
this := List{}
return &this
}
// NewListWithDefaults instantiates a new List object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewListWithDefaults() *List {
this := List{}
return &this
}
// GetVar123List returns the Var123List field value if set, zero value otherwise.
func (o *List) GetVar123List() string {
if o == nil || o.Var123List == nil {

View File

@ -22,6 +22,23 @@ type MapTest struct {
IndirectMap *map[string]bool `json:"indirect_map,omitempty"`
}
// NewMapTest instantiates a new MapTest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewMapTest() *MapTest {
this := MapTest{}
return &this
}
// NewMapTestWithDefaults instantiates a new MapTest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewMapTestWithDefaults() *MapTest {
this := MapTest{}
return &this
}
// GetMapMapOfString returns the MapMapOfString field value if set, zero value otherwise.
func (o *MapTest) GetMapMapOfString() map[string]map[string]string {
if o == nil || o.MapMapOfString == nil {

View File

@ -22,6 +22,23 @@ type MixedPropertiesAndAdditionalPropertiesClass struct {
Map *map[string]Animal `json:"map,omitempty"`
}
// NewMixedPropertiesAndAdditionalPropertiesClass instantiates a new MixedPropertiesAndAdditionalPropertiesClass object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewMixedPropertiesAndAdditionalPropertiesClass() *MixedPropertiesAndAdditionalPropertiesClass {
this := MixedPropertiesAndAdditionalPropertiesClass{}
return &this
}
// NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults instantiates a new MixedPropertiesAndAdditionalPropertiesClass object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewMixedPropertiesAndAdditionalPropertiesClassWithDefaults() *MixedPropertiesAndAdditionalPropertiesClass {
this := MixedPropertiesAndAdditionalPropertiesClass{}
return &this
}
// GetUuid returns the Uuid field value if set, zero value otherwise.
func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string {
if o == nil || o.Uuid == nil {

View File

@ -22,6 +22,24 @@ type Name struct {
Var123Number *int32 `json:"123Number,omitempty"`
}
// NewName instantiates a new Name object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewName(name int32, ) *Name {
this := Name{}
this.Name = name
return &this
}
// NewNameWithDefaults instantiates a new Name object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNameWithDefaults() *Name {
this := Name{}
return &this
}
// GetName returns the Name field value
func (o *Name) GetName() int32 {
if o == nil {

View File

@ -19,6 +19,23 @@ type NumberOnly struct {
JustNumber *float32 `json:"JustNumber,omitempty"`
}
// NewNumberOnly instantiates a new NumberOnly object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNumberOnly() *NumberOnly {
this := NumberOnly{}
return &this
}
// NewNumberOnlyWithDefaults instantiates a new NumberOnly object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNumberOnlyWithDefaults() *NumberOnly {
this := NumberOnly{}
return &this
}
// GetJustNumber returns the JustNumber field value if set, zero value otherwise.
func (o *NumberOnly) GetJustNumber() float32 {
if o == nil || o.JustNumber == nil {

View File

@ -26,6 +26,27 @@ type Order struct {
Complete *bool `json:"complete,omitempty"`
}
// NewOrder instantiates a new Order object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewOrder() *Order {
this := Order{}
var complete bool = false
this.Complete = &complete
return &this
}
// NewOrderWithDefaults instantiates a new Order object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewOrderWithDefaults() *Order {
this := Order{}
var complete bool = false
this.Complete = &complete
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Order) GetId() int64 {
if o == nil || o.Id == nil {

View File

@ -21,6 +21,23 @@ type OuterComposite struct {
MyBoolean *bool `json:"my_boolean,omitempty"`
}
// NewOuterComposite instantiates a new OuterComposite object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewOuterComposite() *OuterComposite {
this := OuterComposite{}
return &this
}
// NewOuterCompositeWithDefaults instantiates a new OuterComposite object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewOuterCompositeWithDefaults() *OuterComposite {
this := OuterComposite{}
return &this
}
// GetMyNumber returns the MyNumber field value if set, zero value otherwise.
func (o *OuterComposite) GetMyNumber() float32 {
if o == nil || o.MyNumber == nil {

View File

@ -25,6 +25,25 @@ type Pet struct {
Status *string `json:"status,omitempty"`
}
// NewPet instantiates a new Pet object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewPet(name string, photoUrls []string, ) *Pet {
this := Pet{}
this.Name = name
this.PhotoUrls = photoUrls
return &this
}
// NewPetWithDefaults instantiates a new Pet object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewPetWithDefaults() *Pet {
this := Pet{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Pet) GetId() int64 {
if o == nil || o.Id == nil {

View File

@ -20,6 +20,23 @@ type ReadOnlyFirst struct {
Baz *string `json:"baz,omitempty"`
}
// NewReadOnlyFirst instantiates a new ReadOnlyFirst object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewReadOnlyFirst() *ReadOnlyFirst {
this := ReadOnlyFirst{}
return &this
}
// NewReadOnlyFirstWithDefaults instantiates a new ReadOnlyFirst object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewReadOnlyFirstWithDefaults() *ReadOnlyFirst {
this := ReadOnlyFirst{}
return &this
}
// GetBar returns the Bar field value if set, zero value otherwise.
func (o *ReadOnlyFirst) GetBar() string {
if o == nil || o.Bar == nil {

View File

@ -19,6 +19,23 @@ type Return struct {
Return *int32 `json:"return,omitempty"`
}
// NewReturn instantiates a new Return object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewReturn() *Return {
this := Return{}
return &this
}
// NewReturnWithDefaults instantiates a new Return object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewReturnWithDefaults() *Return {
this := Return{}
return &this
}
// GetReturn returns the Return field value if set, zero value otherwise.
func (o *Return) GetReturn() int32 {
if o == nil || o.Return == nil {

View File

@ -19,6 +19,23 @@ type SpecialModelName struct {
SpecialPropertyName *int64 `json:"$special[property.name],omitempty"`
}
// NewSpecialModelName instantiates a new SpecialModelName object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewSpecialModelName() *SpecialModelName {
this := SpecialModelName{}
return &this
}
// NewSpecialModelNameWithDefaults instantiates a new SpecialModelName object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewSpecialModelNameWithDefaults() *SpecialModelName {
this := SpecialModelName{}
return &this
}
// GetSpecialPropertyName returns the SpecialPropertyName field value if set, zero value otherwise.
func (o *SpecialModelName) GetSpecialPropertyName() int64 {
if o == nil || o.SpecialPropertyName == nil {

View File

@ -20,6 +20,23 @@ type Tag struct {
Name *string `json:"name,omitempty"`
}
// NewTag instantiates a new Tag object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewTag() *Tag {
this := Tag{}
return &this
}
// NewTagWithDefaults instantiates a new Tag object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewTagWithDefaults() *Tag {
this := Tag{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Tag) GetId() int64 {
if o == nil || o.Id == nil {

View File

@ -23,6 +23,32 @@ type TypeHolderDefault struct {
ArrayItem []int32 `json:"array_item"`
}
// NewTypeHolderDefault instantiates a new TypeHolderDefault object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewTypeHolderDefault(stringItem string, numberItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderDefault {
this := TypeHolderDefault{}
this.StringItem = stringItem
this.NumberItem = numberItem
this.IntegerItem = integerItem
this.BoolItem = boolItem
this.ArrayItem = arrayItem
return &this
}
// NewTypeHolderDefaultWithDefaults instantiates a new TypeHolderDefault object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewTypeHolderDefaultWithDefaults() *TypeHolderDefault {
this := TypeHolderDefault{}
var stringItem string = "what"
this.StringItem = stringItem
var boolItem bool = true
this.BoolItem = boolItem
return &this
}
// GetStringItem returns the StringItem field value
func (o *TypeHolderDefault) GetStringItem() string {
if o == nil {

View File

@ -24,6 +24,29 @@ type TypeHolderExample struct {
ArrayItem []int32 `json:"array_item"`
}
// NewTypeHolderExample instantiates a new TypeHolderExample object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewTypeHolderExample(stringItem string, numberItem float32, floatItem float32, integerItem int32, boolItem bool, arrayItem []int32, ) *TypeHolderExample {
this := TypeHolderExample{}
this.StringItem = stringItem
this.NumberItem = numberItem
this.FloatItem = floatItem
this.IntegerItem = integerItem
this.BoolItem = boolItem
this.ArrayItem = arrayItem
return &this
}
// NewTypeHolderExampleWithDefaults instantiates a new TypeHolderExample object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewTypeHolderExampleWithDefaults() *TypeHolderExample {
this := TypeHolderExample{}
return &this
}
// GetStringItem returns the StringItem field value
func (o *TypeHolderExample) GetStringItem() string {
if o == nil {

View File

@ -27,6 +27,23 @@ type User struct {
UserStatus *int32 `json:"userStatus,omitempty"`
}
// NewUser instantiates a new User object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewUser() *User {
this := User{}
return &this
}
// NewUserWithDefaults instantiates a new User object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewUserWithDefaults() *User {
this := User{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *User) GetId() int64 {
if o == nil || o.Id == nil {

View File

@ -47,6 +47,23 @@ type XmlItem struct {
PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty"`
}
// NewXmlItem instantiates a new XmlItem object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewXmlItem() *XmlItem {
this := XmlItem{}
return &this
}
// NewXmlItemWithDefaults instantiates a new XmlItem object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewXmlItemWithDefaults() *XmlItem {
this := XmlItem{}
return &this
}
// GetAttributeString returns the AttributeString field value if set, zero value otherwise.
func (o *XmlItem) GetAttributeString() string {
if o == nil || o.AttributeString == nil {

View File

@ -9,6 +9,23 @@ Name | Type | Description | Notes
## Methods
### NewAdditionalPropertiesClass
`func NewAdditionalPropertiesClass() *AdditionalPropertiesClass`
NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAdditionalPropertiesClassWithDefaults
`func NewAdditionalPropertiesClassWithDefaults() *AdditionalPropertiesClass`
NewAdditionalPropertiesClassWithDefaults instantiates a new AdditionalPropertiesClass object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetMapProperty
`func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string`

View File

@ -5,10 +5,27 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | Pointer to **string** | |
**Color** | Pointer to **string** | | [optional] [default to red]
**Color** | Pointer to **string** | | [optional] [default to "red"]
## Methods
### NewAnimal
`func NewAnimal(className string, ) *Animal`
NewAnimal instantiates a new Animal object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAnimalWithDefaults
`func NewAnimalWithDefaults() *Animal`
NewAnimalWithDefaults instantiates a new Animal object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetClassName
`func (o *Animal) GetClassName() string`

View File

@ -10,6 +10,23 @@ Name | Type | Description | Notes
## Methods
### NewApiResponse
`func NewApiResponse() *ApiResponse`
NewApiResponse instantiates a new ApiResponse object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewApiResponseWithDefaults
`func NewApiResponseWithDefaults() *ApiResponse`
NewApiResponseWithDefaults instantiates a new ApiResponse object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCode
`func (o *ApiResponse) GetCode() int32`

View File

@ -8,6 +8,23 @@ Name | Type | Description | Notes
## Methods
### NewArrayOfArrayOfNumberOnly
`func NewArrayOfArrayOfNumberOnly() *ArrayOfArrayOfNumberOnly`
NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewArrayOfArrayOfNumberOnlyWithDefaults
`func NewArrayOfArrayOfNumberOnlyWithDefaults() *ArrayOfArrayOfNumberOnly`
NewArrayOfArrayOfNumberOnlyWithDefaults instantiates a new ArrayOfArrayOfNumberOnly object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetArrayArrayNumber
`func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32`

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