Allow retrieving the underlying configuration for APIClient (#4195)

This commit is contained in:
William Cheng 2019-10-21 16:14:00 +08:00 committed by GitHub
parent ba04939c7a
commit 90c7f53a1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
58 changed files with 1941 additions and 1874 deletions

View File

@ -169,6 +169,12 @@ func (c *APIClient) ChangeBasePath(path string) {
c.cfg.BasePath = path c.cfg.BasePath = path
} }
// Allow modification of underlying config for alternate implementations and testing
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
func (c *APIClient) GetConfig() *Configuration {
return c.cfg
}
// prepareRequest build the request // prepareRequest build the request
func (c *APIClient) prepareRequest( func (c *APIClient) prepareRequest(
ctx context.Context, ctx context.Context,

View File

@ -180,6 +180,12 @@ func (c *APIClient) ChangeBasePath(path string) {
c.cfg.BasePath = path c.cfg.BasePath = path
} }
// Allow modification of underlying config for alternate implementations and testing
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
func (c *APIClient) GetConfig() *Configuration {
return c.cfg
}
// prepareRequest build the request // prepareRequest build the request
func (c *APIClient) prepareRequest( func (c *APIClient) prepareRequest(
ctx context.Context, ctx context.Context,

View File

@ -183,6 +183,12 @@ func (c *APIClient) ChangeBasePath(path string) {
c.cfg.BasePath = path c.cfg.BasePath = path
} }
// Allow modification of underlying config for alternate implementations and testing
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
func (c *APIClient) GetConfig() *Configuration {
return c.cfg
}
// prepareRequest build the request // prepareRequest build the request
func (c *APIClient) prepareRequest( func (c *APIClient) prepareRequest(
ctx context.Context, ctx context.Context,

View File

@ -8,7 +8,7 @@ Name | Type | Description | Notes
**EnumStringRequired** | Pointer to **string** | | **EnumStringRequired** | Pointer to **string** | |
**EnumInteger** | Pointer to **int32** | | [optional] **EnumInteger** | Pointer to **int32** | | [optional]
**EnumNumber** | Pointer to **float64** | | [optional] **EnumNumber** | Pointer to **float64** | | [optional]
**OuterEnum** | Pointer to [**OuterEnum**](OuterEnum.md) | | [optional] **OuterEnum** | Pointer to [**NullableOuterEnum**](OuterEnum.md) | | [optional]
**OuterEnumInteger** | Pointer to [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] **OuterEnumInteger** | Pointer to [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
**OuterEnumDefaultValue** | Pointer to [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] **OuterEnumDefaultValue** | Pointer to [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
**OuterEnumIntegerDefaultValue** | Pointer to [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] **OuterEnumIntegerDefaultValue** | Pointer to [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
@ -117,13 +117,13 @@ SetEnumNumber gets a reference to the given float64 and assigns it to the EnumNu
### GetOuterEnum ### GetOuterEnum
`func (o *EnumTest) GetOuterEnum() OuterEnum` `func (o *EnumTest) GetOuterEnum() NullableOuterEnum`
GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise.
### GetOuterEnumOk ### GetOuterEnumOk
`func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool)` `func (o *EnumTest) GetOuterEnumOk() (NullableOuterEnum, bool)`
GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -136,9 +136,9 @@ HasOuterEnum returns a boolean if a field has been set.
### SetOuterEnum ### SetOuterEnum
`func (o *EnumTest) SetOuterEnum(v OuterEnum)` `func (o *EnumTest) SetOuterEnum(v NullableOuterEnum)`
SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. SetOuterEnum gets a reference to the given NullableOuterEnum and assigns it to the OuterEnum field.
### SetOuterEnumExplicitNull ### SetOuterEnumExplicitNull

View File

@ -4,19 +4,19 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**NullableMessage** | Pointer to **string** | | [optional] **NullableMessage** | Pointer to **NullableString** | | [optional]
## Methods ## Methods
### GetNullableMessage ### GetNullableMessage
`func (o *HealthCheckResult) GetNullableMessage() string` `func (o *HealthCheckResult) GetNullableMessage() NullableString`
GetNullableMessage returns the NullableMessage field if non-nil, zero value otherwise. GetNullableMessage returns the NullableMessage field if non-nil, zero value otherwise.
### GetNullableMessageOk ### GetNullableMessageOk
`func (o *HealthCheckResult) GetNullableMessageOk() (string, bool)` `func (o *HealthCheckResult) GetNullableMessageOk() (NullableString, bool)`
GetNullableMessageOk returns a tuple with the NullableMessage field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -29,9 +29,9 @@ HasNullableMessage returns a boolean if a field has been set.
### SetNullableMessage ### SetNullableMessage
`func (o *HealthCheckResult) SetNullableMessage(v string)` `func (o *HealthCheckResult) SetNullableMessage(v NullableString)`
SetNullableMessage gets a reference to the given string and assigns it to the NullableMessage field. SetNullableMessage gets a reference to the given NullableString and assigns it to the NullableMessage field.
### SetNullableMessageExplicitNull ### SetNullableMessageExplicitNull

View File

@ -4,30 +4,30 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**IntegerProp** | Pointer to **int32** | | [optional] **IntegerProp** | Pointer to **NullableInt32** | | [optional]
**NumberProp** | Pointer to **float32** | | [optional] **NumberProp** | Pointer to **NullableFloat32** | | [optional]
**BooleanProp** | Pointer to **bool** | | [optional] **BooleanProp** | Pointer to **NullableBool** | | [optional]
**StringProp** | Pointer to **string** | | [optional] **StringProp** | Pointer to **NullableString** | | [optional]
**DateProp** | Pointer to **string** | | [optional] **DateProp** | Pointer to **NullableString** | | [optional]
**DatetimeProp** | Pointer to [**time.Time**](time.Time.md) | | [optional] **DatetimeProp** | Pointer to [**NullableTime.Time**](time.Time.md) | | [optional]
**ArrayNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] **ArrayNullableProp** | Pointer to [**Nullable[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
**ArrayAndItemsNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] **ArrayAndItemsNullableProp** | Pointer to [**Nullable[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
**ArrayItemsNullable** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional] **ArrayItemsNullable** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
**ObjectNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] **ObjectNullableProp** | Pointer to [**NullableMap[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
**ObjectAndItemsNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] **ObjectAndItemsNullableProp** | Pointer to [**NullableMap[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
**ObjectItemsNullable** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional] **ObjectItemsNullable** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
## Methods ## Methods
### GetIntegerProp ### GetIntegerProp
`func (o *NullableClass) GetIntegerProp() int32` `func (o *NullableClass) GetIntegerProp() NullableInt32`
GetIntegerProp returns the IntegerProp field if non-nil, zero value otherwise. GetIntegerProp returns the IntegerProp field if non-nil, zero value otherwise.
### GetIntegerPropOk ### GetIntegerPropOk
`func (o *NullableClass) GetIntegerPropOk() (int32, bool)` `func (o *NullableClass) GetIntegerPropOk() (NullableInt32, bool)`
GetIntegerPropOk returns a tuple with the IntegerProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -40,9 +40,9 @@ HasIntegerProp returns a boolean if a field has been set.
### SetIntegerProp ### SetIntegerProp
`func (o *NullableClass) SetIntegerProp(v int32)` `func (o *NullableClass) SetIntegerProp(v NullableInt32)`
SetIntegerProp gets a reference to the given int32 and assigns it to the IntegerProp field. SetIntegerProp gets a reference to the given NullableInt32 and assigns it to the IntegerProp field.
### SetIntegerPropExplicitNull ### SetIntegerPropExplicitNull
@ -53,13 +53,13 @@ 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 The IntegerProp value is set to nil even if false is passed
### GetNumberProp ### GetNumberProp
`func (o *NullableClass) GetNumberProp() float32` `func (o *NullableClass) GetNumberProp() NullableFloat32`
GetNumberProp returns the NumberProp field if non-nil, zero value otherwise. GetNumberProp returns the NumberProp field if non-nil, zero value otherwise.
### GetNumberPropOk ### GetNumberPropOk
`func (o *NullableClass) GetNumberPropOk() (float32, bool)` `func (o *NullableClass) GetNumberPropOk() (NullableFloat32, bool)`
GetNumberPropOk returns a tuple with the NumberProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -72,9 +72,9 @@ HasNumberProp returns a boolean if a field has been set.
### SetNumberProp ### SetNumberProp
`func (o *NullableClass) SetNumberProp(v float32)` `func (o *NullableClass) SetNumberProp(v NullableFloat32)`
SetNumberProp gets a reference to the given float32 and assigns it to the NumberProp field. SetNumberProp gets a reference to the given NullableFloat32 and assigns it to the NumberProp field.
### SetNumberPropExplicitNull ### SetNumberPropExplicitNull
@ -85,13 +85,13 @@ 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 The NumberProp value is set to nil even if false is passed
### GetBooleanProp ### GetBooleanProp
`func (o *NullableClass) GetBooleanProp() bool` `func (o *NullableClass) GetBooleanProp() NullableBool`
GetBooleanProp returns the BooleanProp field if non-nil, zero value otherwise. GetBooleanProp returns the BooleanProp field if non-nil, zero value otherwise.
### GetBooleanPropOk ### GetBooleanPropOk
`func (o *NullableClass) GetBooleanPropOk() (bool, bool)` `func (o *NullableClass) GetBooleanPropOk() (NullableBool, bool)`
GetBooleanPropOk returns a tuple with the BooleanProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -104,9 +104,9 @@ HasBooleanProp returns a boolean if a field has been set.
### SetBooleanProp ### SetBooleanProp
`func (o *NullableClass) SetBooleanProp(v bool)` `func (o *NullableClass) SetBooleanProp(v NullableBool)`
SetBooleanProp gets a reference to the given bool and assigns it to the BooleanProp field. SetBooleanProp gets a reference to the given NullableBool and assigns it to the BooleanProp field.
### SetBooleanPropExplicitNull ### SetBooleanPropExplicitNull
@ -117,13 +117,13 @@ 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 The BooleanProp value is set to nil even if false is passed
### GetStringProp ### GetStringProp
`func (o *NullableClass) GetStringProp() string` `func (o *NullableClass) GetStringProp() NullableString`
GetStringProp returns the StringProp field if non-nil, zero value otherwise. GetStringProp returns the StringProp field if non-nil, zero value otherwise.
### GetStringPropOk ### GetStringPropOk
`func (o *NullableClass) GetStringPropOk() (string, bool)` `func (o *NullableClass) GetStringPropOk() (NullableString, bool)`
GetStringPropOk returns a tuple with the StringProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -136,9 +136,9 @@ HasStringProp returns a boolean if a field has been set.
### SetStringProp ### SetStringProp
`func (o *NullableClass) SetStringProp(v string)` `func (o *NullableClass) SetStringProp(v NullableString)`
SetStringProp gets a reference to the given string and assigns it to the StringProp field. SetStringProp gets a reference to the given NullableString and assigns it to the StringProp field.
### SetStringPropExplicitNull ### SetStringPropExplicitNull
@ -149,13 +149,13 @@ 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 The StringProp value is set to nil even if false is passed
### GetDateProp ### GetDateProp
`func (o *NullableClass) GetDateProp() string` `func (o *NullableClass) GetDateProp() NullableString`
GetDateProp returns the DateProp field if non-nil, zero value otherwise. GetDateProp returns the DateProp field if non-nil, zero value otherwise.
### GetDatePropOk ### GetDatePropOk
`func (o *NullableClass) GetDatePropOk() (string, bool)` `func (o *NullableClass) GetDatePropOk() (NullableString, bool)`
GetDatePropOk returns a tuple with the DateProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -168,9 +168,9 @@ HasDateProp returns a boolean if a field has been set.
### SetDateProp ### SetDateProp
`func (o *NullableClass) SetDateProp(v string)` `func (o *NullableClass) SetDateProp(v NullableString)`
SetDateProp gets a reference to the given string and assigns it to the DateProp field. SetDateProp gets a reference to the given NullableString and assigns it to the DateProp field.
### SetDatePropExplicitNull ### SetDatePropExplicitNull
@ -181,13 +181,13 @@ 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 The DateProp value is set to nil even if false is passed
### GetDatetimeProp ### GetDatetimeProp
`func (o *NullableClass) GetDatetimeProp() time.Time` `func (o *NullableClass) GetDatetimeProp() NullableTime.Time`
GetDatetimeProp returns the DatetimeProp field if non-nil, zero value otherwise. GetDatetimeProp returns the DatetimeProp field if non-nil, zero value otherwise.
### GetDatetimePropOk ### GetDatetimePropOk
`func (o *NullableClass) GetDatetimePropOk() (time.Time, bool)` `func (o *NullableClass) GetDatetimePropOk() (NullableTime.Time, bool)`
GetDatetimePropOk returns a tuple with the DatetimeProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -200,9 +200,9 @@ HasDatetimeProp returns a boolean if a field has been set.
### SetDatetimeProp ### SetDatetimeProp
`func (o *NullableClass) SetDatetimeProp(v time.Time)` `func (o *NullableClass) SetDatetimeProp(v NullableTime.Time)`
SetDatetimeProp gets a reference to the given time.Time and assigns it to the DatetimeProp field. SetDatetimeProp gets a reference to the given NullableTime.Time and assigns it to the DatetimeProp field.
### SetDatetimePropExplicitNull ### SetDatetimePropExplicitNull
@ -213,13 +213,13 @@ 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 The DatetimeProp value is set to nil even if false is passed
### GetArrayNullableProp ### GetArrayNullableProp
`func (o *NullableClass) GetArrayNullableProp() []map[string]interface{}` `func (o *NullableClass) GetArrayNullableProp() Nullable[]map[string]interface{}`
GetArrayNullableProp returns the ArrayNullableProp field if non-nil, zero value otherwise. GetArrayNullableProp returns the ArrayNullableProp field if non-nil, zero value otherwise.
### GetArrayNullablePropOk ### GetArrayNullablePropOk
`func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool)` `func (o *NullableClass) GetArrayNullablePropOk() (Nullable[]map[string]interface{}, bool)`
GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -232,9 +232,9 @@ HasArrayNullableProp returns a boolean if a field has been set.
### SetArrayNullableProp ### SetArrayNullableProp
`func (o *NullableClass) SetArrayNullableProp(v []map[string]interface{})` `func (o *NullableClass) SetArrayNullableProp(v Nullable[]map[string]interface{})`
SetArrayNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayNullableProp field. SetArrayNullableProp gets a reference to the given Nullable[]map[string]interface{} and assigns it to the ArrayNullableProp field.
### SetArrayNullablePropExplicitNull ### SetArrayNullablePropExplicitNull
@ -245,13 +245,13 @@ 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 The ArrayNullableProp value is set to nil even if false is passed
### GetArrayAndItemsNullableProp ### GetArrayAndItemsNullableProp
`func (o *NullableClass) GetArrayAndItemsNullableProp() []map[string]interface{}` `func (o *NullableClass) GetArrayAndItemsNullableProp() Nullable[]map[string]interface{}`
GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field if non-nil, zero value otherwise. GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field if non-nil, zero value otherwise.
### GetArrayAndItemsNullablePropOk ### GetArrayAndItemsNullablePropOk
`func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]map[string]interface{}, bool)` `func (o *NullableClass) GetArrayAndItemsNullablePropOk() (Nullable[]map[string]interface{}, bool)`
GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -264,9 +264,9 @@ HasArrayAndItemsNullableProp returns a boolean if a field has been set.
### SetArrayAndItemsNullableProp ### SetArrayAndItemsNullableProp
`func (o *NullableClass) SetArrayAndItemsNullableProp(v []map[string]interface{})` `func (o *NullableClass) SetArrayAndItemsNullableProp(v Nullable[]map[string]interface{})`
SetArrayAndItemsNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field. SetArrayAndItemsNullableProp gets a reference to the given Nullable[]map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field.
### SetArrayAndItemsNullablePropExplicitNull ### SetArrayAndItemsNullablePropExplicitNull
@ -302,13 +302,13 @@ SetArrayItemsNullable gets a reference to the given []map[string]interface{} and
### GetObjectNullableProp ### GetObjectNullableProp
`func (o *NullableClass) GetObjectNullableProp() map[string]map[string]interface{}` `func (o *NullableClass) GetObjectNullableProp() NullableMap[string]map[string]interface{}`
GetObjectNullableProp returns the ObjectNullableProp field if non-nil, zero value otherwise. GetObjectNullableProp returns the ObjectNullableProp field if non-nil, zero value otherwise.
### GetObjectNullablePropOk ### GetObjectNullablePropOk
`func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool)` `func (o *NullableClass) GetObjectNullablePropOk() (NullableMap[string]map[string]interface{}, bool)`
GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -321,9 +321,9 @@ HasObjectNullableProp returns a boolean if a field has been set.
### SetObjectNullableProp ### SetObjectNullableProp
`func (o *NullableClass) SetObjectNullableProp(v map[string]map[string]interface{})` `func (o *NullableClass) SetObjectNullableProp(v NullableMap[string]map[string]interface{})`
SetObjectNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectNullableProp field. SetObjectNullableProp gets a reference to the given NullableMap[string]map[string]interface{} and assigns it to the ObjectNullableProp field.
### SetObjectNullablePropExplicitNull ### SetObjectNullablePropExplicitNull
@ -334,13 +334,13 @@ 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 The ObjectNullableProp value is set to nil even if false is passed
### GetObjectAndItemsNullableProp ### GetObjectAndItemsNullableProp
`func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]interface{}` `func (o *NullableClass) GetObjectAndItemsNullableProp() NullableMap[string]map[string]interface{}`
GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field if non-nil, zero value otherwise. GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field if non-nil, zero value otherwise.
### GetObjectAndItemsNullablePropOk ### GetObjectAndItemsNullablePropOk
`func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool)` `func (o *NullableClass) GetObjectAndItemsNullablePropOk() (NullableMap[string]map[string]interface{}, bool)`
GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field if it's non-nil, zero value otherwise 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. and a boolean to check if the value has been set.
@ -353,9 +353,9 @@ HasObjectAndItemsNullableProp returns a boolean if a field has been set.
### SetObjectAndItemsNullableProp ### SetObjectAndItemsNullableProp
`func (o *NullableClass) SetObjectAndItemsNullableProp(v map[string]map[string]interface{})` `func (o *NullableClass) SetObjectAndItemsNullableProp(v NullableMap[string]map[string]interface{})`
SetObjectAndItemsNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field. SetObjectAndItemsNullableProp gets a reference to the given NullableMap[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field.
### SetObjectAndItemsNullablePropExplicitNull ### SetObjectAndItemsNullablePropExplicitNull

View File

@ -1,6 +1,8 @@
module github.com/GIT_USER_ID/GIT_REPO_ID module github.com/GIT_USER_ID/GIT_REPO_ID
go 1.13
require ( require (
github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6 github.com/antihax/optional v1.0.0
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
) )

View File

@ -1,11 +1,15 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/antihax/optional v0.0.0-20180406194304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

View File

@ -8,18 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// Model200Response Model for testing model name starting with number // Model200Response Model for testing model name starting with number
type Model200Response struct { type Model200Response struct {
Name *int32 `json:"name,omitempty"` Name *int32 `json:"name,omitempty"`
Class *string `json:"class,omitempty"` Class *string `json:"class,omitempty"`
} }
// GetName returns the Name field if non-nil, zero value otherwise. // GetName returns the Name field value if set, zero value otherwise.
func (o *Model200Response) GetName() int32 { func (o *Model200Response) GetName() int32 {
if o == nil || o.Name == nil { if o == nil || o.Name == nil {
var ret int32 var ret int32
@ -28,7 +29,7 @@ func (o *Model200Response) GetName() int32 {
return *o.Name return *o.Name
} }
// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // GetNameOk returns a tuple with the Name field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Name == nil {
@ -52,7 +53,7 @@ func (o *Model200Response) SetName(v int32) {
o.Name = &v o.Name = &v
} }
// GetClass returns the Class field if non-nil, zero value otherwise. // GetClass returns the Class field value if set, zero value otherwise.
func (o *Model200Response) GetClass() string { func (o *Model200Response) GetClass() string {
if o == nil || o.Class == nil { if o == nil || o.Class == nil {
var ret string var ret string
@ -61,7 +62,7 @@ func (o *Model200Response) GetClass() string {
return *o.Class return *o.Class
} }
// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise // GetClassOk returns a tuple with the Class field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Class == nil {
@ -85,17 +86,26 @@ func (o *Model200Response) SetClass(v string) {
o.Class = &v o.Class = &v
} }
type NullableModel200Response struct {
// MarshalJSON returns the JSON representation of the model. Value Model200Response
func (o Model200Response) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Class != nil {
toSerialize["class"] = o.Class
}
return json.Marshal(toSerialize)
} }
func (v NullableModel200Response) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// SpecialModelName struct for SpecialModelName // SpecialModelName struct for SpecialModelName
type SpecialModelName struct { type SpecialModelName struct {
SpecialPropertyName *int64 `json:"$special[property.name],omitempty"` SpecialPropertyName *int64 `json:"$special[property.name],omitempty"`
} }
// GetSpecialPropertyName returns the SpecialPropertyName field if non-nil, zero value otherwise. // GetSpecialPropertyName returns the SpecialPropertyName field value if set, zero value otherwise.
func (o *SpecialModelName) GetSpecialPropertyName() int64 { func (o *SpecialModelName) GetSpecialPropertyName() int64 {
if o == nil || o.SpecialPropertyName == nil { if o == nil || o.SpecialPropertyName == nil {
var ret int64 var ret int64
@ -26,7 +28,7 @@ func (o *SpecialModelName) GetSpecialPropertyName() int64 {
return *o.SpecialPropertyName return *o.SpecialPropertyName
} }
// GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field if it's non-nil, zero value otherwise // GetSpecialPropertyNameOk returns a tuple with the SpecialPropertyName field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.SpecialPropertyName == nil {
@ -50,14 +52,26 @@ func (o *SpecialModelName) SetSpecialPropertyName(v int64) {
o.SpecialPropertyName = &v o.SpecialPropertyName = &v
} }
type NullableSpecialModelName struct {
// MarshalJSON returns the JSON representation of the model. Value SpecialModelName
func (o SpecialModelName) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.SpecialPropertyName != nil {
toSerialize["$special[property.name]"] = o.SpecialPropertyName
}
return json.Marshal(toSerialize)
} }
func (v NullableSpecialModelName) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,18 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// AdditionalPropertiesClass struct for AdditionalPropertiesClass // AdditionalPropertiesClass struct for AdditionalPropertiesClass
type AdditionalPropertiesClass struct { type AdditionalPropertiesClass struct {
MapProperty *map[string]string `json:"map_property,omitempty"` MapProperty *map[string]string `json:"map_property,omitempty"`
MapOfMapProperty *map[string]map[string]string `json:"map_of_map_property,omitempty"` MapOfMapProperty *map[string]map[string]string `json:"map_of_map_property,omitempty"`
} }
// GetMapProperty returns the MapProperty field if non-nil, zero value otherwise. // GetMapProperty returns the MapProperty field value if set, zero value otherwise.
func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string { func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string {
if o == nil || o.MapProperty == nil { if o == nil || o.MapProperty == nil {
var ret map[string]string var ret map[string]string
@ -28,7 +29,7 @@ func (o *AdditionalPropertiesClass) GetMapProperty() map[string]string {
return *o.MapProperty return *o.MapProperty
} }
// GetMapPropertyOk returns a tuple with the MapProperty field if it's non-nil, zero value otherwise // GetMapPropertyOk returns a tuple with the MapProperty field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.MapProperty == nil {
@ -52,7 +53,7 @@ func (o *AdditionalPropertiesClass) SetMapProperty(v map[string]string) {
o.MapProperty = &v o.MapProperty = &v
} }
// GetMapOfMapProperty returns the MapOfMapProperty field if non-nil, zero value otherwise. // GetMapOfMapProperty returns the MapOfMapProperty field value if set, zero value otherwise.
func (o *AdditionalPropertiesClass) GetMapOfMapProperty() map[string]map[string]string { func (o *AdditionalPropertiesClass) GetMapOfMapProperty() map[string]map[string]string {
if o == nil || o.MapOfMapProperty == nil { if o == nil || o.MapOfMapProperty == nil {
var ret map[string]map[string]string var ret map[string]map[string]string
@ -61,7 +62,7 @@ func (o *AdditionalPropertiesClass) GetMapOfMapProperty() map[string]map[string]
return *o.MapOfMapProperty return *o.MapOfMapProperty
} }
// GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field if it's non-nil, zero value otherwise // GetMapOfMapPropertyOk returns a tuple with the MapOfMapProperty field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.MapOfMapProperty == nil {
@ -85,17 +86,26 @@ func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string]
o.MapOfMapProperty = &v o.MapOfMapProperty = &v
} }
type NullableAdditionalPropertiesClass struct {
// MarshalJSON returns the JSON representation of the model. Value AdditionalPropertiesClass
func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableAdditionalPropertiesClass) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,52 +8,34 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
"errors"
) )
// Animal struct for Animal // Animal struct for Animal
type Animal struct { type Animal struct {
ClassName *string `json:"className,omitempty"` ClassName string `json:"className"`
Color *string `json:"color,omitempty"` Color *string `json:"color,omitempty"`
} }
// GetClassName returns the ClassName field if non-nil, zero value otherwise. // GetClassName returns the ClassName field value
func (o *Animal) GetClassName() string { func (o *Animal) GetClassName() string {
if o == nil || o.ClassName == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.ClassName
return o.ClassName
} }
// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise // SetClassName sets field value
// and a boolean to check if the value has been set.
func (o *Animal) GetClassNameOk() (string, bool) {
if o == nil || o.ClassName == nil {
var ret string
return ret, false
}
return *o.ClassName, true
}
// HasClassName returns a boolean if a field has been set.
func (o *Animal) HasClassName() bool {
if o != nil && o.ClassName != nil {
return true
}
return false
}
// SetClassName gets a reference to the given string and assigns it to the ClassName field.
func (o *Animal) SetClassName(v string) { func (o *Animal) SetClassName(v string) {
o.ClassName = &v o.ClassName = v
} }
// GetColor returns the Color field if non-nil, zero value otherwise. // GetColor returns the Color field value if set, zero value otherwise.
func (o *Animal) GetColor() string { func (o *Animal) GetColor() string {
if o == nil || o.Color == nil { if o == nil || o.Color == nil {
var ret string var ret string
@ -62,7 +44,7 @@ func (o *Animal) GetColor() string {
return *o.Color return *o.Color
} }
// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise // GetColorOk returns a tuple with the Color field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Color == nil {
@ -86,20 +68,26 @@ func (o *Animal) SetColor(v string) {
o.Color = &v o.Color = &v
} }
type NullableAnimal struct {
// MarshalJSON returns the JSON representation of the model. Value Animal
func (o Animal) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.ClassName == nil {
return nil, errors.New("ClassName is required and not nullable, but was not set on Animal")
}
if o.ClassName != nil {
toSerialize["className"] = o.ClassName
}
if o.Color != nil {
toSerialize["color"] = o.Color
}
return json.Marshal(toSerialize)
} }
func (v NullableAnimal) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,20 +8,20 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// ApiResponse struct for ApiResponse // ApiResponse struct for ApiResponse
type ApiResponse struct { type ApiResponse struct {
Code *int32 `json:"code,omitempty"` Code *int32 `json:"code,omitempty"`
Type *string `json:"type,omitempty"` Type *string `json:"type,omitempty"`
Message *string `json:"message,omitempty"` Message *string `json:"message,omitempty"`
} }
// GetCode returns the Code field if non-nil, zero value otherwise. // GetCode returns the Code field value if set, zero value otherwise.
func (o *ApiResponse) GetCode() int32 { func (o *ApiResponse) GetCode() int32 {
if o == nil || o.Code == nil { if o == nil || o.Code == nil {
var ret int32 var ret int32
@ -30,7 +30,7 @@ func (o *ApiResponse) GetCode() int32 {
return *o.Code return *o.Code
} }
// GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise // GetCodeOk returns a tuple with the Code field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Code == nil {
@ -54,7 +54,7 @@ func (o *ApiResponse) SetCode(v int32) {
o.Code = &v o.Code = &v
} }
// GetType returns the Type field if non-nil, zero value otherwise. // GetType returns the Type field value if set, zero value otherwise.
func (o *ApiResponse) GetType() string { func (o *ApiResponse) GetType() string {
if o == nil || o.Type == nil { if o == nil || o.Type == nil {
var ret string var ret string
@ -63,7 +63,7 @@ func (o *ApiResponse) GetType() string {
return *o.Type return *o.Type
} }
// GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise // GetTypeOk returns a tuple with the Type field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Type == nil {
@ -87,7 +87,7 @@ func (o *ApiResponse) SetType(v string) {
o.Type = &v o.Type = &v
} }
// GetMessage returns the Message field if non-nil, zero value otherwise. // GetMessage returns the Message field value if set, zero value otherwise.
func (o *ApiResponse) GetMessage() string { func (o *ApiResponse) GetMessage() string {
if o == nil || o.Message == nil { if o == nil || o.Message == nil {
var ret string var ret string
@ -96,7 +96,7 @@ func (o *ApiResponse) GetMessage() string {
return *o.Message return *o.Message
} }
// GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise // GetMessageOk returns a tuple with the Message field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Message == nil {
@ -120,20 +120,26 @@ func (o *ApiResponse) SetMessage(v string) {
o.Message = &v o.Message = &v
} }
type NullableApiResponse struct {
// MarshalJSON returns the JSON representation of the model. Value ApiResponse
func (o ApiResponse) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableApiResponse) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly // ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly
type ArrayOfArrayOfNumberOnly struct { type ArrayOfArrayOfNumberOnly struct {
ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"` ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"`
} }
// GetArrayArrayNumber returns the ArrayArrayNumber field if non-nil, zero value otherwise. // GetArrayArrayNumber returns the ArrayArrayNumber field value if set, zero value otherwise.
func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 { func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 {
if o == nil || o.ArrayArrayNumber == nil { if o == nil || o.ArrayArrayNumber == nil {
var ret [][]float32 var ret [][]float32
@ -26,7 +28,7 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 {
return *o.ArrayArrayNumber return *o.ArrayArrayNumber
} }
// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field if it's non-nil, zero value otherwise // GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ArrayArrayNumber == nil {
@ -50,14 +52,26 @@ func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) {
o.ArrayArrayNumber = &v o.ArrayArrayNumber = &v
} }
type NullableArrayOfArrayOfNumberOnly struct {
// MarshalJSON returns the JSON representation of the model. Value ArrayOfArrayOfNumberOnly
func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.ArrayArrayNumber != nil {
toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber
}
return json.Marshal(toSerialize)
} }
func (v NullableArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// ArrayOfNumberOnly struct for ArrayOfNumberOnly // ArrayOfNumberOnly struct for ArrayOfNumberOnly
type ArrayOfNumberOnly struct { type ArrayOfNumberOnly struct {
ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"` ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"`
} }
// GetArrayNumber returns the ArrayNumber field if non-nil, zero value otherwise. // GetArrayNumber returns the ArrayNumber field value if set, zero value otherwise.
func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 { func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 {
if o == nil || o.ArrayNumber == nil { if o == nil || o.ArrayNumber == nil {
var ret []float32 var ret []float32
@ -26,7 +28,7 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 {
return *o.ArrayNumber return *o.ArrayNumber
} }
// GetArrayNumberOk returns a tuple with the ArrayNumber field if it's non-nil, zero value otherwise // GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ArrayNumber == nil {
@ -50,14 +52,26 @@ func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) {
o.ArrayNumber = &v o.ArrayNumber = &v
} }
type NullableArrayOfNumberOnly struct {
// MarshalJSON returns the JSON representation of the model. Value ArrayOfNumberOnly
func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.ArrayNumber != nil {
toSerialize["ArrayNumber"] = o.ArrayNumber
}
return json.Marshal(toSerialize)
} }
func (v NullableArrayOfNumberOnly) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,20 +8,20 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// ArrayTest struct for ArrayTest // ArrayTest struct for ArrayTest
type ArrayTest struct { type ArrayTest struct {
ArrayOfString *[]string `json:"array_of_string,omitempty"` ArrayOfString *[]string `json:"array_of_string,omitempty"`
ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"` ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"`
ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
} }
// GetArrayOfString returns the ArrayOfString field if non-nil, zero value otherwise. // GetArrayOfString returns the ArrayOfString field value if set, zero value otherwise.
func (o *ArrayTest) GetArrayOfString() []string { func (o *ArrayTest) GetArrayOfString() []string {
if o == nil || o.ArrayOfString == nil { if o == nil || o.ArrayOfString == nil {
var ret []string var ret []string
@ -30,7 +30,7 @@ func (o *ArrayTest) GetArrayOfString() []string {
return *o.ArrayOfString return *o.ArrayOfString
} }
// GetArrayOfStringOk returns a tuple with the ArrayOfString field if it's non-nil, zero value otherwise // GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ArrayOfString == nil {
@ -54,7 +54,7 @@ func (o *ArrayTest) SetArrayOfString(v []string) {
o.ArrayOfString = &v o.ArrayOfString = &v
} }
// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field if non-nil, zero value otherwise. // GetArrayArrayOfInteger returns the ArrayArrayOfInteger field value if set, zero value otherwise.
func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 { func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 {
if o == nil || o.ArrayArrayOfInteger == nil { if o == nil || o.ArrayArrayOfInteger == nil {
var ret [][]int64 var ret [][]int64
@ -63,7 +63,7 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 {
return *o.ArrayArrayOfInteger return *o.ArrayArrayOfInteger
} }
// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field if it's non-nil, zero value otherwise // GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ArrayArrayOfInteger == nil {
@ -87,7 +87,7 @@ func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) {
o.ArrayArrayOfInteger = &v o.ArrayArrayOfInteger = &v
} }
// GetArrayArrayOfModel returns the ArrayArrayOfModel field if non-nil, zero value otherwise. // GetArrayArrayOfModel returns the ArrayArrayOfModel field value if set, zero value otherwise.
func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst { func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst {
if o == nil || o.ArrayArrayOfModel == nil { if o == nil || o.ArrayArrayOfModel == nil {
var ret [][]ReadOnlyFirst var ret [][]ReadOnlyFirst
@ -96,7 +96,7 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst {
return *o.ArrayArrayOfModel return *o.ArrayArrayOfModel
} }
// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field if it's non-nil, zero value otherwise // GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ArrayArrayOfModel == nil {
@ -120,20 +120,26 @@ func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) {
o.ArrayArrayOfModel = &v o.ArrayArrayOfModel = &v
} }
type NullableArrayTest struct {
// MarshalJSON returns the JSON representation of the model. Value ArrayTest
func (o ArrayTest) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableArrayTest) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,27 +8,24 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// Capitalization struct for Capitalization // Capitalization struct for Capitalization
type Capitalization struct { type Capitalization struct {
SmallCamel *string `json:"smallCamel,omitempty"` SmallCamel *string `json:"smallCamel,omitempty"`
CapitalCamel *string `json:"CapitalCamel,omitempty"` CapitalCamel *string `json:"CapitalCamel,omitempty"`
SmallSnake *string `json:"small_Snake,omitempty"` SmallSnake *string `json:"small_Snake,omitempty"`
CapitalSnake *string `json:"Capital_Snake,omitempty"` CapitalSnake *string `json:"Capital_Snake,omitempty"`
SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty"` SCAETHFlowPoints *string `json:"SCA_ETH_Flow_Points,omitempty"`
// Name of the pet // Name of the pet
ATT_NAME *string `json:"ATT_NAME,omitempty"` ATT_NAME *string `json:"ATT_NAME,omitempty"`
} }
// GetSmallCamel returns the SmallCamel field if non-nil, zero value otherwise. // GetSmallCamel returns the SmallCamel field value if set, zero value otherwise.
func (o *Capitalization) GetSmallCamel() string { func (o *Capitalization) GetSmallCamel() string {
if o == nil || o.SmallCamel == nil { if o == nil || o.SmallCamel == nil {
var ret string var ret string
@ -37,7 +34,7 @@ func (o *Capitalization) GetSmallCamel() string {
return *o.SmallCamel return *o.SmallCamel
} }
// GetSmallCamelOk returns a tuple with the SmallCamel field if it's non-nil, zero value otherwise // GetSmallCamelOk returns a tuple with the SmallCamel field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.SmallCamel == nil {
@ -61,7 +58,7 @@ func (o *Capitalization) SetSmallCamel(v string) {
o.SmallCamel = &v o.SmallCamel = &v
} }
// GetCapitalCamel returns the CapitalCamel field if non-nil, zero value otherwise. // GetCapitalCamel returns the CapitalCamel field value if set, zero value otherwise.
func (o *Capitalization) GetCapitalCamel() string { func (o *Capitalization) GetCapitalCamel() string {
if o == nil || o.CapitalCamel == nil { if o == nil || o.CapitalCamel == nil {
var ret string var ret string
@ -70,7 +67,7 @@ func (o *Capitalization) GetCapitalCamel() string {
return *o.CapitalCamel return *o.CapitalCamel
} }
// GetCapitalCamelOk returns a tuple with the CapitalCamel field if it's non-nil, zero value otherwise // GetCapitalCamelOk returns a tuple with the CapitalCamel field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.CapitalCamel == nil {
@ -94,7 +91,7 @@ func (o *Capitalization) SetCapitalCamel(v string) {
o.CapitalCamel = &v o.CapitalCamel = &v
} }
// GetSmallSnake returns the SmallSnake field if non-nil, zero value otherwise. // GetSmallSnake returns the SmallSnake field value if set, zero value otherwise.
func (o *Capitalization) GetSmallSnake() string { func (o *Capitalization) GetSmallSnake() string {
if o == nil || o.SmallSnake == nil { if o == nil || o.SmallSnake == nil {
var ret string var ret string
@ -103,7 +100,7 @@ func (o *Capitalization) GetSmallSnake() string {
return *o.SmallSnake return *o.SmallSnake
} }
// GetSmallSnakeOk returns a tuple with the SmallSnake field if it's non-nil, zero value otherwise // GetSmallSnakeOk returns a tuple with the SmallSnake field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.SmallSnake == nil {
@ -127,7 +124,7 @@ func (o *Capitalization) SetSmallSnake(v string) {
o.SmallSnake = &v o.SmallSnake = &v
} }
// GetCapitalSnake returns the CapitalSnake field if non-nil, zero value otherwise. // GetCapitalSnake returns the CapitalSnake field value if set, zero value otherwise.
func (o *Capitalization) GetCapitalSnake() string { func (o *Capitalization) GetCapitalSnake() string {
if o == nil || o.CapitalSnake == nil { if o == nil || o.CapitalSnake == nil {
var ret string var ret string
@ -136,7 +133,7 @@ func (o *Capitalization) GetCapitalSnake() string {
return *o.CapitalSnake return *o.CapitalSnake
} }
// GetCapitalSnakeOk returns a tuple with the CapitalSnake field if it's non-nil, zero value otherwise // GetCapitalSnakeOk returns a tuple with the CapitalSnake field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.CapitalSnake == nil {
@ -160,7 +157,7 @@ func (o *Capitalization) SetCapitalSnake(v string) {
o.CapitalSnake = &v o.CapitalSnake = &v
} }
// GetSCAETHFlowPoints returns the SCAETHFlowPoints field if non-nil, zero value otherwise. // GetSCAETHFlowPoints returns the SCAETHFlowPoints field value if set, zero value otherwise.
func (o *Capitalization) GetSCAETHFlowPoints() string { func (o *Capitalization) GetSCAETHFlowPoints() string {
if o == nil || o.SCAETHFlowPoints == nil { if o == nil || o.SCAETHFlowPoints == nil {
var ret string var ret string
@ -169,7 +166,7 @@ func (o *Capitalization) GetSCAETHFlowPoints() string {
return *o.SCAETHFlowPoints return *o.SCAETHFlowPoints
} }
// GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field if it's non-nil, zero value otherwise // GetSCAETHFlowPointsOk returns a tuple with the SCAETHFlowPoints field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.SCAETHFlowPoints == nil {
@ -193,7 +190,7 @@ func (o *Capitalization) SetSCAETHFlowPoints(v string) {
o.SCAETHFlowPoints = &v o.SCAETHFlowPoints = &v
} }
// GetATT_NAME returns the ATT_NAME field if non-nil, zero value otherwise. // GetATT_NAME returns the ATT_NAME field value if set, zero value otherwise.
func (o *Capitalization) GetATT_NAME() string { func (o *Capitalization) GetATT_NAME() string {
if o == nil || o.ATT_NAME == nil { if o == nil || o.ATT_NAME == nil {
var ret string var ret string
@ -202,7 +199,7 @@ func (o *Capitalization) GetATT_NAME() string {
return *o.ATT_NAME return *o.ATT_NAME
} }
// GetATT_NAMEOk returns a tuple with the ATT_NAME field if it's non-nil, zero value otherwise // GetATT_NAMEOk returns a tuple with the ATT_NAME field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ATT_NAME == nil {
@ -226,29 +223,26 @@ func (o *Capitalization) SetATT_NAME(v string) {
o.ATT_NAME = &v o.ATT_NAME = &v
} }
type NullableCapitalization struct {
// MarshalJSON returns the JSON representation of the model. Value Capitalization
func (o Capitalization) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableCapitalization) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,54 +8,35 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
"errors"
) )
// Cat struct for Cat // Cat struct for Cat
type Cat struct { type Cat struct {
ClassName *string `json:"className,omitempty"` ClassName string `json:"className"`
Color *string `json:"color,omitempty"` Color *string `json:"color,omitempty"`
Declawed *bool `json:"declawed,omitempty"` Declawed *bool `json:"declawed,omitempty"`
} }
// GetClassName returns the ClassName field if non-nil, zero value otherwise. // GetClassName returns the ClassName field value
func (o *Cat) GetClassName() string { func (o *Cat) GetClassName() string {
if o == nil || o.ClassName == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.ClassName
return o.ClassName
} }
// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise // SetClassName sets field value
// and a boolean to check if the value has been set.
func (o *Cat) GetClassNameOk() (string, bool) {
if o == nil || o.ClassName == nil {
var ret string
return ret, false
}
return *o.ClassName, true
}
// HasClassName returns a boolean if a field has been set.
func (o *Cat) HasClassName() bool {
if o != nil && o.ClassName != nil {
return true
}
return false
}
// SetClassName gets a reference to the given string and assigns it to the ClassName field.
func (o *Cat) SetClassName(v string) { func (o *Cat) SetClassName(v string) {
o.ClassName = &v o.ClassName = v
} }
// GetColor returns the Color field if non-nil, zero value otherwise. // GetColor returns the Color field value if set, zero value otherwise.
func (o *Cat) GetColor() string { func (o *Cat) GetColor() string {
if o == nil || o.Color == nil { if o == nil || o.Color == nil {
var ret string var ret string
@ -64,7 +45,7 @@ func (o *Cat) GetColor() string {
return *o.Color return *o.Color
} }
// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise // GetColorOk returns a tuple with the Color field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *Cat) GetColorOk() (string, bool) { func (o *Cat) GetColorOk() (string, bool) {
if o == nil || o.Color == nil { if o == nil || o.Color == nil {
@ -88,7 +69,7 @@ func (o *Cat) SetColor(v string) {
o.Color = &v o.Color = &v
} }
// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. // GetDeclawed returns the Declawed field value if set, zero value otherwise.
func (o *Cat) GetDeclawed() bool { func (o *Cat) GetDeclawed() bool {
if o == nil || o.Declawed == nil { if o == nil || o.Declawed == nil {
var ret bool var ret bool
@ -97,7 +78,7 @@ func (o *Cat) GetDeclawed() bool {
return *o.Declawed return *o.Declawed
} }
// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise // GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Declawed == nil {
@ -121,23 +102,26 @@ func (o *Cat) SetDeclawed(v bool) {
o.Declawed = &v o.Declawed = &v
} }
type NullableCat struct {
// MarshalJSON returns the JSON representation of the model. Value Cat
func (o Cat) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.ClassName == nil {
return nil, errors.New("ClassName is required and not nullable, but was not set on Cat")
}
if o.ClassName != nil {
toSerialize["className"] = o.ClassName
}
if o.Color != nil {
toSerialize["color"] = o.Color
}
if o.Declawed != nil {
toSerialize["declawed"] = o.Declawed
}
return json.Marshal(toSerialize)
} }
func (v NullableCat) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// CatAllOf struct for CatAllOf // CatAllOf struct for CatAllOf
type CatAllOf struct { type CatAllOf struct {
Declawed *bool `json:"declawed,omitempty"` Declawed *bool `json:"declawed,omitempty"`
} }
// GetDeclawed returns the Declawed field if non-nil, zero value otherwise. // GetDeclawed returns the Declawed field value if set, zero value otherwise.
func (o *CatAllOf) GetDeclawed() bool { func (o *CatAllOf) GetDeclawed() bool {
if o == nil || o.Declawed == nil { if o == nil || o.Declawed == nil {
var ret bool var ret bool
@ -26,7 +28,7 @@ func (o *CatAllOf) GetDeclawed() bool {
return *o.Declawed return *o.Declawed
} }
// GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise // GetDeclawedOk returns a tuple with the Declawed field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Declawed == nil {
@ -50,14 +52,26 @@ func (o *CatAllOf) SetDeclawed(v bool) {
o.Declawed = &v o.Declawed = &v
} }
type NullableCatAllOf struct {
// MarshalJSON returns the JSON representation of the model. Value CatAllOf
func (o CatAllOf) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Declawed != nil {
toSerialize["declawed"] = o.Declawed
}
return json.Marshal(toSerialize)
} }
func (v NullableCatAllOf) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,19 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
"errors"
) )
// Category struct for Category // Category struct for Category
type Category struct { type Category struct {
Id *int64 `json:"id,omitempty"` Id *int64 `json:"id,omitempty"`
Name string `json:"name"`
Name *string `json:"name,omitempty"`
} }
// GetId returns the Id field if non-nil, zero value otherwise. // GetId returns the Id field value if set, zero value otherwise.
func (o *Category) GetId() int64 { func (o *Category) GetId() int64 {
if o == nil || o.Id == nil { if o == nil || o.Id == nil {
var ret int64 var ret int64
@ -29,7 +29,7 @@ func (o *Category) GetId() int64 {
return *o.Id return *o.Id
} }
// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // GetIdOk returns a tuple with the Id field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Id == nil {
@ -53,53 +53,41 @@ func (o *Category) SetId(v int64) {
o.Id = &v o.Id = &v
} }
// GetName returns the Name field if non-nil, zero value otherwise. // GetName returns the Name field value
func (o *Category) GetName() string { func (o *Category) GetName() string {
if o == nil || o.Name == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.Name
return o.Name
} }
// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // SetName sets field value
// and a boolean to check if the value has been set.
func (o *Category) GetNameOk() (string, bool) {
if o == nil || o.Name == nil {
var ret string
return ret, false
}
return *o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *Category) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Category) SetName(v string) { func (o *Category) SetName(v string) {
o.Name = &v o.Name = v
} }
type NullableCategory struct {
// MarshalJSON returns the JSON representation of the model. Value Category
func (o Category) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Name == nil {
return nil, errors.New("Name is required and not nullable, but was not set on Category")
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
return json.Marshal(toSerialize)
} }
func (v NullableCategory) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// ClassModel Model for testing model with \"_class\" property // ClassModel Model for testing model with \"_class\" property
type ClassModel struct { type ClassModel struct {
Class *string `json:"_class,omitempty"` Class *string `json:"_class,omitempty"`
} }
// GetClass returns the Class field if non-nil, zero value otherwise. // GetClass returns the Class field value if set, zero value otherwise.
func (o *ClassModel) GetClass() string { func (o *ClassModel) GetClass() string {
if o == nil || o.Class == nil { if o == nil || o.Class == nil {
var ret string var ret string
@ -26,7 +28,7 @@ func (o *ClassModel) GetClass() string {
return *o.Class return *o.Class
} }
// GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise // GetClassOk returns a tuple with the Class field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Class == nil {
@ -50,14 +52,26 @@ func (o *ClassModel) SetClass(v string) {
o.Class = &v o.Class = &v
} }
type NullableClassModel struct {
// MarshalJSON returns the JSON representation of the model. Value ClassModel
func (o ClassModel) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Class != nil {
toSerialize["_class"] = o.Class
}
return json.Marshal(toSerialize)
} }
func (v NullableClassModel) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// Client struct for Client // Client struct for Client
type Client struct { type Client struct {
Client *string `json:"client,omitempty"` Client *string `json:"client,omitempty"`
} }
// GetClient returns the Client field if non-nil, zero value otherwise. // GetClient returns the Client field value if set, zero value otherwise.
func (o *Client) GetClient() string { func (o *Client) GetClient() string {
if o == nil || o.Client == nil { if o == nil || o.Client == nil {
var ret string var ret string
@ -26,7 +28,7 @@ func (o *Client) GetClient() string {
return *o.Client return *o.Client
} }
// GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise // GetClientOk returns a tuple with the Client field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Client == nil {
@ -50,14 +52,26 @@ func (o *Client) SetClient(v string) {
o.Client = &v o.Client = &v
} }
type NullableClient struct {
// MarshalJSON returns the JSON representation of the model. Value Client
func (o Client) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Client != nil {
toSerialize["client"] = o.Client
}
return json.Marshal(toSerialize)
} }
func (v NullableClient) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,54 +8,35 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
"errors"
) )
// Dog struct for Dog // Dog struct for Dog
type Dog struct { type Dog struct {
ClassName *string `json:"className,omitempty"` ClassName string `json:"className"`
Color *string `json:"color,omitempty"` Color *string `json:"color,omitempty"`
Breed *string `json:"breed,omitempty"` Breed *string `json:"breed,omitempty"`
} }
// GetClassName returns the ClassName field if non-nil, zero value otherwise. // GetClassName returns the ClassName field value
func (o *Dog) GetClassName() string { func (o *Dog) GetClassName() string {
if o == nil || o.ClassName == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.ClassName
return o.ClassName
} }
// GetClassNameOk returns a tuple with the ClassName field if it's non-nil, zero value otherwise // SetClassName sets field value
// and a boolean to check if the value has been set.
func (o *Dog) GetClassNameOk() (string, bool) {
if o == nil || o.ClassName == nil {
var ret string
return ret, false
}
return *o.ClassName, true
}
// HasClassName returns a boolean if a field has been set.
func (o *Dog) HasClassName() bool {
if o != nil && o.ClassName != nil {
return true
}
return false
}
// SetClassName gets a reference to the given string and assigns it to the ClassName field.
func (o *Dog) SetClassName(v string) { func (o *Dog) SetClassName(v string) {
o.ClassName = &v o.ClassName = v
} }
// GetColor returns the Color field if non-nil, zero value otherwise. // GetColor returns the Color field value if set, zero value otherwise.
func (o *Dog) GetColor() string { func (o *Dog) GetColor() string {
if o == nil || o.Color == nil { if o == nil || o.Color == nil {
var ret string var ret string
@ -64,7 +45,7 @@ func (o *Dog) GetColor() string {
return *o.Color return *o.Color
} }
// GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise // GetColorOk returns a tuple with the Color field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *Dog) GetColorOk() (string, bool) { func (o *Dog) GetColorOk() (string, bool) {
if o == nil || o.Color == nil { if o == nil || o.Color == nil {
@ -88,7 +69,7 @@ func (o *Dog) SetColor(v string) {
o.Color = &v o.Color = &v
} }
// GetBreed returns the Breed field if non-nil, zero value otherwise. // GetBreed returns the Breed field value if set, zero value otherwise.
func (o *Dog) GetBreed() string { func (o *Dog) GetBreed() string {
if o == nil || o.Breed == nil { if o == nil || o.Breed == nil {
var ret string var ret string
@ -97,7 +78,7 @@ func (o *Dog) GetBreed() string {
return *o.Breed return *o.Breed
} }
// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise // GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Breed == nil {
@ -121,23 +102,26 @@ func (o *Dog) SetBreed(v string) {
o.Breed = &v o.Breed = &v
} }
type NullableDog struct {
// MarshalJSON returns the JSON representation of the model. Value Dog
func (o Dog) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.ClassName == nil {
return nil, errors.New("ClassName is required and not nullable, but was not set on Dog")
}
if o.ClassName != nil {
toSerialize["className"] = o.ClassName
}
if o.Color != nil {
toSerialize["color"] = o.Color
}
if o.Breed != nil {
toSerialize["breed"] = o.Breed
}
return json.Marshal(toSerialize)
} }
func (v NullableDog) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// DogAllOf struct for DogAllOf // DogAllOf struct for DogAllOf
type DogAllOf struct { type DogAllOf struct {
Breed *string `json:"breed,omitempty"` Breed *string `json:"breed,omitempty"`
} }
// GetBreed returns the Breed field if non-nil, zero value otherwise. // GetBreed returns the Breed field value if set, zero value otherwise.
func (o *DogAllOf) GetBreed() string { func (o *DogAllOf) GetBreed() string {
if o == nil || o.Breed == nil { if o == nil || o.Breed == nil {
var ret string var ret string
@ -26,7 +28,7 @@ func (o *DogAllOf) GetBreed() string {
return *o.Breed return *o.Breed
} }
// GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise // GetBreedOk returns a tuple with the Breed field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Breed == nil {
@ -50,14 +52,26 @@ func (o *DogAllOf) SetBreed(v string) {
o.Breed = &v o.Breed = &v
} }
type NullableDogAllOf struct {
// MarshalJSON returns the JSON representation of the model. Value DogAllOf
func (o DogAllOf) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Breed != nil {
toSerialize["breed"] = o.Breed
}
return json.Marshal(toSerialize)
} }
func (v NullableDogAllOf) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,18 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// EnumArrays struct for EnumArrays // EnumArrays struct for EnumArrays
type EnumArrays struct { type EnumArrays struct {
JustSymbol *string `json:"just_symbol,omitempty"` JustSymbol *string `json:"just_symbol,omitempty"`
ArrayEnum *[]string `json:"array_enum,omitempty"` ArrayEnum *[]string `json:"array_enum,omitempty"`
} }
// GetJustSymbol returns the JustSymbol field if non-nil, zero value otherwise. // GetJustSymbol returns the JustSymbol field value if set, zero value otherwise.
func (o *EnumArrays) GetJustSymbol() string { func (o *EnumArrays) GetJustSymbol() string {
if o == nil || o.JustSymbol == nil { if o == nil || o.JustSymbol == nil {
var ret string var ret string
@ -28,7 +29,7 @@ func (o *EnumArrays) GetJustSymbol() string {
return *o.JustSymbol return *o.JustSymbol
} }
// GetJustSymbolOk returns a tuple with the JustSymbol field if it's non-nil, zero value otherwise // GetJustSymbolOk returns a tuple with the JustSymbol field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.JustSymbol == nil {
@ -52,7 +53,7 @@ func (o *EnumArrays) SetJustSymbol(v string) {
o.JustSymbol = &v o.JustSymbol = &v
} }
// GetArrayEnum returns the ArrayEnum field if non-nil, zero value otherwise. // GetArrayEnum returns the ArrayEnum field value if set, zero value otherwise.
func (o *EnumArrays) GetArrayEnum() []string { func (o *EnumArrays) GetArrayEnum() []string {
if o == nil || o.ArrayEnum == nil { if o == nil || o.ArrayEnum == nil {
var ret []string var ret []string
@ -61,7 +62,7 @@ func (o *EnumArrays) GetArrayEnum() []string {
return *o.ArrayEnum return *o.ArrayEnum
} }
// GetArrayEnumOk returns a tuple with the ArrayEnum field if it's non-nil, zero value otherwise // GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ArrayEnum == nil {
@ -85,17 +86,26 @@ func (o *EnumArrays) SetArrayEnum(v []string) {
o.ArrayEnum = &v o.ArrayEnum = &v
} }
type NullableEnumArrays struct {
// MarshalJSON returns the JSON representation of the model. Value EnumArrays
func (o EnumArrays) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableEnumArrays) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,6 +8,12 @@
*/ */
package openapi package openapi
import (
"bytes"
"encoding/json"
)
// EnumClass the model 'EnumClass' // EnumClass the model 'EnumClass'
type EnumClass string type EnumClass string
@ -18,4 +24,30 @@ const (
XYZ EnumClass = "(xyz)" XYZ EnumClass = "(xyz)"
) )
type NullableEnumClass struct {
Value EnumClass
ExplicitNull bool
}
func (v NullableEnumClass) 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)
}
}
func (v *NullableEnumClass) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}

View File

@ -8,31 +8,25 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
"errors"
) )
// EnumTest struct for EnumTest // EnumTest struct for EnumTest
type EnumTest struct { type EnumTest struct {
EnumString *string `json:"enum_string,omitempty"` EnumString *string `json:"enum_string,omitempty"`
EnumStringRequired string `json:"enum_string_required"`
EnumStringRequired *string `json:"enum_string_required,omitempty"`
EnumInteger *int32 `json:"enum_integer,omitempty"` EnumInteger *int32 `json:"enum_integer,omitempty"`
EnumNumber *float64 `json:"enum_number,omitempty"` EnumNumber *float64 `json:"enum_number,omitempty"`
OuterEnum *NullableOuterEnum `json:"outerEnum,omitempty"`
OuterEnum *OuterEnum `json:"outerEnum,omitempty"`
isExplicitNullOuterEnum bool `json:"-"`
OuterEnumInteger *OuterEnumInteger `json:"outerEnumInteger,omitempty"` OuterEnumInteger *OuterEnumInteger `json:"outerEnumInteger,omitempty"`
OuterEnumDefaultValue *OuterEnumDefaultValue `json:"outerEnumDefaultValue,omitempty"` OuterEnumDefaultValue *OuterEnumDefaultValue `json:"outerEnumDefaultValue,omitempty"`
OuterEnumIntegerDefaultValue *OuterEnumIntegerDefaultValue `json:"outerEnumIntegerDefaultValue,omitempty"` OuterEnumIntegerDefaultValue *OuterEnumIntegerDefaultValue `json:"outerEnumIntegerDefaultValue,omitempty"`
} }
// GetEnumString returns the EnumString field if non-nil, zero value otherwise. // GetEnumString returns the EnumString field value if set, zero value otherwise.
func (o *EnumTest) GetEnumString() string { func (o *EnumTest) GetEnumString() string {
if o == nil || o.EnumString == nil { if o == nil || o.EnumString == nil {
var ret string var ret string
@ -41,7 +35,7 @@ func (o *EnumTest) GetEnumString() string {
return *o.EnumString return *o.EnumString
} }
// GetEnumStringOk returns a tuple with the EnumString field if it's non-nil, zero value otherwise // GetEnumStringOk returns a tuple with the EnumString field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.EnumString == nil {
@ -65,40 +59,22 @@ func (o *EnumTest) SetEnumString(v string) {
o.EnumString = &v o.EnumString = &v
} }
// GetEnumStringRequired returns the EnumStringRequired field if non-nil, zero value otherwise. // GetEnumStringRequired returns the EnumStringRequired field value
func (o *EnumTest) GetEnumStringRequired() string { func (o *EnumTest) GetEnumStringRequired() string {
if o == nil || o.EnumStringRequired == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.EnumStringRequired
return o.EnumStringRequired
} }
// GetEnumStringRequiredOk returns a tuple with the EnumStringRequired field if it's non-nil, zero value otherwise // SetEnumStringRequired sets field value
// and a boolean to check if the value has been set.
func (o *EnumTest) GetEnumStringRequiredOk() (string, bool) {
if o == nil || o.EnumStringRequired == nil {
var ret string
return ret, false
}
return *o.EnumStringRequired, true
}
// HasEnumStringRequired returns a boolean if a field has been set.
func (o *EnumTest) HasEnumStringRequired() bool {
if o != nil && o.EnumStringRequired != nil {
return true
}
return false
}
// SetEnumStringRequired gets a reference to the given string and assigns it to the EnumStringRequired field.
func (o *EnumTest) SetEnumStringRequired(v string) { func (o *EnumTest) SetEnumStringRequired(v string) {
o.EnumStringRequired = &v o.EnumStringRequired = v
} }
// GetEnumInteger returns the EnumInteger field if non-nil, zero value otherwise. // GetEnumInteger returns the EnumInteger field value if set, zero value otherwise.
func (o *EnumTest) GetEnumInteger() int32 { func (o *EnumTest) GetEnumInteger() int32 {
if o == nil || o.EnumInteger == nil { if o == nil || o.EnumInteger == nil {
var ret int32 var ret int32
@ -107,7 +83,7 @@ func (o *EnumTest) GetEnumInteger() int32 {
return *o.EnumInteger return *o.EnumInteger
} }
// GetEnumIntegerOk returns a tuple with the EnumInteger field if it's non-nil, zero value otherwise // GetEnumIntegerOk returns a tuple with the EnumInteger field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.EnumInteger == nil {
@ -131,7 +107,7 @@ func (o *EnumTest) SetEnumInteger(v int32) {
o.EnumInteger = &v o.EnumInteger = &v
} }
// GetEnumNumber returns the EnumNumber field if non-nil, zero value otherwise. // GetEnumNumber returns the EnumNumber field value if set, zero value otherwise.
func (o *EnumTest) GetEnumNumber() float64 { func (o *EnumTest) GetEnumNumber() float64 {
if o == nil || o.EnumNumber == nil { if o == nil || o.EnumNumber == nil {
var ret float64 var ret float64
@ -140,7 +116,7 @@ func (o *EnumTest) GetEnumNumber() float64 {
return *o.EnumNumber return *o.EnumNumber
} }
// GetEnumNumberOk returns a tuple with the EnumNumber field if it's non-nil, zero value otherwise // GetEnumNumberOk returns a tuple with the EnumNumber field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.EnumNumber == nil {
@ -164,20 +140,20 @@ func (o *EnumTest) SetEnumNumber(v float64) {
o.EnumNumber = &v o.EnumNumber = &v
} }
// GetOuterEnum returns the OuterEnum field if non-nil, zero value otherwise. // GetOuterEnum returns the OuterEnum field value if set, zero value otherwise.
func (o *EnumTest) GetOuterEnum() OuterEnum { func (o *EnumTest) GetOuterEnum() NullableOuterEnum {
if o == nil || o.OuterEnum == nil { if o == nil || o.OuterEnum == nil {
var ret OuterEnum var ret NullableOuterEnum
return ret return ret
} }
return *o.OuterEnum return *o.OuterEnum
} }
// GetOuterEnumOk returns a tuple with the OuterEnum field if it's non-nil, zero value otherwise // GetOuterEnumOk returns a tuple with the OuterEnum field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *EnumTest) GetOuterEnumOk() (OuterEnum, bool) { func (o *EnumTest) GetOuterEnumOk() (NullableOuterEnum, bool) {
if o == nil || o.OuterEnum == nil { if o == nil || o.OuterEnum == nil {
var ret OuterEnum var ret NullableOuterEnum
return ret, false return ret, false
} }
return *o.OuterEnum, true return *o.OuterEnum, true
@ -192,19 +168,12 @@ func (o *EnumTest) HasOuterEnum() bool {
return false return false
} }
// SetOuterEnum gets a reference to the given OuterEnum and assigns it to the OuterEnum field. // SetOuterEnum gets a reference to the given NullableOuterEnum and assigns it to the OuterEnum field.
func (o *EnumTest) SetOuterEnum(v OuterEnum) { func (o *EnumTest) SetOuterEnum(v NullableOuterEnum) {
o.OuterEnum = &v o.OuterEnum = &v
} }
// SetOuterEnumExplicitNull (un)sets OuterEnum to be considered as explicit "null" value // GetOuterEnumInteger returns the OuterEnumInteger field value if set, zero value otherwise.
// 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
func (o *EnumTest) SetOuterEnumExplicitNull(b bool) {
o.OuterEnum = nil
o.isExplicitNullOuterEnum = b
}
// GetOuterEnumInteger returns the OuterEnumInteger field if non-nil, zero value otherwise.
func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger { func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger {
if o == nil || o.OuterEnumInteger == nil { if o == nil || o.OuterEnumInteger == nil {
var ret OuterEnumInteger var ret OuterEnumInteger
@ -213,7 +182,7 @@ func (o *EnumTest) GetOuterEnumInteger() OuterEnumInteger {
return *o.OuterEnumInteger return *o.OuterEnumInteger
} }
// GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field if it's non-nil, zero value otherwise // GetOuterEnumIntegerOk returns a tuple with the OuterEnumInteger field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.OuterEnumInteger == nil {
@ -237,7 +206,7 @@ func (o *EnumTest) SetOuterEnumInteger(v OuterEnumInteger) {
o.OuterEnumInteger = &v o.OuterEnumInteger = &v
} }
// GetOuterEnumDefaultValue returns the OuterEnumDefaultValue field if non-nil, zero value otherwise. // GetOuterEnumDefaultValue returns the OuterEnumDefaultValue field value if set, zero value otherwise.
func (o *EnumTest) GetOuterEnumDefaultValue() OuterEnumDefaultValue { func (o *EnumTest) GetOuterEnumDefaultValue() OuterEnumDefaultValue {
if o == nil || o.OuterEnumDefaultValue == nil { if o == nil || o.OuterEnumDefaultValue == nil {
var ret OuterEnumDefaultValue var ret OuterEnumDefaultValue
@ -246,7 +215,7 @@ func (o *EnumTest) GetOuterEnumDefaultValue() OuterEnumDefaultValue {
return *o.OuterEnumDefaultValue return *o.OuterEnumDefaultValue
} }
// GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field if it's non-nil, zero value otherwise // GetOuterEnumDefaultValueOk returns a tuple with the OuterEnumDefaultValue field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.OuterEnumDefaultValue == nil {
@ -270,7 +239,7 @@ func (o *EnumTest) SetOuterEnumDefaultValue(v OuterEnumDefaultValue) {
o.OuterEnumDefaultValue = &v o.OuterEnumDefaultValue = &v
} }
// GetOuterEnumIntegerDefaultValue returns the OuterEnumIntegerDefaultValue field if non-nil, zero value otherwise. // GetOuterEnumIntegerDefaultValue returns the OuterEnumIntegerDefaultValue field value if set, zero value otherwise.
func (o *EnumTest) GetOuterEnumIntegerDefaultValue() OuterEnumIntegerDefaultValue { func (o *EnumTest) GetOuterEnumIntegerDefaultValue() OuterEnumIntegerDefaultValue {
if o == nil || o.OuterEnumIntegerDefaultValue == nil { if o == nil || o.OuterEnumIntegerDefaultValue == nil {
var ret OuterEnumIntegerDefaultValue var ret OuterEnumIntegerDefaultValue
@ -279,7 +248,7 @@ func (o *EnumTest) GetOuterEnumIntegerDefaultValue() OuterEnumIntegerDefaultValu
return *o.OuterEnumIntegerDefaultValue return *o.OuterEnumIntegerDefaultValue
} }
// GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field if it's non-nil, zero value otherwise // GetOuterEnumIntegerDefaultValueOk returns a tuple with the OuterEnumIntegerDefaultValue field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.OuterEnumIntegerDefaultValue == nil {
@ -303,42 +272,26 @@ func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValu
o.OuterEnumIntegerDefaultValue = &v o.OuterEnumIntegerDefaultValue = &v
} }
type NullableEnumTest struct {
// MarshalJSON returns the JSON representation of the model. Value EnumTest
func (o EnumTest) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.EnumString != nil {
toSerialize["enum_string"] = o.EnumString
}
if o.EnumStringRequired == nil {
return nil, errors.New("EnumStringRequired is required and not nullable, but was not set on EnumTest")
}
if o.EnumStringRequired != nil {
toSerialize["enum_string_required"] = o.EnumStringRequired
}
if o.EnumInteger != nil {
toSerialize["enum_integer"] = o.EnumInteger
}
if o.EnumNumber != nil {
toSerialize["enum_number"] = o.EnumNumber
}
if o.OuterEnum == nil {
if o.isExplicitNullOuterEnum {
toSerialize["outerEnum"] = o.OuterEnum
}
} else {
toSerialize["outerEnum"] = o.OuterEnum
}
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)
} }
func (v NullableEnumTest) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,17 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// File Must be named `File` for test. // File Must be named `File` for test.
type File struct { type File struct {
// Test capitalization // Test capitalization
SourceURI *string `json:"sourceURI,omitempty"` SourceURI *string `json:"sourceURI,omitempty"`
} }
// GetSourceURI returns the SourceURI field if non-nil, zero value otherwise. // GetSourceURI returns the SourceURI field value if set, zero value otherwise.
func (o *File) GetSourceURI() string { func (o *File) GetSourceURI() string {
if o == nil || o.SourceURI == nil { if o == nil || o.SourceURI == nil {
var ret string var ret string
@ -27,7 +29,7 @@ func (o *File) GetSourceURI() string {
return *o.SourceURI return *o.SourceURI
} }
// GetSourceURIOk returns a tuple with the SourceURI field if it's non-nil, zero value otherwise // GetSourceURIOk returns a tuple with the SourceURI field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.SourceURI == nil {
@ -51,14 +53,26 @@ func (o *File) SetSourceURI(v string) {
o.SourceURI = &v o.SourceURI = &v
} }
type NullableFile struct {
// MarshalJSON returns the JSON representation of the model. Value File
func (o File) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.SourceURI != nil {
toSerialize["sourceURI"] = o.SourceURI
}
return json.Marshal(toSerialize)
} }
func (v NullableFile) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,18 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// FileSchemaTestClass struct for FileSchemaTestClass // FileSchemaTestClass struct for FileSchemaTestClass
type FileSchemaTestClass struct { type FileSchemaTestClass struct {
File *File `json:"file,omitempty"` File *File `json:"file,omitempty"`
Files *[]File `json:"files,omitempty"` Files *[]File `json:"files,omitempty"`
} }
// GetFile returns the File field if non-nil, zero value otherwise. // GetFile returns the File field value if set, zero value otherwise.
func (o *FileSchemaTestClass) GetFile() File { func (o *FileSchemaTestClass) GetFile() File {
if o == nil || o.File == nil { if o == nil || o.File == nil {
var ret File var ret File
@ -28,7 +29,7 @@ func (o *FileSchemaTestClass) GetFile() File {
return *o.File return *o.File
} }
// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise // GetFileOk returns a tuple with the File field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.File == nil {
@ -52,7 +53,7 @@ func (o *FileSchemaTestClass) SetFile(v File) {
o.File = &v o.File = &v
} }
// GetFiles returns the Files field if non-nil, zero value otherwise. // GetFiles returns the Files field value if set, zero value otherwise.
func (o *FileSchemaTestClass) GetFiles() []File { func (o *FileSchemaTestClass) GetFiles() []File {
if o == nil || o.Files == nil { if o == nil || o.Files == nil {
var ret []File var ret []File
@ -61,7 +62,7 @@ func (o *FileSchemaTestClass) GetFiles() []File {
return *o.Files return *o.Files
} }
// GetFilesOk returns a tuple with the Files field if it's non-nil, zero value otherwise // GetFilesOk returns a tuple with the Files field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Files == nil {
@ -85,17 +86,26 @@ func (o *FileSchemaTestClass) SetFiles(v []File) {
o.Files = &v o.Files = &v
} }
type NullableFileSchemaTestClass struct {
// MarshalJSON returns the JSON representation of the model. Value FileSchemaTestClass
func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.File != nil {
toSerialize["file"] = o.File
}
if o.Files != nil {
toSerialize["files"] = o.Files
}
return json.Marshal(toSerialize)
} }
func (v NullableFileSchemaTestClass) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// Foo struct for Foo // Foo struct for Foo
type Foo struct { type Foo struct {
Bar *string `json:"bar,omitempty"` Bar *string `json:"bar,omitempty"`
} }
// GetBar returns the Bar field if non-nil, zero value otherwise. // GetBar returns the Bar field value if set, zero value otherwise.
func (o *Foo) GetBar() string { func (o *Foo) GetBar() string {
if o == nil || o.Bar == nil { if o == nil || o.Bar == nil {
var ret string var ret string
@ -26,7 +28,7 @@ func (o *Foo) GetBar() string {
return *o.Bar return *o.Bar
} }
// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise // GetBarOk returns a tuple with the Bar field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Bar == nil {
@ -50,14 +52,26 @@ func (o *Foo) SetBar(v string) {
o.Bar = &v o.Bar = &v
} }
type NullableFoo struct {
// MarshalJSON returns the JSON representation of the model. Value Foo
func (o Foo) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Bar != nil {
toSerialize["bar"] = o.Bar
}
return json.Marshal(toSerialize)
} }
func (v NullableFoo) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,49 +8,36 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json"
"os" "os"
"time" "time"
"encoding/json"
"errors"
) )
// FormatTest struct for FormatTest // FormatTest struct for FormatTest
type FormatTest struct { type FormatTest struct {
Integer *int32 `json:"integer,omitempty"` Integer *int32 `json:"integer,omitempty"`
Int32 *int32 `json:"int32,omitempty"` Int32 *int32 `json:"int32,omitempty"`
Int64 *int64 `json:"int64,omitempty"` Int64 *int64 `json:"int64,omitempty"`
Number float32 `json:"number"`
Number *float32 `json:"number,omitempty"`
Float *float32 `json:"float,omitempty"` Float *float32 `json:"float,omitempty"`
Double *float64 `json:"double,omitempty"` Double *float64 `json:"double,omitempty"`
String *string `json:"string,omitempty"` String *string `json:"string,omitempty"`
Byte string `json:"byte"`
Byte *string `json:"byte,omitempty"`
Binary **os.File `json:"binary,omitempty"` Binary **os.File `json:"binary,omitempty"`
Date string `json:"date"`
Date *string `json:"date,omitempty"`
DateTime *time.Time `json:"dateTime,omitempty"` DateTime *time.Time `json:"dateTime,omitempty"`
Uuid *string `json:"uuid,omitempty"` Uuid *string `json:"uuid,omitempty"`
Password string `json:"password"`
Password *string `json:"password,omitempty"`
// A string that is a 10 digit number. Can have leading zeros. // A string that is a 10 digit number. Can have leading zeros.
PatternWithDigits *string `json:"pattern_with_digits,omitempty"` PatternWithDigits *string `json:"pattern_with_digits,omitempty"`
// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
PatternWithDigitsAndDelimiter *string `json:"pattern_with_digits_and_delimiter,omitempty"` PatternWithDigitsAndDelimiter *string `json:"pattern_with_digits_and_delimiter,omitempty"`
} }
// GetInteger returns the Integer field if non-nil, zero value otherwise. // GetInteger returns the Integer field value if set, zero value otherwise.
func (o *FormatTest) GetInteger() int32 { func (o *FormatTest) GetInteger() int32 {
if o == nil || o.Integer == nil { if o == nil || o.Integer == nil {
var ret int32 var ret int32
@ -59,7 +46,7 @@ func (o *FormatTest) GetInteger() int32 {
return *o.Integer return *o.Integer
} }
// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise // GetIntegerOk returns a tuple with the Integer field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Integer == nil {
@ -83,7 +70,7 @@ func (o *FormatTest) SetInteger(v int32) {
o.Integer = &v o.Integer = &v
} }
// GetInt32 returns the Int32 field if non-nil, zero value otherwise. // GetInt32 returns the Int32 field value if set, zero value otherwise.
func (o *FormatTest) GetInt32() int32 { func (o *FormatTest) GetInt32() int32 {
if o == nil || o.Int32 == nil { if o == nil || o.Int32 == nil {
var ret int32 var ret int32
@ -92,7 +79,7 @@ func (o *FormatTest) GetInt32() int32 {
return *o.Int32 return *o.Int32
} }
// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise // GetInt32Ok returns a tuple with the Int32 field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Int32 == nil {
@ -116,7 +103,7 @@ func (o *FormatTest) SetInt32(v int32) {
o.Int32 = &v o.Int32 = &v
} }
// GetInt64 returns the Int64 field if non-nil, zero value otherwise. // GetInt64 returns the Int64 field value if set, zero value otherwise.
func (o *FormatTest) GetInt64() int64 { func (o *FormatTest) GetInt64() int64 {
if o == nil || o.Int64 == nil { if o == nil || o.Int64 == nil {
var ret int64 var ret int64
@ -125,7 +112,7 @@ func (o *FormatTest) GetInt64() int64 {
return *o.Int64 return *o.Int64
} }
// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise // GetInt64Ok returns a tuple with the Int64 field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Int64 == nil {
@ -149,40 +136,22 @@ func (o *FormatTest) SetInt64(v int64) {
o.Int64 = &v o.Int64 = &v
} }
// GetNumber returns the Number field if non-nil, zero value otherwise. // GetNumber returns the Number field value
func (o *FormatTest) GetNumber() float32 { func (o *FormatTest) GetNumber() float32 {
if o == nil || o.Number == nil { if o == nil {
var ret float32 var ret float32
return ret return ret
} }
return *o.Number
return o.Number
} }
// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise // SetNumber sets field value
// and a boolean to check if the value has been set.
func (o *FormatTest) GetNumberOk() (float32, bool) {
if o == nil || o.Number == nil {
var ret float32
return ret, false
}
return *o.Number, true
}
// HasNumber returns a boolean if a field has been set.
func (o *FormatTest) HasNumber() bool {
if o != nil && o.Number != nil {
return true
}
return false
}
// SetNumber gets a reference to the given float32 and assigns it to the Number field.
func (o *FormatTest) SetNumber(v float32) { func (o *FormatTest) SetNumber(v float32) {
o.Number = &v o.Number = v
} }
// GetFloat returns the Float field if non-nil, zero value otherwise. // GetFloat returns the Float field value if set, zero value otherwise.
func (o *FormatTest) GetFloat() float32 { func (o *FormatTest) GetFloat() float32 {
if o == nil || o.Float == nil { if o == nil || o.Float == nil {
var ret float32 var ret float32
@ -191,7 +160,7 @@ func (o *FormatTest) GetFloat() float32 {
return *o.Float return *o.Float
} }
// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise // GetFloatOk returns a tuple with the Float field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Float == nil {
@ -215,7 +184,7 @@ func (o *FormatTest) SetFloat(v float32) {
o.Float = &v o.Float = &v
} }
// GetDouble returns the Double field if non-nil, zero value otherwise. // GetDouble returns the Double field value if set, zero value otherwise.
func (o *FormatTest) GetDouble() float64 { func (o *FormatTest) GetDouble() float64 {
if o == nil || o.Double == nil { if o == nil || o.Double == nil {
var ret float64 var ret float64
@ -224,7 +193,7 @@ func (o *FormatTest) GetDouble() float64 {
return *o.Double return *o.Double
} }
// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise // GetDoubleOk returns a tuple with the Double field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Double == nil {
@ -248,7 +217,7 @@ func (o *FormatTest) SetDouble(v float64) {
o.Double = &v o.Double = &v
} }
// GetString returns the String field if non-nil, zero value otherwise. // GetString returns the String field value if set, zero value otherwise.
func (o *FormatTest) GetString() string { func (o *FormatTest) GetString() string {
if o == nil || o.String == nil { if o == nil || o.String == nil {
var ret string var ret string
@ -257,7 +226,7 @@ func (o *FormatTest) GetString() string {
return *o.String return *o.String
} }
// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise // GetStringOk returns a tuple with the String field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.String == nil {
@ -281,40 +250,22 @@ func (o *FormatTest) SetString(v string) {
o.String = &v o.String = &v
} }
// GetByte returns the Byte field if non-nil, zero value otherwise. // GetByte returns the Byte field value
func (o *FormatTest) GetByte() string { func (o *FormatTest) GetByte() string {
if o == nil || o.Byte == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.Byte
return o.Byte
} }
// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise // SetByte sets field value
// and a boolean to check if the value has been set.
func (o *FormatTest) GetByteOk() (string, bool) {
if o == nil || o.Byte == nil {
var ret string
return ret, false
}
return *o.Byte, true
}
// HasByte returns a boolean if a field has been set.
func (o *FormatTest) HasByte() bool {
if o != nil && o.Byte != nil {
return true
}
return false
}
// SetByte gets a reference to the given string and assigns it to the Byte field.
func (o *FormatTest) SetByte(v string) { func (o *FormatTest) SetByte(v string) {
o.Byte = &v o.Byte = v
} }
// GetBinary returns the Binary field if non-nil, zero value otherwise. // GetBinary returns the Binary field value if set, zero value otherwise.
func (o *FormatTest) GetBinary() *os.File { func (o *FormatTest) GetBinary() *os.File {
if o == nil || o.Binary == nil { if o == nil || o.Binary == nil {
var ret *os.File var ret *os.File
@ -323,7 +274,7 @@ func (o *FormatTest) GetBinary() *os.File {
return *o.Binary return *o.Binary
} }
// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise // GetBinaryOk returns a tuple with the Binary field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Binary == nil {
@ -347,40 +298,22 @@ func (o *FormatTest) SetBinary(v *os.File) {
o.Binary = &v o.Binary = &v
} }
// GetDate returns the Date field if non-nil, zero value otherwise. // GetDate returns the Date field value
func (o *FormatTest) GetDate() string { func (o *FormatTest) GetDate() string {
if o == nil || o.Date == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.Date
return o.Date
} }
// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise // SetDate sets field value
// and a boolean to check if the value has been set.
func (o *FormatTest) GetDateOk() (string, bool) {
if o == nil || o.Date == nil {
var ret string
return ret, false
}
return *o.Date, true
}
// HasDate returns a boolean if a field has been set.
func (o *FormatTest) HasDate() bool {
if o != nil && o.Date != nil {
return true
}
return false
}
// SetDate gets a reference to the given string and assigns it to the Date field.
func (o *FormatTest) SetDate(v string) { func (o *FormatTest) SetDate(v string) {
o.Date = &v o.Date = v
} }
// GetDateTime returns the DateTime field if non-nil, zero value otherwise. // GetDateTime returns the DateTime field value if set, zero value otherwise.
func (o *FormatTest) GetDateTime() time.Time { func (o *FormatTest) GetDateTime() time.Time {
if o == nil || o.DateTime == nil { if o == nil || o.DateTime == nil {
var ret time.Time var ret time.Time
@ -389,7 +322,7 @@ func (o *FormatTest) GetDateTime() time.Time {
return *o.DateTime return *o.DateTime
} }
// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise // GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.DateTime == nil {
@ -413,7 +346,7 @@ func (o *FormatTest) SetDateTime(v time.Time) {
o.DateTime = &v o.DateTime = &v
} }
// GetUuid returns the Uuid field if non-nil, zero value otherwise. // GetUuid returns the Uuid field value if set, zero value otherwise.
func (o *FormatTest) GetUuid() string { func (o *FormatTest) GetUuid() string {
if o == nil || o.Uuid == nil { if o == nil || o.Uuid == nil {
var ret string var ret string
@ -422,7 +355,7 @@ func (o *FormatTest) GetUuid() string {
return *o.Uuid return *o.Uuid
} }
// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise // GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Uuid == nil {
@ -446,40 +379,22 @@ func (o *FormatTest) SetUuid(v string) {
o.Uuid = &v o.Uuid = &v
} }
// GetPassword returns the Password field if non-nil, zero value otherwise. // GetPassword returns the Password field value
func (o *FormatTest) GetPassword() string { func (o *FormatTest) GetPassword() string {
if o == nil || o.Password == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.Password
return o.Password
} }
// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise // SetPassword sets field value
// and a boolean to check if the value has been set.
func (o *FormatTest) GetPasswordOk() (string, bool) {
if o == nil || o.Password == nil {
var ret string
return ret, false
}
return *o.Password, true
}
// HasPassword returns a boolean if a field has been set.
func (o *FormatTest) HasPassword() bool {
if o != nil && o.Password != nil {
return true
}
return false
}
// SetPassword gets a reference to the given string and assigns it to the Password field.
func (o *FormatTest) SetPassword(v string) { func (o *FormatTest) SetPassword(v string) {
o.Password = &v o.Password = v
} }
// GetPatternWithDigits returns the PatternWithDigits field if non-nil, zero value otherwise. // GetPatternWithDigits returns the PatternWithDigits field value if set, zero value otherwise.
func (o *FormatTest) GetPatternWithDigits() string { func (o *FormatTest) GetPatternWithDigits() string {
if o == nil || o.PatternWithDigits == nil { if o == nil || o.PatternWithDigits == nil {
var ret string var ret string
@ -488,7 +403,7 @@ func (o *FormatTest) GetPatternWithDigits() string {
return *o.PatternWithDigits return *o.PatternWithDigits
} }
// GetPatternWithDigitsOk returns a tuple with the PatternWithDigits field if it's non-nil, zero value otherwise // GetPatternWithDigitsOk returns a tuple with the PatternWithDigits field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.PatternWithDigits == nil {
@ -512,7 +427,7 @@ func (o *FormatTest) SetPatternWithDigits(v string) {
o.PatternWithDigits = &v o.PatternWithDigits = &v
} }
// GetPatternWithDigitsAndDelimiter returns the PatternWithDigitsAndDelimiter field if non-nil, zero value otherwise. // GetPatternWithDigitsAndDelimiter returns the PatternWithDigitsAndDelimiter field value if set, zero value otherwise.
func (o *FormatTest) GetPatternWithDigitsAndDelimiter() string { func (o *FormatTest) GetPatternWithDigitsAndDelimiter() string {
if o == nil || o.PatternWithDigitsAndDelimiter == nil { if o == nil || o.PatternWithDigitsAndDelimiter == nil {
var ret string var ret string
@ -521,7 +436,7 @@ func (o *FormatTest) GetPatternWithDigitsAndDelimiter() string {
return *o.PatternWithDigitsAndDelimiter return *o.PatternWithDigitsAndDelimiter
} }
// GetPatternWithDigitsAndDelimiterOk returns a tuple with the PatternWithDigitsAndDelimiter field if it's non-nil, zero value otherwise // GetPatternWithDigitsAndDelimiterOk returns a tuple with the PatternWithDigitsAndDelimiter field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.PatternWithDigitsAndDelimiter == nil {
@ -545,68 +460,26 @@ func (o *FormatTest) SetPatternWithDigitsAndDelimiter(v string) {
o.PatternWithDigitsAndDelimiter = &v o.PatternWithDigitsAndDelimiter = &v
} }
type NullableFormatTest struct {
// MarshalJSON returns the JSON representation of the model. Value FormatTest
func (o FormatTest) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Integer != nil {
toSerialize["integer"] = o.Integer
}
if o.Int32 != nil {
toSerialize["int32"] = o.Int32
}
if o.Int64 != nil {
toSerialize["int64"] = o.Int64
}
if o.Number == nil {
return nil, errors.New("Number is required and not nullable, but was not set on FormatTest")
}
if o.Number != nil {
toSerialize["number"] = o.Number
}
if o.Float != nil {
toSerialize["float"] = o.Float
}
if o.Double != nil {
toSerialize["double"] = o.Double
}
if o.String != nil {
toSerialize["string"] = o.String
}
if o.Byte == nil {
return nil, errors.New("Byte is required and not nullable, but was not set on FormatTest")
}
if o.Byte != nil {
toSerialize["byte"] = o.Byte
}
if o.Binary != nil {
toSerialize["binary"] = o.Binary
}
if o.Date == nil {
return nil, errors.New("Date is required and not nullable, but was not set on FormatTest")
}
if o.Date != nil {
toSerialize["date"] = o.Date
}
if o.DateTime != nil {
toSerialize["dateTime"] = o.DateTime
}
if o.Uuid != nil {
toSerialize["uuid"] = o.Uuid
}
if o.Password == nil {
return nil, errors.New("Password is required and not nullable, but was not set on FormatTest")
}
if o.Password != nil {
toSerialize["password"] = o.Password
}
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)
} }
func (v NullableFormatTest) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,18 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// HasOnlyReadOnly struct for HasOnlyReadOnly // HasOnlyReadOnly struct for HasOnlyReadOnly
type HasOnlyReadOnly struct { type HasOnlyReadOnly struct {
Bar *string `json:"bar,omitempty"` Bar *string `json:"bar,omitempty"`
Foo *string `json:"foo,omitempty"` Foo *string `json:"foo,omitempty"`
} }
// GetBar returns the Bar field if non-nil, zero value otherwise. // GetBar returns the Bar field value if set, zero value otherwise.
func (o *HasOnlyReadOnly) GetBar() string { func (o *HasOnlyReadOnly) GetBar() string {
if o == nil || o.Bar == nil { if o == nil || o.Bar == nil {
var ret string var ret string
@ -28,7 +29,7 @@ func (o *HasOnlyReadOnly) GetBar() string {
return *o.Bar return *o.Bar
} }
// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise // GetBarOk returns a tuple with the Bar field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Bar == nil {
@ -52,7 +53,7 @@ func (o *HasOnlyReadOnly) SetBar(v string) {
o.Bar = &v o.Bar = &v
} }
// GetFoo returns the Foo field if non-nil, zero value otherwise. // GetFoo returns the Foo field value if set, zero value otherwise.
func (o *HasOnlyReadOnly) GetFoo() string { func (o *HasOnlyReadOnly) GetFoo() string {
if o == nil || o.Foo == nil { if o == nil || o.Foo == nil {
var ret string var ret string
@ -61,7 +62,7 @@ func (o *HasOnlyReadOnly) GetFoo() string {
return *o.Foo return *o.Foo
} }
// GetFooOk returns a tuple with the Foo field if it's non-nil, zero value otherwise // GetFooOk returns a tuple with the Foo field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Foo == nil {
@ -85,17 +86,26 @@ func (o *HasOnlyReadOnly) SetFoo(v string) {
o.Foo = &v o.Foo = &v
} }
type NullableHasOnlyReadOnly struct {
// MarshalJSON returns the JSON representation of the model. Value HasOnlyReadOnly
func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Bar != nil {
toSerialize["bar"] = o.Bar
}
if o.Foo != nil {
toSerialize["foo"] = o.Foo
}
return json.Marshal(toSerialize)
} }
func (v NullableHasOnlyReadOnly) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,29 +8,31 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "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. // 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 { type HealthCheckResult struct {
NullableMessage *string `json:"NullableMessage,omitempty"` NullableMessage *NullableString `json:"NullableMessage,omitempty"`
isExplicitNullNullableMessage bool `json:"-"`
} }
// GetNullableMessage returns the NullableMessage field if non-nil, zero value otherwise. // GetNullableMessage returns the NullableMessage field value if set, zero value otherwise.
func (o *HealthCheckResult) GetNullableMessage() string { func (o *HealthCheckResult) GetNullableMessage() NullableString {
if o == nil || o.NullableMessage == nil { if o == nil || o.NullableMessage == nil {
var ret string var ret NullableString
return ret return ret
} }
return *o.NullableMessage return *o.NullableMessage
} }
// GetNullableMessageOk returns a tuple with the NullableMessage field if it's non-nil, zero value otherwise // GetNullableMessageOk returns a tuple with the NullableMessage field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *HealthCheckResult) GetNullableMessageOk() (string, bool) { func (o *HealthCheckResult) GetNullableMessageOk() (NullableString, bool) {
if o == nil || o.NullableMessage == nil { if o == nil || o.NullableMessage == nil {
var ret string var ret NullableString
return ret, false return ret, false
} }
return *o.NullableMessage, true return *o.NullableMessage, true
@ -45,30 +47,31 @@ func (o *HealthCheckResult) HasNullableMessage() bool {
return false return false
} }
// SetNullableMessage gets a reference to the given string and assigns it to the NullableMessage field. // SetNullableMessage gets a reference to the given NullableString and assigns it to the NullableMessage field.
func (o *HealthCheckResult) SetNullableMessage(v string) { func (o *HealthCheckResult) SetNullableMessage(v NullableString) {
o.NullableMessage = &v o.NullableMessage = &v
} }
// SetNullableMessageExplicitNull (un)sets NullableMessage to be considered as explicit "null" value type NullableHealthCheckResult struct {
// when serializing to JSON (pass true as argument to set this, false to unset) Value HealthCheckResult
// The NullableMessage value is set to nil even if false is passed ExplicitNull bool
func (o *HealthCheckResult) SetNullableMessageExplicitNull(b bool) {
o.NullableMessage = nil
o.isExplicitNullNullableMessage = b
} }
// MarshalJSON returns the JSON representation of the model. func (v NullableHealthCheckResult) MarshalJSON() ([]byte, error) {
func (o HealthCheckResult) MarshalJSON() ([]byte, error) { switch {
toSerialize := map[string]interface{}{} case v.ExplicitNull:
if o.NullableMessage == nil { return []byte("null"), nil
if o.isExplicitNullNullableMessage { default:
toSerialize["NullableMessage"] = o.NullableMessage return json.Marshal(v.Value)
}
} else {
toSerialize["NullableMessage"] = o.NullableMessage
} }
return json.Marshal(toSerialize)
} }
func (v *NullableHealthCheckResult) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}

View File

@ -8,20 +8,21 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// InlineObject struct for InlineObject // InlineObject struct for InlineObject
type InlineObject struct { type InlineObject struct {
// Updated name of the pet // Updated name of the pet
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
// Updated status of the pet // Updated status of the pet
Status *string `json:"status,omitempty"` Status *string `json:"status,omitempty"`
} }
// GetName returns the Name field if non-nil, zero value otherwise. // GetName returns the Name field value if set, zero value otherwise.
func (o *InlineObject) GetName() string { func (o *InlineObject) GetName() string {
if o == nil || o.Name == nil { if o == nil || o.Name == nil {
var ret string var ret string
@ -30,7 +31,7 @@ func (o *InlineObject) GetName() string {
return *o.Name return *o.Name
} }
// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // GetNameOk returns a tuple with the Name field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Name == nil {
@ -54,7 +55,7 @@ func (o *InlineObject) SetName(v string) {
o.Name = &v o.Name = &v
} }
// GetStatus returns the Status field if non-nil, zero value otherwise. // GetStatus returns the Status field value if set, zero value otherwise.
func (o *InlineObject) GetStatus() string { func (o *InlineObject) GetStatus() string {
if o == nil || o.Status == nil { if o == nil || o.Status == nil {
var ret string var ret string
@ -63,7 +64,7 @@ func (o *InlineObject) GetStatus() string {
return *o.Status return *o.Status
} }
// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise // GetStatusOk returns a tuple with the Status field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Status == nil {
@ -87,17 +88,26 @@ func (o *InlineObject) SetStatus(v string) {
o.Status = &v o.Status = &v
} }
type NullableInlineObject struct {
// MarshalJSON returns the JSON representation of the model. Value InlineObject
func (o InlineObject) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
} }
func (v NullableInlineObject) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,21 +8,22 @@
*/ */
package openapi package openapi
import ( import (
"os" "bytes"
"encoding/json" "encoding/json"
"os"
) )
// InlineObject1 struct for InlineObject1 // InlineObject1 struct for InlineObject1
type InlineObject1 struct { type InlineObject1 struct {
// Additional data to pass to server // Additional data to pass to server
AdditionalMetadata *string `json:"additionalMetadata,omitempty"` AdditionalMetadata *string `json:"additionalMetadata,omitempty"`
// file to upload // file to upload
File **os.File `json:"file,omitempty"` File **os.File `json:"file,omitempty"`
} }
// GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise. // GetAdditionalMetadata returns the AdditionalMetadata field value if set, zero value otherwise.
func (o *InlineObject1) GetAdditionalMetadata() string { func (o *InlineObject1) GetAdditionalMetadata() string {
if o == nil || o.AdditionalMetadata == nil { if o == nil || o.AdditionalMetadata == nil {
var ret string var ret string
@ -31,7 +32,7 @@ func (o *InlineObject1) GetAdditionalMetadata() string {
return *o.AdditionalMetadata return *o.AdditionalMetadata
} }
// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise // GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.AdditionalMetadata == nil {
@ -55,7 +56,7 @@ func (o *InlineObject1) SetAdditionalMetadata(v string) {
o.AdditionalMetadata = &v o.AdditionalMetadata = &v
} }
// GetFile returns the File field if non-nil, zero value otherwise. // GetFile returns the File field value if set, zero value otherwise.
func (o *InlineObject1) GetFile() *os.File { func (o *InlineObject1) GetFile() *os.File {
if o == nil || o.File == nil { if o == nil || o.File == nil {
var ret *os.File var ret *os.File
@ -64,7 +65,7 @@ func (o *InlineObject1) GetFile() *os.File {
return *o.File return *o.File
} }
// GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise // GetFileOk returns a tuple with the File field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.File == nil {
@ -88,17 +89,26 @@ func (o *InlineObject1) SetFile(v *os.File) {
o.File = &v o.File = &v
} }
type NullableInlineObject1 struct {
// MarshalJSON returns the JSON representation of the model. Value InlineObject1
func (o InlineObject1) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.AdditionalMetadata != nil {
toSerialize["additionalMetadata"] = o.AdditionalMetadata
}
if o.File != nil {
toSerialize["file"] = o.File
}
return json.Marshal(toSerialize)
} }
func (v NullableInlineObject1) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,20 +8,21 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// InlineObject2 struct for InlineObject2 // InlineObject2 struct for InlineObject2
type InlineObject2 struct { type InlineObject2 struct {
// Form parameter enum test (string array) // Form parameter enum test (string array)
EnumFormStringArray *[]string `json:"enum_form_string_array,omitempty"` EnumFormStringArray *[]string `json:"enum_form_string_array,omitempty"`
// Form parameter enum test (string) // Form parameter enum test (string)
EnumFormString *string `json:"enum_form_string,omitempty"` EnumFormString *string `json:"enum_form_string,omitempty"`
} }
// GetEnumFormStringArray returns the EnumFormStringArray field if non-nil, zero value otherwise. // GetEnumFormStringArray returns the EnumFormStringArray field value if set, zero value otherwise.
func (o *InlineObject2) GetEnumFormStringArray() []string { func (o *InlineObject2) GetEnumFormStringArray() []string {
if o == nil || o.EnumFormStringArray == nil { if o == nil || o.EnumFormStringArray == nil {
var ret []string var ret []string
@ -30,7 +31,7 @@ func (o *InlineObject2) GetEnumFormStringArray() []string {
return *o.EnumFormStringArray return *o.EnumFormStringArray
} }
// GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field if it's non-nil, zero value otherwise // GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.EnumFormStringArray == nil {
@ -54,7 +55,7 @@ func (o *InlineObject2) SetEnumFormStringArray(v []string) {
o.EnumFormStringArray = &v o.EnumFormStringArray = &v
} }
// GetEnumFormString returns the EnumFormString field if non-nil, zero value otherwise. // GetEnumFormString returns the EnumFormString field value if set, zero value otherwise.
func (o *InlineObject2) GetEnumFormString() string { func (o *InlineObject2) GetEnumFormString() string {
if o == nil || o.EnumFormString == nil { if o == nil || o.EnumFormString == nil {
var ret string var ret string
@ -63,7 +64,7 @@ func (o *InlineObject2) GetEnumFormString() string {
return *o.EnumFormString return *o.EnumFormString
} }
// GetEnumFormStringOk returns a tuple with the EnumFormString field if it's non-nil, zero value otherwise // GetEnumFormStringOk returns a tuple with the EnumFormString field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.EnumFormString == nil {
@ -87,17 +88,26 @@ func (o *InlineObject2) SetEnumFormString(v string) {
o.EnumFormString = &v o.EnumFormString = &v
} }
type NullableInlineObject2 struct {
// MarshalJSON returns the JSON representation of the model. Value InlineObject2
func (o InlineObject2) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableInlineObject2) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,59 +8,47 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json"
"os" "os"
"time" "time"
"encoding/json"
"errors"
) )
// InlineObject3 struct for InlineObject3 // InlineObject3 struct for InlineObject3
type InlineObject3 struct { type InlineObject3 struct {
// None // None
Integer *int32 `json:"integer,omitempty"` Integer *int32 `json:"integer,omitempty"`
// None // None
Int32 *int32 `json:"int32,omitempty"` Int32 *int32 `json:"int32,omitempty"`
// None // None
Int64 *int64 `json:"int64,omitempty"` Int64 *int64 `json:"int64,omitempty"`
// None // None
Number *float32 `json:"number,omitempty"` Number float32 `json:"number"`
// None // None
Float *float32 `json:"float,omitempty"` Float *float32 `json:"float,omitempty"`
// None // None
Double *float64 `json:"double,omitempty"` Double float64 `json:"double"`
// None // None
String *string `json:"string,omitempty"` String *string `json:"string,omitempty"`
// None // None
PatternWithoutDelimiter *string `json:"pattern_without_delimiter,omitempty"` PatternWithoutDelimiter string `json:"pattern_without_delimiter"`
// None // None
Byte *string `json:"byte,omitempty"` Byte string `json:"byte"`
// None // None
Binary **os.File `json:"binary,omitempty"` Binary **os.File `json:"binary,omitempty"`
// None // None
Date *string `json:"date,omitempty"` Date *string `json:"date,omitempty"`
// None // None
DateTime *time.Time `json:"dateTime,omitempty"` DateTime *time.Time `json:"dateTime,omitempty"`
// None // None
Password *string `json:"password,omitempty"` Password *string `json:"password,omitempty"`
// None // None
Callback *string `json:"callback,omitempty"` Callback *string `json:"callback,omitempty"`
} }
// GetInteger returns the Integer field if non-nil, zero value otherwise. // GetInteger returns the Integer field value if set, zero value otherwise.
func (o *InlineObject3) GetInteger() int32 { func (o *InlineObject3) GetInteger() int32 {
if o == nil || o.Integer == nil { if o == nil || o.Integer == nil {
var ret int32 var ret int32
@ -69,7 +57,7 @@ func (o *InlineObject3) GetInteger() int32 {
return *o.Integer return *o.Integer
} }
// GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise // GetIntegerOk returns a tuple with the Integer field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Integer == nil {
@ -93,7 +81,7 @@ func (o *InlineObject3) SetInteger(v int32) {
o.Integer = &v o.Integer = &v
} }
// GetInt32 returns the Int32 field if non-nil, zero value otherwise. // GetInt32 returns the Int32 field value if set, zero value otherwise.
func (o *InlineObject3) GetInt32() int32 { func (o *InlineObject3) GetInt32() int32 {
if o == nil || o.Int32 == nil { if o == nil || o.Int32 == nil {
var ret int32 var ret int32
@ -102,7 +90,7 @@ func (o *InlineObject3) GetInt32() int32 {
return *o.Int32 return *o.Int32
} }
// GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise // GetInt32Ok returns a tuple with the Int32 field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Int32 == nil {
@ -126,7 +114,7 @@ func (o *InlineObject3) SetInt32(v int32) {
o.Int32 = &v o.Int32 = &v
} }
// GetInt64 returns the Int64 field if non-nil, zero value otherwise. // GetInt64 returns the Int64 field value if set, zero value otherwise.
func (o *InlineObject3) GetInt64() int64 { func (o *InlineObject3) GetInt64() int64 {
if o == nil || o.Int64 == nil { if o == nil || o.Int64 == nil {
var ret int64 var ret int64
@ -135,7 +123,7 @@ func (o *InlineObject3) GetInt64() int64 {
return *o.Int64 return *o.Int64
} }
// GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise // GetInt64Ok returns a tuple with the Int64 field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Int64 == nil {
@ -159,40 +147,22 @@ func (o *InlineObject3) SetInt64(v int64) {
o.Int64 = &v o.Int64 = &v
} }
// GetNumber returns the Number field if non-nil, zero value otherwise. // GetNumber returns the Number field value
func (o *InlineObject3) GetNumber() float32 { func (o *InlineObject3) GetNumber() float32 {
if o == nil || o.Number == nil { if o == nil {
var ret float32 var ret float32
return ret return ret
} }
return *o.Number
return o.Number
} }
// GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise // SetNumber sets field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetNumberOk() (float32, bool) {
if o == nil || o.Number == nil {
var ret float32
return ret, false
}
return *o.Number, true
}
// HasNumber returns a boolean if a field has been set.
func (o *InlineObject3) HasNumber() bool {
if o != nil && o.Number != nil {
return true
}
return false
}
// SetNumber gets a reference to the given float32 and assigns it to the Number field.
func (o *InlineObject3) SetNumber(v float32) { func (o *InlineObject3) SetNumber(v float32) {
o.Number = &v o.Number = v
} }
// GetFloat returns the Float field if non-nil, zero value otherwise. // GetFloat returns the Float field value if set, zero value otherwise.
func (o *InlineObject3) GetFloat() float32 { func (o *InlineObject3) GetFloat() float32 {
if o == nil || o.Float == nil { if o == nil || o.Float == nil {
var ret float32 var ret float32
@ -201,7 +171,7 @@ func (o *InlineObject3) GetFloat() float32 {
return *o.Float return *o.Float
} }
// GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise // GetFloatOk returns a tuple with the Float field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Float == nil {
@ -225,40 +195,22 @@ func (o *InlineObject3) SetFloat(v float32) {
o.Float = &v o.Float = &v
} }
// GetDouble returns the Double field if non-nil, zero value otherwise. // GetDouble returns the Double field value
func (o *InlineObject3) GetDouble() float64 { func (o *InlineObject3) GetDouble() float64 {
if o == nil || o.Double == nil { if o == nil {
var ret float64 var ret float64
return ret return ret
} }
return *o.Double
return o.Double
} }
// GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise // SetDouble sets field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetDoubleOk() (float64, bool) {
if o == nil || o.Double == nil {
var ret float64
return ret, false
}
return *o.Double, true
}
// HasDouble returns a boolean if a field has been set.
func (o *InlineObject3) HasDouble() bool {
if o != nil && o.Double != nil {
return true
}
return false
}
// SetDouble gets a reference to the given float64 and assigns it to the Double field.
func (o *InlineObject3) SetDouble(v float64) { func (o *InlineObject3) SetDouble(v float64) {
o.Double = &v o.Double = v
} }
// GetString returns the String field if non-nil, zero value otherwise. // GetString returns the String field value if set, zero value otherwise.
func (o *InlineObject3) GetString() string { func (o *InlineObject3) GetString() string {
if o == nil || o.String == nil { if o == nil || o.String == nil {
var ret string var ret string
@ -267,7 +219,7 @@ func (o *InlineObject3) GetString() string {
return *o.String return *o.String
} }
// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise // GetStringOk returns a tuple with the String field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.String == nil {
@ -291,73 +243,37 @@ func (o *InlineObject3) SetString(v string) {
o.String = &v o.String = &v
} }
// GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field if non-nil, zero value otherwise. // GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field value
func (o *InlineObject3) GetPatternWithoutDelimiter() string { func (o *InlineObject3) GetPatternWithoutDelimiter() string {
if o == nil || o.PatternWithoutDelimiter == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.PatternWithoutDelimiter
return o.PatternWithoutDelimiter
} }
// GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field if it's non-nil, zero value otherwise // SetPatternWithoutDelimiter sets field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetPatternWithoutDelimiterOk() (string, bool) {
if o == nil || o.PatternWithoutDelimiter == nil {
var ret string
return ret, false
}
return *o.PatternWithoutDelimiter, true
}
// HasPatternWithoutDelimiter returns a boolean if a field has been set.
func (o *InlineObject3) HasPatternWithoutDelimiter() bool {
if o != nil && o.PatternWithoutDelimiter != nil {
return true
}
return false
}
// SetPatternWithoutDelimiter gets a reference to the given string and assigns it to the PatternWithoutDelimiter field.
func (o *InlineObject3) SetPatternWithoutDelimiter(v string) { func (o *InlineObject3) SetPatternWithoutDelimiter(v string) {
o.PatternWithoutDelimiter = &v o.PatternWithoutDelimiter = v
} }
// GetByte returns the Byte field if non-nil, zero value otherwise. // GetByte returns the Byte field value
func (o *InlineObject3) GetByte() string { func (o *InlineObject3) GetByte() string {
if o == nil || o.Byte == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.Byte
return o.Byte
} }
// GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise // SetByte sets field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetByteOk() (string, bool) {
if o == nil || o.Byte == nil {
var ret string
return ret, false
}
return *o.Byte, true
}
// HasByte returns a boolean if a field has been set.
func (o *InlineObject3) HasByte() bool {
if o != nil && o.Byte != nil {
return true
}
return false
}
// SetByte gets a reference to the given string and assigns it to the Byte field.
func (o *InlineObject3) SetByte(v string) { func (o *InlineObject3) SetByte(v string) {
o.Byte = &v o.Byte = v
} }
// GetBinary returns the Binary field if non-nil, zero value otherwise. // GetBinary returns the Binary field value if set, zero value otherwise.
func (o *InlineObject3) GetBinary() *os.File { func (o *InlineObject3) GetBinary() *os.File {
if o == nil || o.Binary == nil { if o == nil || o.Binary == nil {
var ret *os.File var ret *os.File
@ -366,7 +282,7 @@ func (o *InlineObject3) GetBinary() *os.File {
return *o.Binary return *o.Binary
} }
// GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise // GetBinaryOk returns a tuple with the Binary field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Binary == nil {
@ -390,7 +306,7 @@ func (o *InlineObject3) SetBinary(v *os.File) {
o.Binary = &v o.Binary = &v
} }
// GetDate returns the Date field if non-nil, zero value otherwise. // GetDate returns the Date field value if set, zero value otherwise.
func (o *InlineObject3) GetDate() string { func (o *InlineObject3) GetDate() string {
if o == nil || o.Date == nil { if o == nil || o.Date == nil {
var ret string var ret string
@ -399,7 +315,7 @@ func (o *InlineObject3) GetDate() string {
return *o.Date return *o.Date
} }
// GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise // GetDateOk returns a tuple with the Date field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Date == nil {
@ -423,7 +339,7 @@ func (o *InlineObject3) SetDate(v string) {
o.Date = &v o.Date = &v
} }
// GetDateTime returns the DateTime field if non-nil, zero value otherwise. // GetDateTime returns the DateTime field value if set, zero value otherwise.
func (o *InlineObject3) GetDateTime() time.Time { func (o *InlineObject3) GetDateTime() time.Time {
if o == nil || o.DateTime == nil { if o == nil || o.DateTime == nil {
var ret time.Time var ret time.Time
@ -432,7 +348,7 @@ func (o *InlineObject3) GetDateTime() time.Time {
return *o.DateTime return *o.DateTime
} }
// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise // GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.DateTime == nil {
@ -456,7 +372,7 @@ func (o *InlineObject3) SetDateTime(v time.Time) {
o.DateTime = &v o.DateTime = &v
} }
// GetPassword returns the Password field if non-nil, zero value otherwise. // GetPassword returns the Password field value if set, zero value otherwise.
func (o *InlineObject3) GetPassword() string { func (o *InlineObject3) GetPassword() string {
if o == nil || o.Password == nil { if o == nil || o.Password == nil {
var ret string var ret string
@ -465,7 +381,7 @@ func (o *InlineObject3) GetPassword() string {
return *o.Password return *o.Password
} }
// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise // GetPasswordOk returns a tuple with the Password field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Password == nil {
@ -489,7 +405,7 @@ func (o *InlineObject3) SetPassword(v string) {
o.Password = &v o.Password = &v
} }
// GetCallback returns the Callback field if non-nil, zero value otherwise. // GetCallback returns the Callback field value if set, zero value otherwise.
func (o *InlineObject3) GetCallback() string { func (o *InlineObject3) GetCallback() string {
if o == nil || o.Callback == nil { if o == nil || o.Callback == nil {
var ret string var ret string
@ -498,7 +414,7 @@ func (o *InlineObject3) GetCallback() string {
return *o.Callback return *o.Callback
} }
// GetCallbackOk returns a tuple with the Callback field if it's non-nil, zero value otherwise // GetCallbackOk returns a tuple with the Callback field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Callback == nil {
@ -522,65 +438,26 @@ func (o *InlineObject3) SetCallback(v string) {
o.Callback = &v o.Callback = &v
} }
type NullableInlineObject3 struct {
// MarshalJSON returns the JSON representation of the model. Value InlineObject3
func (o InlineObject3) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Integer != nil {
toSerialize["integer"] = o.Integer
}
if o.Int32 != nil {
toSerialize["int32"] = o.Int32
}
if o.Int64 != nil {
toSerialize["int64"] = o.Int64
}
if o.Number == nil {
return nil, errors.New("Number is required and not nullable, but was not set on InlineObject3")
}
if o.Number != nil {
toSerialize["number"] = o.Number
}
if o.Float != nil {
toSerialize["float"] = o.Float
}
if o.Double == nil {
return nil, errors.New("Double is required and not nullable, but was not set on InlineObject3")
}
if o.Double != nil {
toSerialize["double"] = o.Double
}
if o.String != nil {
toSerialize["string"] = o.String
}
if o.PatternWithoutDelimiter == nil {
return nil, errors.New("PatternWithoutDelimiter is required and not nullable, but was not set on InlineObject3")
}
if o.PatternWithoutDelimiter != nil {
toSerialize["pattern_without_delimiter"] = o.PatternWithoutDelimiter
}
if o.Byte == nil {
return nil, errors.New("Byte is required and not nullable, but was not set on InlineObject3")
}
if o.Byte != nil {
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)
} }
func (v NullableInlineObject3) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,103 +8,70 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
"errors"
) )
// InlineObject4 struct for InlineObject4 // InlineObject4 struct for InlineObject4
type InlineObject4 struct { type InlineObject4 struct {
// field1 // field1
Param *string `json:"param,omitempty"` Param string `json:"param"`
// field2 // field2
Param2 *string `json:"param2,omitempty"` Param2 string `json:"param2"`
} }
// GetParam returns the Param field if non-nil, zero value otherwise. // GetParam returns the Param field value
func (o *InlineObject4) GetParam() string { func (o *InlineObject4) GetParam() string {
if o == nil || o.Param == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.Param
return o.Param
} }
// GetParamOk returns a tuple with the Param field if it's non-nil, zero value otherwise // SetParam sets field value
// and a boolean to check if the value has been set.
func (o *InlineObject4) GetParamOk() (string, bool) {
if o == nil || o.Param == nil {
var ret string
return ret, false
}
return *o.Param, true
}
// HasParam returns a boolean if a field has been set.
func (o *InlineObject4) HasParam() bool {
if o != nil && o.Param != nil {
return true
}
return false
}
// SetParam gets a reference to the given string and assigns it to the Param field.
func (o *InlineObject4) SetParam(v string) { func (o *InlineObject4) SetParam(v string) {
o.Param = &v o.Param = v
} }
// GetParam2 returns the Param2 field if non-nil, zero value otherwise. // GetParam2 returns the Param2 field value
func (o *InlineObject4) GetParam2() string { func (o *InlineObject4) GetParam2() string {
if o == nil || o.Param2 == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.Param2
return o.Param2
} }
// GetParam2Ok returns a tuple with the Param2 field if it's non-nil, zero value otherwise // SetParam2 sets field value
// and a boolean to check if the value has been set.
func (o *InlineObject4) GetParam2Ok() (string, bool) {
if o == nil || o.Param2 == nil {
var ret string
return ret, false
}
return *o.Param2, true
}
// HasParam2 returns a boolean if a field has been set.
func (o *InlineObject4) HasParam2() bool {
if o != nil && o.Param2 != nil {
return true
}
return false
}
// SetParam2 gets a reference to the given string and assigns it to the Param2 field.
func (o *InlineObject4) SetParam2(v string) { func (o *InlineObject4) SetParam2(v string) {
o.Param2 = &v o.Param2 = v
} }
type NullableInlineObject4 struct {
// MarshalJSON returns the JSON representation of the model. Value InlineObject4
func (o InlineObject4) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Param == nil {
return nil, errors.New("Param is required and not nullable, but was not set on InlineObject4")
}
if o.Param != nil {
toSerialize["param"] = o.Param
}
if o.Param2 == nil {
return nil, errors.New("Param2 is required and not nullable, but was not set on InlineObject4")
}
if o.Param2 != nil {
toSerialize["param2"] = o.Param2
}
return json.Marshal(toSerialize)
} }
func (v NullableInlineObject4) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,22 +8,22 @@
*/ */
package openapi package openapi
import ( import (
"os" "bytes"
"encoding/json" "encoding/json"
"errors" "os"
) )
// InlineObject5 struct for InlineObject5 // InlineObject5 struct for InlineObject5
type InlineObject5 struct { type InlineObject5 struct {
// Additional data to pass to server // Additional data to pass to server
AdditionalMetadata *string `json:"additionalMetadata,omitempty"` AdditionalMetadata *string `json:"additionalMetadata,omitempty"`
// file to upload // file to upload
RequiredFile **os.File `json:"requiredFile,omitempty"` RequiredFile *os.File `json:"requiredFile"`
} }
// GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise. // GetAdditionalMetadata returns the AdditionalMetadata field value if set, zero value otherwise.
func (o *InlineObject5) GetAdditionalMetadata() string { func (o *InlineObject5) GetAdditionalMetadata() string {
if o == nil || o.AdditionalMetadata == nil { if o == nil || o.AdditionalMetadata == nil {
var ret string var ret string
@ -32,7 +32,7 @@ func (o *InlineObject5) GetAdditionalMetadata() string {
return *o.AdditionalMetadata return *o.AdditionalMetadata
} }
// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise // GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.AdditionalMetadata == nil {
@ -56,53 +56,41 @@ func (o *InlineObject5) SetAdditionalMetadata(v string) {
o.AdditionalMetadata = &v o.AdditionalMetadata = &v
} }
// GetRequiredFile returns the RequiredFile field if non-nil, zero value otherwise. // GetRequiredFile returns the RequiredFile field value
func (o *InlineObject5) GetRequiredFile() *os.File { func (o *InlineObject5) GetRequiredFile() *os.File {
if o == nil || o.RequiredFile == nil { if o == nil {
var ret *os.File var ret *os.File
return ret return ret
} }
return *o.RequiredFile
return o.RequiredFile
} }
// GetRequiredFileOk returns a tuple with the RequiredFile field if it's non-nil, zero value otherwise // SetRequiredFile sets field value
// and a boolean to check if the value has been set.
func (o *InlineObject5) GetRequiredFileOk() (*os.File, bool) {
if o == nil || o.RequiredFile == nil {
var ret *os.File
return ret, false
}
return *o.RequiredFile, true
}
// HasRequiredFile returns a boolean if a field has been set.
func (o *InlineObject5) HasRequiredFile() bool {
if o != nil && o.RequiredFile != nil {
return true
}
return false
}
// SetRequiredFile gets a reference to the given *os.File and assigns it to the RequiredFile field.
func (o *InlineObject5) SetRequiredFile(v *os.File) { func (o *InlineObject5) SetRequiredFile(v *os.File) {
o.RequiredFile = &v o.RequiredFile = v
} }
type NullableInlineObject5 struct {
// MarshalJSON returns the JSON representation of the model. Value InlineObject5
func (o InlineObject5) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.AdditionalMetadata != nil {
toSerialize["additionalMetadata"] = o.AdditionalMetadata
}
if o.RequiredFile == nil {
return nil, errors.New("RequiredFile is required and not nullable, but was not set on InlineObject5")
}
if o.RequiredFile != nil {
toSerialize["requiredFile"] = o.RequiredFile
}
return json.Marshal(toSerialize)
} }
func (v NullableInlineObject5) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// InlineResponseDefault struct for InlineResponseDefault // InlineResponseDefault struct for InlineResponseDefault
type InlineResponseDefault struct { type InlineResponseDefault struct {
String *Foo `json:"string,omitempty"` String *Foo `json:"string,omitempty"`
} }
// GetString returns the String field if non-nil, zero value otherwise. // GetString returns the String field value if set, zero value otherwise.
func (o *InlineResponseDefault) GetString() Foo { func (o *InlineResponseDefault) GetString() Foo {
if o == nil || o.String == nil { if o == nil || o.String == nil {
var ret Foo var ret Foo
@ -26,7 +28,7 @@ func (o *InlineResponseDefault) GetString() Foo {
return *o.String return *o.String
} }
// GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise // GetStringOk returns a tuple with the String field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.String == nil {
@ -50,14 +52,26 @@ func (o *InlineResponseDefault) SetString(v Foo) {
o.String = &v o.String = &v
} }
type NullableInlineResponseDefault struct {
// MarshalJSON returns the JSON representation of the model. Value InlineResponseDefault
func (o InlineResponseDefault) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.String != nil {
toSerialize["string"] = o.String
}
return json.Marshal(toSerialize)
} }
func (v NullableInlineResponseDefault) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// List struct for List // List struct for List
type List struct { type List struct {
Var123List *string `json:"123-list,omitempty"` Var123List *string `json:"123-list,omitempty"`
} }
// GetVar123List returns the Var123List field if non-nil, zero value otherwise. // GetVar123List returns the Var123List field value if set, zero value otherwise.
func (o *List) GetVar123List() string { func (o *List) GetVar123List() string {
if o == nil || o.Var123List == nil { if o == nil || o.Var123List == nil {
var ret string var ret string
@ -26,7 +28,7 @@ func (o *List) GetVar123List() string {
return *o.Var123List return *o.Var123List
} }
// GetVar123ListOk returns a tuple with the Var123List field if it's non-nil, zero value otherwise // GetVar123ListOk returns a tuple with the Var123List field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Var123List == nil {
@ -50,14 +52,26 @@ func (o *List) SetVar123List(v string) {
o.Var123List = &v o.Var123List = &v
} }
type NullableList struct {
// MarshalJSON returns the JSON representation of the model. Value List
func (o List) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Var123List != nil {
toSerialize["123-list"] = o.Var123List
}
return json.Marshal(toSerialize)
} }
func (v NullableList) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,22 +8,21 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// MapTest struct for MapTest // MapTest struct for MapTest
type MapTest struct { type MapTest struct {
MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty"` MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty"`
MapOfEnumString *map[string]string `json:"map_of_enum_string,omitempty"` MapOfEnumString *map[string]string `json:"map_of_enum_string,omitempty"`
DirectMap *map[string]bool `json:"direct_map,omitempty"` DirectMap *map[string]bool `json:"direct_map,omitempty"`
IndirectMap *map[string]bool `json:"indirect_map,omitempty"` IndirectMap *map[string]bool `json:"indirect_map,omitempty"`
} }
// GetMapMapOfString returns the MapMapOfString field if non-nil, zero value otherwise. // GetMapMapOfString returns the MapMapOfString field value if set, zero value otherwise.
func (o *MapTest) GetMapMapOfString() map[string]map[string]string { func (o *MapTest) GetMapMapOfString() map[string]map[string]string {
if o == nil || o.MapMapOfString == nil { if o == nil || o.MapMapOfString == nil {
var ret map[string]map[string]string var ret map[string]map[string]string
@ -32,7 +31,7 @@ func (o *MapTest) GetMapMapOfString() map[string]map[string]string {
return *o.MapMapOfString return *o.MapMapOfString
} }
// GetMapMapOfStringOk returns a tuple with the MapMapOfString field if it's non-nil, zero value otherwise // GetMapMapOfStringOk returns a tuple with the MapMapOfString field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.MapMapOfString == nil {
@ -56,7 +55,7 @@ func (o *MapTest) SetMapMapOfString(v map[string]map[string]string) {
o.MapMapOfString = &v o.MapMapOfString = &v
} }
// GetMapOfEnumString returns the MapOfEnumString field if non-nil, zero value otherwise. // GetMapOfEnumString returns the MapOfEnumString field value if set, zero value otherwise.
func (o *MapTest) GetMapOfEnumString() map[string]string { func (o *MapTest) GetMapOfEnumString() map[string]string {
if o == nil || o.MapOfEnumString == nil { if o == nil || o.MapOfEnumString == nil {
var ret map[string]string var ret map[string]string
@ -65,7 +64,7 @@ func (o *MapTest) GetMapOfEnumString() map[string]string {
return *o.MapOfEnumString return *o.MapOfEnumString
} }
// GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field if it's non-nil, zero value otherwise // GetMapOfEnumStringOk returns a tuple with the MapOfEnumString field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.MapOfEnumString == nil {
@ -89,7 +88,7 @@ func (o *MapTest) SetMapOfEnumString(v map[string]string) {
o.MapOfEnumString = &v o.MapOfEnumString = &v
} }
// GetDirectMap returns the DirectMap field if non-nil, zero value otherwise. // GetDirectMap returns the DirectMap field value if set, zero value otherwise.
func (o *MapTest) GetDirectMap() map[string]bool { func (o *MapTest) GetDirectMap() map[string]bool {
if o == nil || o.DirectMap == nil { if o == nil || o.DirectMap == nil {
var ret map[string]bool var ret map[string]bool
@ -98,7 +97,7 @@ func (o *MapTest) GetDirectMap() map[string]bool {
return *o.DirectMap return *o.DirectMap
} }
// GetDirectMapOk returns a tuple with the DirectMap field if it's non-nil, zero value otherwise // GetDirectMapOk returns a tuple with the DirectMap field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.DirectMap == nil {
@ -122,7 +121,7 @@ func (o *MapTest) SetDirectMap(v map[string]bool) {
o.DirectMap = &v o.DirectMap = &v
} }
// GetIndirectMap returns the IndirectMap field if non-nil, zero value otherwise. // GetIndirectMap returns the IndirectMap field value if set, zero value otherwise.
func (o *MapTest) GetIndirectMap() map[string]bool { func (o *MapTest) GetIndirectMap() map[string]bool {
if o == nil || o.IndirectMap == nil { if o == nil || o.IndirectMap == nil {
var ret map[string]bool var ret map[string]bool
@ -131,7 +130,7 @@ func (o *MapTest) GetIndirectMap() map[string]bool {
return *o.IndirectMap return *o.IndirectMap
} }
// GetIndirectMapOk returns a tuple with the IndirectMap field if it's non-nil, zero value otherwise // GetIndirectMapOk returns a tuple with the IndirectMap field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.IndirectMap == nil {
@ -155,23 +154,26 @@ func (o *MapTest) SetIndirectMap(v map[string]bool) {
o.IndirectMap = &v o.IndirectMap = &v
} }
type NullableMapTest struct {
// MarshalJSON returns the JSON representation of the model. Value MapTest
func (o MapTest) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableMapTest) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,21 +8,21 @@
*/ */
package openapi package openapi
import ( import (
"time" "bytes"
"encoding/json" "encoding/json"
"time"
) )
// MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass
type MixedPropertiesAndAdditionalPropertiesClass struct { type MixedPropertiesAndAdditionalPropertiesClass struct {
Uuid *string `json:"uuid,omitempty"` Uuid *string `json:"uuid,omitempty"`
DateTime *time.Time `json:"dateTime,omitempty"` DateTime *time.Time `json:"dateTime,omitempty"`
Map *map[string]Animal `json:"map,omitempty"` Map *map[string]Animal `json:"map,omitempty"`
} }
// GetUuid returns the Uuid field if non-nil, zero value otherwise. // GetUuid returns the Uuid field value if set, zero value otherwise.
func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string { func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string {
if o == nil || o.Uuid == nil { if o == nil || o.Uuid == nil {
var ret string var ret string
@ -31,7 +31,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetUuid() string {
return *o.Uuid return *o.Uuid
} }
// GetUuidOk returns a tuple with the Uuid field if it's non-nil, zero value otherwise // GetUuidOk returns a tuple with the Uuid field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Uuid == nil {
@ -55,7 +55,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetUuid(v string) {
o.Uuid = &v o.Uuid = &v
} }
// GetDateTime returns the DateTime field if non-nil, zero value otherwise. // GetDateTime returns the DateTime field value if set, zero value otherwise.
func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time { func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time {
if o == nil || o.DateTime == nil { if o == nil || o.DateTime == nil {
var ret time.Time var ret time.Time
@ -64,7 +64,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetDateTime() time.Time {
return *o.DateTime return *o.DateTime
} }
// GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise // GetDateTimeOk returns a tuple with the DateTime field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.DateTime == nil {
@ -88,7 +88,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetDateTime(v time.Time) {
o.DateTime = &v o.DateTime = &v
} }
// GetMap returns the Map field if non-nil, zero value otherwise. // GetMap returns the Map field value if set, zero value otherwise.
func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal { func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal {
if o == nil || o.Map == nil { if o == nil || o.Map == nil {
var ret map[string]Animal var ret map[string]Animal
@ -97,7 +97,7 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) GetMap() map[string]Animal
return *o.Map return *o.Map
} }
// GetMapOk returns a tuple with the Map field if it's non-nil, zero value otherwise // GetMapOk returns a tuple with the Map field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Map == nil {
@ -121,20 +121,26 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal
o.Map = &v o.Map = &v
} }
type NullableMixedPropertiesAndAdditionalPropertiesClass struct {
// MarshalJSON returns the JSON representation of the model. Value MixedPropertiesAndAdditionalPropertiesClass
func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableMixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,56 +8,36 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
"errors"
) )
// Name Model for testing model name same as property name // Name Model for testing model name same as property name
type Name struct { type Name struct {
Name *int32 `json:"name,omitempty"` Name int32 `json:"name"`
SnakeCase *int32 `json:"snake_case,omitempty"` SnakeCase *int32 `json:"snake_case,omitempty"`
Property *string `json:"property,omitempty"` Property *string `json:"property,omitempty"`
Var123Number *int32 `json:"123Number,omitempty"` Var123Number *int32 `json:"123Number,omitempty"`
} }
// GetName returns the Name field if non-nil, zero value otherwise. // GetName returns the Name field value
func (o *Name) GetName() int32 { func (o *Name) GetName() int32 {
if o == nil || o.Name == nil { if o == nil {
var ret int32 var ret int32
return ret return ret
} }
return *o.Name
return o.Name
} }
// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // SetName sets field value
// and a boolean to check if the value has been set.
func (o *Name) GetNameOk() (int32, bool) {
if o == nil || o.Name == nil {
var ret int32
return ret, false
}
return *o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *Name) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given int32 and assigns it to the Name field.
func (o *Name) SetName(v int32) { func (o *Name) SetName(v int32) {
o.Name = &v o.Name = v
} }
// GetSnakeCase returns the SnakeCase field if non-nil, zero value otherwise. // GetSnakeCase returns the SnakeCase field value if set, zero value otherwise.
func (o *Name) GetSnakeCase() int32 { func (o *Name) GetSnakeCase() int32 {
if o == nil || o.SnakeCase == nil { if o == nil || o.SnakeCase == nil {
var ret int32 var ret int32
@ -66,7 +46,7 @@ func (o *Name) GetSnakeCase() int32 {
return *o.SnakeCase return *o.SnakeCase
} }
// GetSnakeCaseOk returns a tuple with the SnakeCase field if it's non-nil, zero value otherwise // GetSnakeCaseOk returns a tuple with the SnakeCase field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.SnakeCase == nil {
@ -90,7 +70,7 @@ func (o *Name) SetSnakeCase(v int32) {
o.SnakeCase = &v o.SnakeCase = &v
} }
// GetProperty returns the Property field if non-nil, zero value otherwise. // GetProperty returns the Property field value if set, zero value otherwise.
func (o *Name) GetProperty() string { func (o *Name) GetProperty() string {
if o == nil || o.Property == nil { if o == nil || o.Property == nil {
var ret string var ret string
@ -99,7 +79,7 @@ func (o *Name) GetProperty() string {
return *o.Property return *o.Property
} }
// GetPropertyOk returns a tuple with the Property field if it's non-nil, zero value otherwise // GetPropertyOk returns a tuple with the Property field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Property == nil {
@ -123,7 +103,7 @@ func (o *Name) SetProperty(v string) {
o.Property = &v o.Property = &v
} }
// GetVar123Number returns the Var123Number field if non-nil, zero value otherwise. // GetVar123Number returns the Var123Number field value if set, zero value otherwise.
func (o *Name) GetVar123Number() int32 { func (o *Name) GetVar123Number() int32 {
if o == nil || o.Var123Number == nil { if o == nil || o.Var123Number == nil {
var ret int32 var ret int32
@ -132,7 +112,7 @@ func (o *Name) GetVar123Number() int32 {
return *o.Var123Number return *o.Var123Number
} }
// GetVar123NumberOk returns a tuple with the Var123Number field if it's non-nil, zero value otherwise // GetVar123NumberOk returns a tuple with the Var123Number field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Var123Number == nil {
@ -156,26 +136,26 @@ func (o *Name) SetVar123Number(v int32) {
o.Var123Number = &v o.Var123Number = &v
} }
type NullableName struct {
// MarshalJSON returns the JSON representation of the model. Value Name
func (o Name) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Name == nil {
return nil, errors.New("Name is required and not nullable, but was not set on Name")
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.SnakeCase != nil {
toSerialize["snake_case"] = o.SnakeCase
}
if o.Property != nil {
toSerialize["property"] = o.Property
}
if o.Var123Number != nil {
toSerialize["123Number"] = o.Var123Number
}
return json.Marshal(toSerialize)
} }
func (v NullableName) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,52 +8,43 @@
*/ */
package openapi package openapi
import ( import (
"time" "bytes"
"encoding/json" "encoding/json"
"time"
) )
// NullableClass struct for NullableClass // NullableClass struct for NullableClass
type NullableClass struct { type NullableClass struct {
IntegerProp *int32 `json:"integer_prop,omitempty"` IntegerProp *NullableInt32 `json:"integer_prop,omitempty"`
isExplicitNullIntegerProp bool `json:"-"` NumberProp *NullableFloat32 `json:"number_prop,omitempty"`
NumberProp *float32 `json:"number_prop,omitempty"` BooleanProp *NullableBool `json:"boolean_prop,omitempty"`
isExplicitNullNumberProp bool `json:"-"` StringProp *NullableString `json:"string_prop,omitempty"`
BooleanProp *bool `json:"boolean_prop,omitempty"` DateProp *NullableString `json:"date_prop,omitempty"`
isExplicitNullBooleanProp bool `json:"-"` DatetimeProp *NullableTime.Time `json:"datetime_prop,omitempty"`
StringProp *string `json:"string_prop,omitempty"` ArrayNullableProp *Nullable[]map[string]interface{} `json:"array_nullable_prop,omitempty"`
isExplicitNullStringProp bool `json:"-"` ArrayAndItemsNullableProp *Nullable[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"`
DateProp *string `json:"date_prop,omitempty"`
isExplicitNullDateProp bool `json:"-"`
DatetimeProp *time.Time `json:"datetime_prop,omitempty"`
isExplicitNullDatetimeProp bool `json:"-"`
ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"`
isExplicitNullArrayNullableProp bool `json:"-"`
ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"`
isExplicitNullArrayAndItemsNullableProp bool `json:"-"`
ArrayItemsNullable *[]map[string]interface{} `json:"array_items_nullable,omitempty"` ArrayItemsNullable *[]map[string]interface{} `json:"array_items_nullable,omitempty"`
ObjectNullableProp *NullableMap[string]map[string]interface{} `json:"object_nullable_prop,omitempty"`
ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` ObjectAndItemsNullableProp *NullableMap[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"`
isExplicitNullObjectNullableProp bool `json:"-"`
ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"`
isExplicitNullObjectAndItemsNullableProp bool `json:"-"`
ObjectItemsNullable *map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` ObjectItemsNullable *map[string]map[string]interface{} `json:"object_items_nullable,omitempty"`
} }
// GetIntegerProp returns the IntegerProp field if non-nil, zero value otherwise. // GetIntegerProp returns the IntegerProp field value if set, zero value otherwise.
func (o *NullableClass) GetIntegerProp() int32 { func (o *NullableClass) GetIntegerProp() NullableInt32 {
if o == nil || o.IntegerProp == nil { if o == nil || o.IntegerProp == nil {
var ret int32 var ret NullableInt32
return ret return ret
} }
return *o.IntegerProp return *o.IntegerProp
} }
// GetIntegerPropOk returns a tuple with the IntegerProp field if it's non-nil, zero value otherwise // GetIntegerPropOk returns a tuple with the IntegerProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetIntegerPropOk() (int32, bool) { func (o *NullableClass) GetIntegerPropOk() (NullableInt32, bool) {
if o == nil || o.IntegerProp == nil { if o == nil || o.IntegerProp == nil {
var ret int32 var ret NullableInt32
return ret, false return ret, false
} }
return *o.IntegerProp, true return *o.IntegerProp, true
@ -68,32 +59,25 @@ func (o *NullableClass) HasIntegerProp() bool {
return false return false
} }
// SetIntegerProp gets a reference to the given int32 and assigns it to the IntegerProp field. // SetIntegerProp gets a reference to the given NullableInt32 and assigns it to the IntegerProp field.
func (o *NullableClass) SetIntegerProp(v int32) { func (o *NullableClass) SetIntegerProp(v NullableInt32) {
o.IntegerProp = &v o.IntegerProp = &v
} }
// SetIntegerPropExplicitNull (un)sets IntegerProp to be considered as explicit "null" value // GetNumberProp returns the NumberProp field value if set, zero value otherwise.
// when serializing to JSON (pass true as argument to set this, false to unset) func (o *NullableClass) GetNumberProp() NullableFloat32 {
// The IntegerProp value is set to nil even if false is passed
func (o *NullableClass) SetIntegerPropExplicitNull(b bool) {
o.IntegerProp = nil
o.isExplicitNullIntegerProp = b
}
// GetNumberProp returns the NumberProp field if non-nil, zero value otherwise.
func (o *NullableClass) GetNumberProp() float32 {
if o == nil || o.NumberProp == nil { if o == nil || o.NumberProp == nil {
var ret float32 var ret NullableFloat32
return ret return ret
} }
return *o.NumberProp return *o.NumberProp
} }
// GetNumberPropOk returns a tuple with the NumberProp field if it's non-nil, zero value otherwise // GetNumberPropOk returns a tuple with the NumberProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetNumberPropOk() (float32, bool) { func (o *NullableClass) GetNumberPropOk() (NullableFloat32, bool) {
if o == nil || o.NumberProp == nil { if o == nil || o.NumberProp == nil {
var ret float32 var ret NullableFloat32
return ret, false return ret, false
} }
return *o.NumberProp, true return *o.NumberProp, true
@ -108,32 +92,25 @@ func (o *NullableClass) HasNumberProp() bool {
return false return false
} }
// SetNumberProp gets a reference to the given float32 and assigns it to the NumberProp field. // SetNumberProp gets a reference to the given NullableFloat32 and assigns it to the NumberProp field.
func (o *NullableClass) SetNumberProp(v float32) { func (o *NullableClass) SetNumberProp(v NullableFloat32) {
o.NumberProp = &v o.NumberProp = &v
} }
// SetNumberPropExplicitNull (un)sets NumberProp to be considered as explicit "null" value // GetBooleanProp returns the BooleanProp field value if set, zero value otherwise.
// when serializing to JSON (pass true as argument to set this, false to unset) func (o *NullableClass) GetBooleanProp() NullableBool {
// The NumberProp value is set to nil even if false is passed
func (o *NullableClass) SetNumberPropExplicitNull(b bool) {
o.NumberProp = nil
o.isExplicitNullNumberProp = b
}
// GetBooleanProp returns the BooleanProp field if non-nil, zero value otherwise.
func (o *NullableClass) GetBooleanProp() bool {
if o == nil || o.BooleanProp == nil { if o == nil || o.BooleanProp == nil {
var ret bool var ret NullableBool
return ret return ret
} }
return *o.BooleanProp return *o.BooleanProp
} }
// GetBooleanPropOk returns a tuple with the BooleanProp field if it's non-nil, zero value otherwise // GetBooleanPropOk returns a tuple with the BooleanProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetBooleanPropOk() (bool, bool) { func (o *NullableClass) GetBooleanPropOk() (NullableBool, bool) {
if o == nil || o.BooleanProp == nil { if o == nil || o.BooleanProp == nil {
var ret bool var ret NullableBool
return ret, false return ret, false
} }
return *o.BooleanProp, true return *o.BooleanProp, true
@ -148,32 +125,25 @@ func (o *NullableClass) HasBooleanProp() bool {
return false return false
} }
// SetBooleanProp gets a reference to the given bool and assigns it to the BooleanProp field. // SetBooleanProp gets a reference to the given NullableBool and assigns it to the BooleanProp field.
func (o *NullableClass) SetBooleanProp(v bool) { func (o *NullableClass) SetBooleanProp(v NullableBool) {
o.BooleanProp = &v o.BooleanProp = &v
} }
// SetBooleanPropExplicitNull (un)sets BooleanProp to be considered as explicit "null" value // GetStringProp returns the StringProp field value if set, zero value otherwise.
// when serializing to JSON (pass true as argument to set this, false to unset) func (o *NullableClass) GetStringProp() NullableString {
// The BooleanProp value is set to nil even if false is passed
func (o *NullableClass) SetBooleanPropExplicitNull(b bool) {
o.BooleanProp = nil
o.isExplicitNullBooleanProp = b
}
// GetStringProp returns the StringProp field if non-nil, zero value otherwise.
func (o *NullableClass) GetStringProp() string {
if o == nil || o.StringProp == nil { if o == nil || o.StringProp == nil {
var ret string var ret NullableString
return ret return ret
} }
return *o.StringProp return *o.StringProp
} }
// GetStringPropOk returns a tuple with the StringProp field if it's non-nil, zero value otherwise // GetStringPropOk returns a tuple with the StringProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetStringPropOk() (string, bool) { func (o *NullableClass) GetStringPropOk() (NullableString, bool) {
if o == nil || o.StringProp == nil { if o == nil || o.StringProp == nil {
var ret string var ret NullableString
return ret, false return ret, false
} }
return *o.StringProp, true return *o.StringProp, true
@ -188,32 +158,25 @@ func (o *NullableClass) HasStringProp() bool {
return false return false
} }
// SetStringProp gets a reference to the given string and assigns it to the StringProp field. // SetStringProp gets a reference to the given NullableString and assigns it to the StringProp field.
func (o *NullableClass) SetStringProp(v string) { func (o *NullableClass) SetStringProp(v NullableString) {
o.StringProp = &v o.StringProp = &v
} }
// SetStringPropExplicitNull (un)sets StringProp to be considered as explicit "null" value // GetDateProp returns the DateProp field value if set, zero value otherwise.
// when serializing to JSON (pass true as argument to set this, false to unset) func (o *NullableClass) GetDateProp() NullableString {
// The StringProp value is set to nil even if false is passed
func (o *NullableClass) SetStringPropExplicitNull(b bool) {
o.StringProp = nil
o.isExplicitNullStringProp = b
}
// GetDateProp returns the DateProp field if non-nil, zero value otherwise.
func (o *NullableClass) GetDateProp() string {
if o == nil || o.DateProp == nil { if o == nil || o.DateProp == nil {
var ret string var ret NullableString
return ret return ret
} }
return *o.DateProp return *o.DateProp
} }
// GetDatePropOk returns a tuple with the DateProp field if it's non-nil, zero value otherwise // GetDatePropOk returns a tuple with the DateProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetDatePropOk() (string, bool) { func (o *NullableClass) GetDatePropOk() (NullableString, bool) {
if o == nil || o.DateProp == nil { if o == nil || o.DateProp == nil {
var ret string var ret NullableString
return ret, false return ret, false
} }
return *o.DateProp, true return *o.DateProp, true
@ -228,32 +191,25 @@ func (o *NullableClass) HasDateProp() bool {
return false return false
} }
// SetDateProp gets a reference to the given string and assigns it to the DateProp field. // SetDateProp gets a reference to the given NullableString and assigns it to the DateProp field.
func (o *NullableClass) SetDateProp(v string) { func (o *NullableClass) SetDateProp(v NullableString) {
o.DateProp = &v o.DateProp = &v
} }
// SetDatePropExplicitNull (un)sets DateProp to be considered as explicit "null" value // GetDatetimeProp returns the DatetimeProp field value if set, zero value otherwise.
// when serializing to JSON (pass true as argument to set this, false to unset) func (o *NullableClass) GetDatetimeProp() NullableTime.Time {
// The DateProp value is set to nil even if false is passed
func (o *NullableClass) SetDatePropExplicitNull(b bool) {
o.DateProp = nil
o.isExplicitNullDateProp = b
}
// GetDatetimeProp returns the DatetimeProp field if non-nil, zero value otherwise.
func (o *NullableClass) GetDatetimeProp() time.Time {
if o == nil || o.DatetimeProp == nil { if o == nil || o.DatetimeProp == nil {
var ret time.Time var ret NullableTime.Time
return ret return ret
} }
return *o.DatetimeProp return *o.DatetimeProp
} }
// GetDatetimePropOk returns a tuple with the DatetimeProp field if it's non-nil, zero value otherwise // GetDatetimePropOk returns a tuple with the DatetimeProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetDatetimePropOk() (time.Time, bool) { func (o *NullableClass) GetDatetimePropOk() (NullableTime.Time, bool) {
if o == nil || o.DatetimeProp == nil { if o == nil || o.DatetimeProp == nil {
var ret time.Time var ret NullableTime.Time
return ret, false return ret, false
} }
return *o.DatetimeProp, true return *o.DatetimeProp, true
@ -268,32 +224,25 @@ func (o *NullableClass) HasDatetimeProp() bool {
return false return false
} }
// SetDatetimeProp gets a reference to the given time.Time and assigns it to the DatetimeProp field. // SetDatetimeProp gets a reference to the given NullableTime.Time and assigns it to the DatetimeProp field.
func (o *NullableClass) SetDatetimeProp(v time.Time) { func (o *NullableClass) SetDatetimeProp(v NullableTime.Time) {
o.DatetimeProp = &v o.DatetimeProp = &v
} }
// SetDatetimePropExplicitNull (un)sets DatetimeProp to be considered as explicit "null" value // GetArrayNullableProp returns the ArrayNullableProp field value if set, zero value otherwise.
// when serializing to JSON (pass true as argument to set this, false to unset) func (o *NullableClass) GetArrayNullableProp() Nullable[]map[string]interface{} {
// The DatetimeProp value is set to nil even if false is passed
func (o *NullableClass) SetDatetimePropExplicitNull(b bool) {
o.DatetimeProp = nil
o.isExplicitNullDatetimeProp = b
}
// GetArrayNullableProp returns the ArrayNullableProp field if non-nil, zero value otherwise.
func (o *NullableClass) GetArrayNullableProp() []map[string]interface{} {
if o == nil || o.ArrayNullableProp == nil { if o == nil || o.ArrayNullableProp == nil {
var ret []map[string]interface{} var ret Nullable[]map[string]interface{}
return ret return ret
} }
return *o.ArrayNullableProp return *o.ArrayNullableProp
} }
// GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field if it's non-nil, zero value otherwise // GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool) { func (o *NullableClass) GetArrayNullablePropOk() (Nullable[]map[string]interface{}, bool) {
if o == nil || o.ArrayNullableProp == nil { if o == nil || o.ArrayNullableProp == nil {
var ret []map[string]interface{} var ret Nullable[]map[string]interface{}
return ret, false return ret, false
} }
return *o.ArrayNullableProp, true return *o.ArrayNullableProp, true
@ -308,32 +257,25 @@ func (o *NullableClass) HasArrayNullableProp() bool {
return false return false
} }
// SetArrayNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayNullableProp field. // SetArrayNullableProp gets a reference to the given Nullable[]map[string]interface{} and assigns it to the ArrayNullableProp field.
func (o *NullableClass) SetArrayNullableProp(v []map[string]interface{}) { func (o *NullableClass) SetArrayNullableProp(v Nullable[]map[string]interface{}) {
o.ArrayNullableProp = &v o.ArrayNullableProp = &v
} }
// SetArrayNullablePropExplicitNull (un)sets ArrayNullableProp to be considered as explicit "null" value // GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field value if set, zero value otherwise.
// when serializing to JSON (pass true as argument to set this, false to unset) func (o *NullableClass) GetArrayAndItemsNullableProp() Nullable[]map[string]interface{} {
// The ArrayNullableProp value is set to nil even if false is passed
func (o *NullableClass) SetArrayNullablePropExplicitNull(b bool) {
o.ArrayNullableProp = nil
o.isExplicitNullArrayNullableProp = b
}
// GetArrayAndItemsNullableProp returns the ArrayAndItemsNullableProp field if non-nil, zero value otherwise.
func (o *NullableClass) GetArrayAndItemsNullableProp() []map[string]interface{} {
if o == nil || o.ArrayAndItemsNullableProp == nil { if o == nil || o.ArrayAndItemsNullableProp == nil {
var ret []map[string]interface{} var ret Nullable[]map[string]interface{}
return ret return ret
} }
return *o.ArrayAndItemsNullableProp return *o.ArrayAndItemsNullableProp
} }
// GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field if it's non-nil, zero value otherwise // GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]map[string]interface{}, bool) { func (o *NullableClass) GetArrayAndItemsNullablePropOk() (Nullable[]map[string]interface{}, bool) {
if o == nil || o.ArrayAndItemsNullableProp == nil { if o == nil || o.ArrayAndItemsNullableProp == nil {
var ret []map[string]interface{} var ret Nullable[]map[string]interface{}
return ret, false return ret, false
} }
return *o.ArrayAndItemsNullableProp, true return *o.ArrayAndItemsNullableProp, true
@ -348,19 +290,12 @@ func (o *NullableClass) HasArrayAndItemsNullableProp() bool {
return false return false
} }
// SetArrayAndItemsNullableProp gets a reference to the given []map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field. // SetArrayAndItemsNullableProp gets a reference to the given Nullable[]map[string]interface{} and assigns it to the ArrayAndItemsNullableProp field.
func (o *NullableClass) SetArrayAndItemsNullableProp(v []map[string]interface{}) { func (o *NullableClass) SetArrayAndItemsNullableProp(v Nullable[]map[string]interface{}) {
o.ArrayAndItemsNullableProp = &v o.ArrayAndItemsNullableProp = &v
} }
// SetArrayAndItemsNullablePropExplicitNull (un)sets ArrayAndItemsNullableProp to be considered as explicit "null" value // GetArrayItemsNullable returns the ArrayItemsNullable field value if set, zero value otherwise.
// 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
func (o *NullableClass) SetArrayAndItemsNullablePropExplicitNull(b bool) {
o.ArrayAndItemsNullableProp = nil
o.isExplicitNullArrayAndItemsNullableProp = b
}
// GetArrayItemsNullable returns the ArrayItemsNullable field if non-nil, zero value otherwise.
func (o *NullableClass) GetArrayItemsNullable() []map[string]interface{} { func (o *NullableClass) GetArrayItemsNullable() []map[string]interface{} {
if o == nil || o.ArrayItemsNullable == nil { if o == nil || o.ArrayItemsNullable == nil {
var ret []map[string]interface{} var ret []map[string]interface{}
@ -369,7 +304,7 @@ func (o *NullableClass) GetArrayItemsNullable() []map[string]interface{} {
return *o.ArrayItemsNullable return *o.ArrayItemsNullable
} }
// GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field if it's non-nil, zero value otherwise // GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ArrayItemsNullable == nil {
@ -393,20 +328,20 @@ func (o *NullableClass) SetArrayItemsNullable(v []map[string]interface{}) {
o.ArrayItemsNullable = &v o.ArrayItemsNullable = &v
} }
// GetObjectNullableProp returns the ObjectNullableProp field if non-nil, zero value otherwise. // GetObjectNullableProp returns the ObjectNullableProp field value if set, zero value otherwise.
func (o *NullableClass) GetObjectNullableProp() map[string]map[string]interface{} { func (o *NullableClass) GetObjectNullableProp() NullableMap[string]map[string]interface{} {
if o == nil || o.ObjectNullableProp == nil { if o == nil || o.ObjectNullableProp == nil {
var ret map[string]map[string]interface{} var ret NullableMap[string]map[string]interface{}
return ret return ret
} }
return *o.ObjectNullableProp return *o.ObjectNullableProp
} }
// GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field if it's non-nil, zero value otherwise // GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool) { func (o *NullableClass) GetObjectNullablePropOk() (NullableMap[string]map[string]interface{}, bool) {
if o == nil || o.ObjectNullableProp == nil { if o == nil || o.ObjectNullableProp == nil {
var ret map[string]map[string]interface{} var ret NullableMap[string]map[string]interface{}
return ret, false return ret, false
} }
return *o.ObjectNullableProp, true return *o.ObjectNullableProp, true
@ -421,32 +356,25 @@ func (o *NullableClass) HasObjectNullableProp() bool {
return false return false
} }
// SetObjectNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectNullableProp field. // SetObjectNullableProp gets a reference to the given NullableMap[string]map[string]interface{} and assigns it to the ObjectNullableProp field.
func (o *NullableClass) SetObjectNullableProp(v map[string]map[string]interface{}) { func (o *NullableClass) SetObjectNullableProp(v NullableMap[string]map[string]interface{}) {
o.ObjectNullableProp = &v o.ObjectNullableProp = &v
} }
// SetObjectNullablePropExplicitNull (un)sets ObjectNullableProp to be considered as explicit "null" value // GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field value if set, zero value otherwise.
// when serializing to JSON (pass true as argument to set this, false to unset) func (o *NullableClass) GetObjectAndItemsNullableProp() NullableMap[string]map[string]interface{} {
// The ObjectNullableProp value is set to nil even if false is passed
func (o *NullableClass) SetObjectNullablePropExplicitNull(b bool) {
o.ObjectNullableProp = nil
o.isExplicitNullObjectNullableProp = b
}
// GetObjectAndItemsNullableProp returns the ObjectAndItemsNullableProp field if non-nil, zero value otherwise.
func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]interface{} {
if o == nil || o.ObjectAndItemsNullableProp == nil { if o == nil || o.ObjectAndItemsNullableProp == nil {
var ret map[string]map[string]interface{} var ret NullableMap[string]map[string]interface{}
return ret return ret
} }
return *o.ObjectAndItemsNullableProp return *o.ObjectAndItemsNullableProp
} }
// GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field if it's non-nil, zero value otherwise // GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field value if set, zero value otherwise
// and a boolean to check if the value has been set. // and a boolean to check if the value has been set.
func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool) { func (o *NullableClass) GetObjectAndItemsNullablePropOk() (NullableMap[string]map[string]interface{}, bool) {
if o == nil || o.ObjectAndItemsNullableProp == nil { if o == nil || o.ObjectAndItemsNullableProp == nil {
var ret map[string]map[string]interface{} var ret NullableMap[string]map[string]interface{}
return ret, false return ret, false
} }
return *o.ObjectAndItemsNullableProp, true return *o.ObjectAndItemsNullableProp, true
@ -461,19 +389,12 @@ func (o *NullableClass) HasObjectAndItemsNullableProp() bool {
return false return false
} }
// SetObjectAndItemsNullableProp gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field. // SetObjectAndItemsNullableProp gets a reference to the given NullableMap[string]map[string]interface{} and assigns it to the ObjectAndItemsNullableProp field.
func (o *NullableClass) SetObjectAndItemsNullableProp(v map[string]map[string]interface{}) { func (o *NullableClass) SetObjectAndItemsNullableProp(v NullableMap[string]map[string]interface{}) {
o.ObjectAndItemsNullableProp = &v o.ObjectAndItemsNullableProp = &v
} }
// SetObjectAndItemsNullablePropExplicitNull (un)sets ObjectAndItemsNullableProp to be considered as explicit "null" value // GetObjectItemsNullable returns the ObjectItemsNullable field value if set, zero value otherwise.
// 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
func (o *NullableClass) SetObjectAndItemsNullablePropExplicitNull(b bool) {
o.ObjectAndItemsNullableProp = nil
o.isExplicitNullObjectAndItemsNullableProp = b
}
// GetObjectItemsNullable returns the ObjectItemsNullable field if non-nil, zero value otherwise.
func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface{} { func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface{} {
if o == nil || o.ObjectItemsNullable == nil { if o == nil || o.ObjectItemsNullable == nil {
var ret map[string]map[string]interface{} var ret map[string]map[string]interface{}
@ -482,7 +403,7 @@ func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface
return *o.ObjectItemsNullable return *o.ObjectItemsNullable
} }
// GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field if it's non-nil, zero value otherwise // GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ObjectItemsNullable == nil {
@ -506,87 +427,26 @@ func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface
o.ObjectItemsNullable = &v o.ObjectItemsNullable = &v
} }
type NullableNullableClass struct {
// MarshalJSON returns the JSON representation of the model. Value NullableClass
func (o NullableClass) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.IntegerProp == nil {
if o.isExplicitNullIntegerProp {
toSerialize["integer_prop"] = o.IntegerProp
}
} else {
toSerialize["integer_prop"] = o.IntegerProp
}
if o.NumberProp == nil {
if o.isExplicitNullNumberProp {
toSerialize["number_prop"] = o.NumberProp
}
} else {
toSerialize["number_prop"] = o.NumberProp
}
if o.BooleanProp == nil {
if o.isExplicitNullBooleanProp {
toSerialize["boolean_prop"] = o.BooleanProp
}
} else {
toSerialize["boolean_prop"] = o.BooleanProp
}
if o.StringProp == nil {
if o.isExplicitNullStringProp {
toSerialize["string_prop"] = o.StringProp
}
} else {
toSerialize["string_prop"] = o.StringProp
}
if o.DateProp == nil {
if o.isExplicitNullDateProp {
toSerialize["date_prop"] = o.DateProp
}
} else {
toSerialize["date_prop"] = o.DateProp
}
if o.DatetimeProp == nil {
if o.isExplicitNullDatetimeProp {
toSerialize["datetime_prop"] = o.DatetimeProp
}
} else {
toSerialize["datetime_prop"] = o.DatetimeProp
}
if o.ArrayNullableProp == nil {
if o.isExplicitNullArrayNullableProp {
toSerialize["array_nullable_prop"] = o.ArrayNullableProp
}
} else {
toSerialize["array_nullable_prop"] = o.ArrayNullableProp
}
if o.ArrayAndItemsNullableProp == nil {
if o.isExplicitNullArrayAndItemsNullableProp {
toSerialize["array_and_items_nullable_prop"] = o.ArrayAndItemsNullableProp
}
} else {
toSerialize["array_and_items_nullable_prop"] = o.ArrayAndItemsNullableProp
}
if o.ArrayItemsNullable != nil {
toSerialize["array_items_nullable"] = o.ArrayItemsNullable
}
if o.ObjectNullableProp == nil {
if o.isExplicitNullObjectNullableProp {
toSerialize["object_nullable_prop"] = o.ObjectNullableProp
}
} else {
toSerialize["object_nullable_prop"] = o.ObjectNullableProp
}
if o.ObjectAndItemsNullableProp == nil {
if o.isExplicitNullObjectAndItemsNullableProp {
toSerialize["object_and_items_nullable_prop"] = o.ObjectAndItemsNullableProp
}
} else {
toSerialize["object_and_items_nullable_prop"] = o.ObjectAndItemsNullableProp
}
if o.ObjectItemsNullable != nil {
toSerialize["object_items_nullable"] = o.ObjectItemsNullable
}
return json.Marshal(toSerialize)
} }
func (v NullableNullableClass) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// NumberOnly struct for NumberOnly // NumberOnly struct for NumberOnly
type NumberOnly struct { type NumberOnly struct {
JustNumber *float32 `json:"JustNumber,omitempty"` JustNumber *float32 `json:"JustNumber,omitempty"`
} }
// GetJustNumber returns the JustNumber field if non-nil, zero value otherwise. // GetJustNumber returns the JustNumber field value if set, zero value otherwise.
func (o *NumberOnly) GetJustNumber() float32 { func (o *NumberOnly) GetJustNumber() float32 {
if o == nil || o.JustNumber == nil { if o == nil || o.JustNumber == nil {
var ret float32 var ret float32
@ -26,7 +28,7 @@ func (o *NumberOnly) GetJustNumber() float32 {
return *o.JustNumber return *o.JustNumber
} }
// GetJustNumberOk returns a tuple with the JustNumber field if it's non-nil, zero value otherwise // GetJustNumberOk returns a tuple with the JustNumber field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.JustNumber == nil {
@ -50,14 +52,26 @@ func (o *NumberOnly) SetJustNumber(v float32) {
o.JustNumber = &v o.JustNumber = &v
} }
type NullableNumberOnly struct {
// MarshalJSON returns the JSON representation of the model. Value NumberOnly
func (o NumberOnly) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.JustNumber != nil {
toSerialize["JustNumber"] = o.JustNumber
}
return json.Marshal(toSerialize)
} }
func (v NullableNumberOnly) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,28 +8,25 @@
*/ */
package openapi package openapi
import ( import (
"time" "bytes"
"encoding/json" "encoding/json"
"time"
) )
// Order struct for Order // Order struct for Order
type Order struct { type Order struct {
Id *int64 `json:"id,omitempty"` Id *int64 `json:"id,omitempty"`
PetId *int64 `json:"petId,omitempty"` PetId *int64 `json:"petId,omitempty"`
Quantity *int32 `json:"quantity,omitempty"` Quantity *int32 `json:"quantity,omitempty"`
ShipDate *time.Time `json:"shipDate,omitempty"` ShipDate *time.Time `json:"shipDate,omitempty"`
// Order Status // Order Status
Status *string `json:"status,omitempty"` Status *string `json:"status,omitempty"`
Complete *bool `json:"complete,omitempty"` Complete *bool `json:"complete,omitempty"`
} }
// GetId returns the Id field if non-nil, zero value otherwise. // GetId returns the Id field value if set, zero value otherwise.
func (o *Order) GetId() int64 { func (o *Order) GetId() int64 {
if o == nil || o.Id == nil { if o == nil || o.Id == nil {
var ret int64 var ret int64
@ -38,7 +35,7 @@ func (o *Order) GetId() int64 {
return *o.Id return *o.Id
} }
// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // GetIdOk returns a tuple with the Id field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Id == nil {
@ -62,7 +59,7 @@ func (o *Order) SetId(v int64) {
o.Id = &v o.Id = &v
} }
// GetPetId returns the PetId field if non-nil, zero value otherwise. // GetPetId returns the PetId field value if set, zero value otherwise.
func (o *Order) GetPetId() int64 { func (o *Order) GetPetId() int64 {
if o == nil || o.PetId == nil { if o == nil || o.PetId == nil {
var ret int64 var ret int64
@ -71,7 +68,7 @@ func (o *Order) GetPetId() int64 {
return *o.PetId return *o.PetId
} }
// GetPetIdOk returns a tuple with the PetId field if it's non-nil, zero value otherwise // GetPetIdOk returns a tuple with the PetId field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.PetId == nil {
@ -95,7 +92,7 @@ func (o *Order) SetPetId(v int64) {
o.PetId = &v o.PetId = &v
} }
// GetQuantity returns the Quantity field if non-nil, zero value otherwise. // GetQuantity returns the Quantity field value if set, zero value otherwise.
func (o *Order) GetQuantity() int32 { func (o *Order) GetQuantity() int32 {
if o == nil || o.Quantity == nil { if o == nil || o.Quantity == nil {
var ret int32 var ret int32
@ -104,7 +101,7 @@ func (o *Order) GetQuantity() int32 {
return *o.Quantity return *o.Quantity
} }
// GetQuantityOk returns a tuple with the Quantity field if it's non-nil, zero value otherwise // GetQuantityOk returns a tuple with the Quantity field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Quantity == nil {
@ -128,7 +125,7 @@ func (o *Order) SetQuantity(v int32) {
o.Quantity = &v o.Quantity = &v
} }
// GetShipDate returns the ShipDate field if non-nil, zero value otherwise. // GetShipDate returns the ShipDate field value if set, zero value otherwise.
func (o *Order) GetShipDate() time.Time { func (o *Order) GetShipDate() time.Time {
if o == nil || o.ShipDate == nil { if o == nil || o.ShipDate == nil {
var ret time.Time var ret time.Time
@ -137,7 +134,7 @@ func (o *Order) GetShipDate() time.Time {
return *o.ShipDate return *o.ShipDate
} }
// GetShipDateOk returns a tuple with the ShipDate field if it's non-nil, zero value otherwise // GetShipDateOk returns a tuple with the ShipDate field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.ShipDate == nil {
@ -161,7 +158,7 @@ func (o *Order) SetShipDate(v time.Time) {
o.ShipDate = &v o.ShipDate = &v
} }
// GetStatus returns the Status field if non-nil, zero value otherwise. // GetStatus returns the Status field value if set, zero value otherwise.
func (o *Order) GetStatus() string { func (o *Order) GetStatus() string {
if o == nil || o.Status == nil { if o == nil || o.Status == nil {
var ret string var ret string
@ -170,7 +167,7 @@ func (o *Order) GetStatus() string {
return *o.Status return *o.Status
} }
// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise // GetStatusOk returns a tuple with the Status field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Status == nil {
@ -194,7 +191,7 @@ func (o *Order) SetStatus(v string) {
o.Status = &v o.Status = &v
} }
// GetComplete returns the Complete field if non-nil, zero value otherwise. // GetComplete returns the Complete field value if set, zero value otherwise.
func (o *Order) GetComplete() bool { func (o *Order) GetComplete() bool {
if o == nil || o.Complete == nil { if o == nil || o.Complete == nil {
var ret bool var ret bool
@ -203,7 +200,7 @@ func (o *Order) GetComplete() bool {
return *o.Complete return *o.Complete
} }
// GetCompleteOk returns a tuple with the Complete field if it's non-nil, zero value otherwise // GetCompleteOk returns a tuple with the Complete field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Complete == nil {
@ -227,29 +224,26 @@ func (o *Order) SetComplete(v bool) {
o.Complete = &v o.Complete = &v
} }
type NullableOrder struct {
// MarshalJSON returns the JSON representation of the model. Value Order
func (o Order) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableOrder) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,20 +8,20 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// OuterComposite struct for OuterComposite // OuterComposite struct for OuterComposite
type OuterComposite struct { type OuterComposite struct {
MyNumber *float32 `json:"my_number,omitempty"` MyNumber *float32 `json:"my_number,omitempty"`
MyString *string `json:"my_string,omitempty"` MyString *string `json:"my_string,omitempty"`
MyBoolean *bool `json:"my_boolean,omitempty"` MyBoolean *bool `json:"my_boolean,omitempty"`
} }
// GetMyNumber returns the MyNumber field if non-nil, zero value otherwise. // GetMyNumber returns the MyNumber field value if set, zero value otherwise.
func (o *OuterComposite) GetMyNumber() float32 { func (o *OuterComposite) GetMyNumber() float32 {
if o == nil || o.MyNumber == nil { if o == nil || o.MyNumber == nil {
var ret float32 var ret float32
@ -30,7 +30,7 @@ func (o *OuterComposite) GetMyNumber() float32 {
return *o.MyNumber return *o.MyNumber
} }
// GetMyNumberOk returns a tuple with the MyNumber field if it's non-nil, zero value otherwise // GetMyNumberOk returns a tuple with the MyNumber field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.MyNumber == nil {
@ -54,7 +54,7 @@ func (o *OuterComposite) SetMyNumber(v float32) {
o.MyNumber = &v o.MyNumber = &v
} }
// GetMyString returns the MyString field if non-nil, zero value otherwise. // GetMyString returns the MyString field value if set, zero value otherwise.
func (o *OuterComposite) GetMyString() string { func (o *OuterComposite) GetMyString() string {
if o == nil || o.MyString == nil { if o == nil || o.MyString == nil {
var ret string var ret string
@ -63,7 +63,7 @@ func (o *OuterComposite) GetMyString() string {
return *o.MyString return *o.MyString
} }
// GetMyStringOk returns a tuple with the MyString field if it's non-nil, zero value otherwise // GetMyStringOk returns a tuple with the MyString field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.MyString == nil {
@ -87,7 +87,7 @@ func (o *OuterComposite) SetMyString(v string) {
o.MyString = &v o.MyString = &v
} }
// GetMyBoolean returns the MyBoolean field if non-nil, zero value otherwise. // GetMyBoolean returns the MyBoolean field value if set, zero value otherwise.
func (o *OuterComposite) GetMyBoolean() bool { func (o *OuterComposite) GetMyBoolean() bool {
if o == nil || o.MyBoolean == nil { if o == nil || o.MyBoolean == nil {
var ret bool var ret bool
@ -96,7 +96,7 @@ func (o *OuterComposite) GetMyBoolean() bool {
return *o.MyBoolean return *o.MyBoolean
} }
// GetMyBooleanOk returns a tuple with the MyBoolean field if it's non-nil, zero value otherwise // GetMyBooleanOk returns a tuple with the MyBoolean field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.MyBoolean == nil {
@ -120,20 +120,26 @@ func (o *OuterComposite) SetMyBoolean(v bool) {
o.MyBoolean = &v o.MyBoolean = &v
} }
type NullableOuterComposite struct {
// MarshalJSON returns the JSON representation of the model. Value OuterComposite
func (o OuterComposite) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableOuterComposite) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,6 +8,12 @@
*/ */
package openapi package openapi
import (
"bytes"
"encoding/json"
)
// OuterEnum the model 'OuterEnum' // OuterEnum the model 'OuterEnum'
type OuterEnum string type OuterEnum string
@ -18,4 +24,30 @@ const (
DELIVERED OuterEnum = "delivered" DELIVERED OuterEnum = "delivered"
) )
type NullableOuterEnum struct {
Value OuterEnum
ExplicitNull bool
}
func (v NullableOuterEnum) 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)
}
}
func (v *NullableOuterEnum) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}

View File

@ -8,6 +8,12 @@
*/ */
package openapi package openapi
import (
"bytes"
"encoding/json"
)
// OuterEnumDefaultValue the model 'OuterEnumDefaultValue' // OuterEnumDefaultValue the model 'OuterEnumDefaultValue'
type OuterEnumDefaultValue string type OuterEnumDefaultValue string
@ -18,4 +24,30 @@ const (
DELIVERED OuterEnumDefaultValue = "delivered" DELIVERED OuterEnumDefaultValue = "delivered"
) )
type NullableOuterEnumDefaultValue struct {
Value OuterEnumDefaultValue
ExplicitNull bool
}
func (v NullableOuterEnumDefaultValue) 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)
}
}
func (v *NullableOuterEnumDefaultValue) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}

View File

@ -8,6 +8,12 @@
*/ */
package openapi package openapi
import (
"bytes"
"encoding/json"
)
// OuterEnumInteger the model 'OuterEnumInteger' // OuterEnumInteger the model 'OuterEnumInteger'
type OuterEnumInteger int32 type OuterEnumInteger int32
@ -18,4 +24,30 @@ const (
_2 OuterEnumInteger = 2 _2 OuterEnumInteger = 2
) )
type NullableOuterEnumInteger struct {
Value OuterEnumInteger
ExplicitNull bool
}
func (v NullableOuterEnumInteger) 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)
}
}
func (v *NullableOuterEnumInteger) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}

View File

@ -8,6 +8,12 @@
*/ */
package openapi package openapi
import (
"bytes"
"encoding/json"
)
// OuterEnumIntegerDefaultValue the model 'OuterEnumIntegerDefaultValue' // OuterEnumIntegerDefaultValue the model 'OuterEnumIntegerDefaultValue'
type OuterEnumIntegerDefaultValue int32 type OuterEnumIntegerDefaultValue int32
@ -18,4 +24,30 @@ const (
_2 OuterEnumIntegerDefaultValue = 2 _2 OuterEnumIntegerDefaultValue = 2
) )
type NullableOuterEnumIntegerDefaultValue struct {
Value OuterEnumIntegerDefaultValue
ExplicitNull bool
}
func (v NullableOuterEnumIntegerDefaultValue) 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)
}
}
func (v *NullableOuterEnumIntegerDefaultValue) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}

View File

@ -8,28 +8,24 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
"errors"
) )
// Pet struct for Pet // Pet struct for Pet
type Pet struct { type Pet struct {
Id *int64 `json:"id,omitempty"` Id *int64 `json:"id,omitempty"`
Category *Category `json:"category,omitempty"` Category *Category `json:"category,omitempty"`
Name string `json:"name"`
Name *string `json:"name,omitempty"` PhotoUrls []string `json:"photoUrls"`
PhotoUrls *[]string `json:"photoUrls,omitempty"`
Tags *[]Tag `json:"tags,omitempty"` Tags *[]Tag `json:"tags,omitempty"`
// pet status in the store // pet status in the store
Status *string `json:"status,omitempty"` Status *string `json:"status,omitempty"`
} }
// GetId returns the Id field if non-nil, zero value otherwise. // GetId returns the Id field value if set, zero value otherwise.
func (o *Pet) GetId() int64 { func (o *Pet) GetId() int64 {
if o == nil || o.Id == nil { if o == nil || o.Id == nil {
var ret int64 var ret int64
@ -38,7 +34,7 @@ func (o *Pet) GetId() int64 {
return *o.Id return *o.Id
} }
// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // GetIdOk returns a tuple with the Id field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Id == nil {
@ -62,7 +58,7 @@ func (o *Pet) SetId(v int64) {
o.Id = &v o.Id = &v
} }
// GetCategory returns the Category field if non-nil, zero value otherwise. // GetCategory returns the Category field value if set, zero value otherwise.
func (o *Pet) GetCategory() Category { func (o *Pet) GetCategory() Category {
if o == nil || o.Category == nil { if o == nil || o.Category == nil {
var ret Category var ret Category
@ -71,7 +67,7 @@ func (o *Pet) GetCategory() Category {
return *o.Category return *o.Category
} }
// GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise // GetCategoryOk returns a tuple with the Category field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Category == nil {
@ -95,73 +91,37 @@ func (o *Pet) SetCategory(v Category) {
o.Category = &v o.Category = &v
} }
// GetName returns the Name field if non-nil, zero value otherwise. // GetName returns the Name field value
func (o *Pet) GetName() string { func (o *Pet) GetName() string {
if o == nil || o.Name == nil { if o == nil {
var ret string var ret string
return ret return ret
} }
return *o.Name
return o.Name
} }
// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // SetName sets field value
// and a boolean to check if the value has been set.
func (o *Pet) GetNameOk() (string, bool) {
if o == nil || o.Name == nil {
var ret string
return ret, false
}
return *o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *Pet) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Pet) SetName(v string) { func (o *Pet) SetName(v string) {
o.Name = &v o.Name = v
} }
// GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. // GetPhotoUrls returns the PhotoUrls field value
func (o *Pet) GetPhotoUrls() []string { func (o *Pet) GetPhotoUrls() []string {
if o == nil || o.PhotoUrls == nil { if o == nil {
var ret []string var ret []string
return ret return ret
} }
return *o.PhotoUrls
return o.PhotoUrls
} }
// GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise // SetPhotoUrls sets field value
// and a boolean to check if the value has been set.
func (o *Pet) GetPhotoUrlsOk() ([]string, bool) {
if o == nil || o.PhotoUrls == nil {
var ret []string
return ret, false
}
return *o.PhotoUrls, true
}
// HasPhotoUrls returns a boolean if a field has been set.
func (o *Pet) HasPhotoUrls() bool {
if o != nil && o.PhotoUrls != nil {
return true
}
return false
}
// SetPhotoUrls gets a reference to the given []string and assigns it to the PhotoUrls field.
func (o *Pet) SetPhotoUrls(v []string) { func (o *Pet) SetPhotoUrls(v []string) {
o.PhotoUrls = &v o.PhotoUrls = v
} }
// GetTags returns the Tags field if non-nil, zero value otherwise. // GetTags returns the Tags field value if set, zero value otherwise.
func (o *Pet) GetTags() []Tag { func (o *Pet) GetTags() []Tag {
if o == nil || o.Tags == nil { if o == nil || o.Tags == nil {
var ret []Tag var ret []Tag
@ -170,7 +130,7 @@ func (o *Pet) GetTags() []Tag {
return *o.Tags return *o.Tags
} }
// GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise // GetTagsOk returns a tuple with the Tags field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Tags == nil {
@ -194,7 +154,7 @@ func (o *Pet) SetTags(v []Tag) {
o.Tags = &v o.Tags = &v
} }
// GetStatus returns the Status field if non-nil, zero value otherwise. // GetStatus returns the Status field value if set, zero value otherwise.
func (o *Pet) GetStatus() string { func (o *Pet) GetStatus() string {
if o == nil || o.Status == nil { if o == nil || o.Status == nil {
var ret string var ret string
@ -203,7 +163,7 @@ func (o *Pet) GetStatus() string {
return *o.Status return *o.Status
} }
// GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise // GetStatusOk returns a tuple with the Status field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Status == nil {
@ -227,35 +187,26 @@ func (o *Pet) SetStatus(v string) {
o.Status = &v o.Status = &v
} }
type NullablePet struct {
// MarshalJSON returns the JSON representation of the model. Value Pet
func (o Pet) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Category != nil {
toSerialize["category"] = o.Category
}
if o.Name == nil {
return nil, errors.New("Name is required and not nullable, but was not set on Pet")
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.PhotoUrls == nil {
return nil, errors.New("PhotoUrls is required and not nullable, but was not set on Pet")
}
if o.PhotoUrls != nil {
toSerialize["photoUrls"] = o.PhotoUrls
}
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
} }
func (v NullablePet) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,18 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// ReadOnlyFirst struct for ReadOnlyFirst // ReadOnlyFirst struct for ReadOnlyFirst
type ReadOnlyFirst struct { type ReadOnlyFirst struct {
Bar *string `json:"bar,omitempty"` Bar *string `json:"bar,omitempty"`
Baz *string `json:"baz,omitempty"` Baz *string `json:"baz,omitempty"`
} }
// GetBar returns the Bar field if non-nil, zero value otherwise. // GetBar returns the Bar field value if set, zero value otherwise.
func (o *ReadOnlyFirst) GetBar() string { func (o *ReadOnlyFirst) GetBar() string {
if o == nil || o.Bar == nil { if o == nil || o.Bar == nil {
var ret string var ret string
@ -28,7 +29,7 @@ func (o *ReadOnlyFirst) GetBar() string {
return *o.Bar return *o.Bar
} }
// GetBarOk returns a tuple with the Bar field if it's non-nil, zero value otherwise // GetBarOk returns a tuple with the Bar field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Bar == nil {
@ -52,7 +53,7 @@ func (o *ReadOnlyFirst) SetBar(v string) {
o.Bar = &v o.Bar = &v
} }
// GetBaz returns the Baz field if non-nil, zero value otherwise. // GetBaz returns the Baz field value if set, zero value otherwise.
func (o *ReadOnlyFirst) GetBaz() string { func (o *ReadOnlyFirst) GetBaz() string {
if o == nil || o.Baz == nil { if o == nil || o.Baz == nil {
var ret string var ret string
@ -61,7 +62,7 @@ func (o *ReadOnlyFirst) GetBaz() string {
return *o.Baz return *o.Baz
} }
// GetBazOk returns a tuple with the Baz field if it's non-nil, zero value otherwise // GetBazOk returns a tuple with the Baz field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Baz == nil {
@ -85,17 +86,26 @@ func (o *ReadOnlyFirst) SetBaz(v string) {
o.Baz = &v o.Baz = &v
} }
type NullableReadOnlyFirst struct {
// MarshalJSON returns the JSON representation of the model. Value ReadOnlyFirst
func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Bar != nil {
toSerialize["bar"] = o.Bar
}
if o.Baz != nil {
toSerialize["baz"] = o.Baz
}
return json.Marshal(toSerialize)
} }
func (v NullableReadOnlyFirst) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,16 +8,18 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// Return Model for testing reserved words // Return Model for testing reserved words
type Return struct { type Return struct {
Return *int32 `json:"return,omitempty"` Return *int32 `json:"return,omitempty"`
} }
// GetReturn returns the Return field if non-nil, zero value otherwise. // GetReturn returns the Return field value if set, zero value otherwise.
func (o *Return) GetReturn() int32 { func (o *Return) GetReturn() int32 {
if o == nil || o.Return == nil { if o == nil || o.Return == nil {
var ret int32 var ret int32
@ -26,7 +28,7 @@ func (o *Return) GetReturn() int32 {
return *o.Return return *o.Return
} }
// GetReturnOk returns a tuple with the Return field if it's non-nil, zero value otherwise // GetReturnOk returns a tuple with the Return field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Return == nil {
@ -50,14 +52,26 @@ func (o *Return) SetReturn(v int32) {
o.Return = &v o.Return = &v
} }
type NullableReturn struct {
// MarshalJSON returns the JSON representation of the model. Value Return
func (o Return) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Return != nil {
toSerialize["return"] = o.Return
}
return json.Marshal(toSerialize)
} }
func (v NullableReturn) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,18 +8,19 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// Tag struct for Tag // Tag struct for Tag
type Tag struct { type Tag struct {
Id *int64 `json:"id,omitempty"` Id *int64 `json:"id,omitempty"`
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
} }
// GetId returns the Id field if non-nil, zero value otherwise. // GetId returns the Id field value if set, zero value otherwise.
func (o *Tag) GetId() int64 { func (o *Tag) GetId() int64 {
if o == nil || o.Id == nil { if o == nil || o.Id == nil {
var ret int64 var ret int64
@ -28,7 +29,7 @@ func (o *Tag) GetId() int64 {
return *o.Id return *o.Id
} }
// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // GetIdOk returns a tuple with the Id field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Id == nil {
@ -52,7 +53,7 @@ func (o *Tag) SetId(v int64) {
o.Id = &v o.Id = &v
} }
// GetName returns the Name field if non-nil, zero value otherwise. // GetName returns the Name field value if set, zero value otherwise.
func (o *Tag) GetName() string { func (o *Tag) GetName() string {
if o == nil || o.Name == nil { if o == nil || o.Name == nil {
var ret string var ret string
@ -61,7 +62,7 @@ func (o *Tag) GetName() string {
return *o.Name return *o.Name
} }
// GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise // GetNameOk returns a tuple with the Name field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Name == nil {
@ -85,17 +86,26 @@ func (o *Tag) SetName(v string) {
o.Name = &v o.Name = &v
} }
type NullableTag struct {
// MarshalJSON returns the JSON representation of the model. Value Tag
func (o Tag) MarshalJSON() ([]byte, error) { ExplicitNull bool
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
return json.Marshal(toSerialize)
} }
func (v NullableTag) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -8,31 +8,26 @@
*/ */
package openapi package openapi
import ( import (
"bytes"
"encoding/json" "encoding/json"
) )
// User struct for User // User struct for User
type User struct { type User struct {
Id *int64 `json:"id,omitempty"` Id *int64 `json:"id,omitempty"`
Username *string `json:"username,omitempty"` Username *string `json:"username,omitempty"`
FirstName *string `json:"firstName,omitempty"` FirstName *string `json:"firstName,omitempty"`
LastName *string `json:"lastName,omitempty"` LastName *string `json:"lastName,omitempty"`
Email *string `json:"email,omitempty"` Email *string `json:"email,omitempty"`
Password *string `json:"password,omitempty"` Password *string `json:"password,omitempty"`
Phone *string `json:"phone,omitempty"` Phone *string `json:"phone,omitempty"`
// User Status // User Status
UserStatus *int32 `json:"userStatus,omitempty"` UserStatus *int32 `json:"userStatus,omitempty"`
} }
// GetId returns the Id field if non-nil, zero value otherwise. // GetId returns the Id field value if set, zero value otherwise.
func (o *User) GetId() int64 { func (o *User) GetId() int64 {
if o == nil || o.Id == nil { if o == nil || o.Id == nil {
var ret int64 var ret int64
@ -41,7 +36,7 @@ func (o *User) GetId() int64 {
return *o.Id return *o.Id
} }
// GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise // GetIdOk returns a tuple with the Id field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Id == nil {
@ -65,7 +60,7 @@ func (o *User) SetId(v int64) {
o.Id = &v o.Id = &v
} }
// GetUsername returns the Username field if non-nil, zero value otherwise. // GetUsername returns the Username field value if set, zero value otherwise.
func (o *User) GetUsername() string { func (o *User) GetUsername() string {
if o == nil || o.Username == nil { if o == nil || o.Username == nil {
var ret string var ret string
@ -74,7 +69,7 @@ func (o *User) GetUsername() string {
return *o.Username return *o.Username
} }
// GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise // GetUsernameOk returns a tuple with the Username field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Username == nil {
@ -98,7 +93,7 @@ func (o *User) SetUsername(v string) {
o.Username = &v o.Username = &v
} }
// GetFirstName returns the FirstName field if non-nil, zero value otherwise. // GetFirstName returns the FirstName field value if set, zero value otherwise.
func (o *User) GetFirstName() string { func (o *User) GetFirstName() string {
if o == nil || o.FirstName == nil { if o == nil || o.FirstName == nil {
var ret string var ret string
@ -107,7 +102,7 @@ func (o *User) GetFirstName() string {
return *o.FirstName return *o.FirstName
} }
// GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise // GetFirstNameOk returns a tuple with the FirstName field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.FirstName == nil {
@ -131,7 +126,7 @@ func (o *User) SetFirstName(v string) {
o.FirstName = &v o.FirstName = &v
} }
// GetLastName returns the LastName field if non-nil, zero value otherwise. // GetLastName returns the LastName field value if set, zero value otherwise.
func (o *User) GetLastName() string { func (o *User) GetLastName() string {
if o == nil || o.LastName == nil { if o == nil || o.LastName == nil {
var ret string var ret string
@ -140,7 +135,7 @@ func (o *User) GetLastName() string {
return *o.LastName return *o.LastName
} }
// GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise // GetLastNameOk returns a tuple with the LastName field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.LastName == nil {
@ -164,7 +159,7 @@ func (o *User) SetLastName(v string) {
o.LastName = &v o.LastName = &v
} }
// GetEmail returns the Email field if non-nil, zero value otherwise. // GetEmail returns the Email field value if set, zero value otherwise.
func (o *User) GetEmail() string { func (o *User) GetEmail() string {
if o == nil || o.Email == nil { if o == nil || o.Email == nil {
var ret string var ret string
@ -173,7 +168,7 @@ func (o *User) GetEmail() string {
return *o.Email return *o.Email
} }
// GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise // GetEmailOk returns a tuple with the Email field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Email == nil {
@ -197,7 +192,7 @@ func (o *User) SetEmail(v string) {
o.Email = &v o.Email = &v
} }
// GetPassword returns the Password field if non-nil, zero value otherwise. // GetPassword returns the Password field value if set, zero value otherwise.
func (o *User) GetPassword() string { func (o *User) GetPassword() string {
if o == nil || o.Password == nil { if o == nil || o.Password == nil {
var ret string var ret string
@ -206,7 +201,7 @@ func (o *User) GetPassword() string {
return *o.Password return *o.Password
} }
// GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise // GetPasswordOk returns a tuple with the Password field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Password == nil {
@ -230,7 +225,7 @@ func (o *User) SetPassword(v string) {
o.Password = &v o.Password = &v
} }
// GetPhone returns the Phone field if non-nil, zero value otherwise. // GetPhone returns the Phone field value if set, zero value otherwise.
func (o *User) GetPhone() string { func (o *User) GetPhone() string {
if o == nil || o.Phone == nil { if o == nil || o.Phone == nil {
var ret string var ret string
@ -239,7 +234,7 @@ func (o *User) GetPhone() string {
return *o.Phone return *o.Phone
} }
// GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise // GetPhoneOk returns a tuple with the Phone field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.Phone == nil {
@ -263,7 +258,7 @@ func (o *User) SetPhone(v string) {
o.Phone = &v o.Phone = &v
} }
// GetUserStatus returns the UserStatus field if non-nil, zero value otherwise. // GetUserStatus returns the UserStatus field value if set, zero value otherwise.
func (o *User) GetUserStatus() int32 { func (o *User) GetUserStatus() int32 {
if o == nil || o.UserStatus == nil { if o == nil || o.UserStatus == nil {
var ret int32 var ret int32
@ -272,7 +267,7 @@ func (o *User) GetUserStatus() int32 {
return *o.UserStatus return *o.UserStatus
} }
// GetUserStatusOk returns a tuple with the UserStatus field if it's non-nil, zero value otherwise // GetUserStatusOk returns a tuple with the UserStatus field value if set, zero value otherwise
// and a boolean to check if the value has been set. // 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 { if o == nil || o.UserStatus == nil {
@ -296,35 +291,26 @@ func (o *User) SetUserStatus(v int32) {
o.UserStatus = &v o.UserStatus = &v
} }
type NullableUser struct {
// MarshalJSON returns the JSON representation of the model. Value User
func (o User) MarshalJSON() ([]byte, error) { ExplicitNull bool
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)
} }
func (v NullableUser) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
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)
}

View File

@ -9,7 +9,14 @@
package openapi package openapi
import "time" import (
"bytes"
"encoding/json"
"errors"
"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. // PtrBool is a helper routine that returns a pointer to given integer value.
func PtrBool(v bool) *bool { return &v } func PtrBool(v bool) *bool { return &v }
@ -23,9 +30,6 @@ func PtrInt32(v int32) *int32 { return &v }
// PtrInt64 is a helper routine that returns a pointer to given integer value. // PtrInt64 is a helper routine that returns a pointer to given integer value.
func PtrInt64(v int64) *int64 { return &v } func PtrInt64(v int64) *int64 { return &v }
// PtrFloat is a helper routine that returns a pointer to given float value.
func PtrFloat(v float32) *float32 { return &v }
// PtrFloat32 is a helper routine that returns a pointer to given float value. // PtrFloat32 is a helper routine that returns a pointer to given float value.
func PtrFloat32(v float32) *float32 { return &v } func PtrFloat32(v float32) *float32 { return &v }
@ -37,3 +41,204 @@ func PtrString(v string) *string { return &v }
// PtrTime is helper routine that returns a pointer to given Time value. // PtrTime is helper routine that returns a pointer to given Time value.
func PtrTime(v time.Time) *time.Time { return &v } func PtrTime(v time.Time) *time.Time { return &v }
type NullableBool struct {
Value bool
ExplicitNull bool
}
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)
}
}
func (v *NullableBool) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}
type NullableInt struct {
Value int
ExplicitNull 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) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}
type NullableInt32 struct {
Value int32
ExplicitNull bool
}
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)
}
}
func (v *NullableInt32) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}
type NullableInt64 struct {
Value int64
ExplicitNull bool
}
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)
}
}
func (v *NullableInt64) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}
type NullableFloat32 struct {
Value float32
ExplicitNull bool
}
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)
}
}
func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}
type NullableFloat64 struct {
Value float64
ExplicitNull bool
}
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)
}
}
func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}
type NullableString struct {
Value string
ExplicitNull bool
}
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)
}
}
func (v *NullableString) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}
type NullableTime struct {
Value time.Time
ExplicitNull bool
}
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()
}
}
func (v *NullableTime) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}