Files
sdk/model_application_config_option.go

191 lines
5.3 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the ApplicationConfigOption type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ApplicationConfigOption{}
// ApplicationConfigOption struct for ApplicationConfigOption
type ApplicationConfigOption struct {
Parameter *string `json:"parameter,omitempty"`
Setting *string `json:"setting,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ApplicationConfigOption ApplicationConfigOption
// NewApplicationConfigOption instantiates a new ApplicationConfigOption object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewApplicationConfigOption() *ApplicationConfigOption {
this := ApplicationConfigOption{}
return &this
}
// NewApplicationConfigOptionWithDefaults instantiates a new ApplicationConfigOption object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewApplicationConfigOptionWithDefaults() *ApplicationConfigOption {
this := ApplicationConfigOption{}
return &this
}
// GetParameter returns the Parameter field value if set, zero value otherwise.
func (o *ApplicationConfigOption) GetParameter() string {
if o == nil || IsNil(o.Parameter) {
var ret string
return ret
}
return *o.Parameter
}
// GetParameterOk returns a tuple with the Parameter field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationConfigOption) GetParameterOk() (*string, bool) {
if o == nil || IsNil(o.Parameter) {
return nil, false
}
return o.Parameter, true
}
// HasParameter returns a boolean if a field has been set.
func (o *ApplicationConfigOption) HasParameter() bool {
if o != nil && !IsNil(o.Parameter) {
return true
}
return false
}
// SetParameter gets a reference to the given string and assigns it to the Parameter field.
func (o *ApplicationConfigOption) SetParameter(v string) {
o.Parameter = &v
}
// GetSetting returns the Setting field value if set, zero value otherwise.
func (o *ApplicationConfigOption) GetSetting() string {
if o == nil || IsNil(o.Setting) {
var ret string
return ret
}
return *o.Setting
}
// GetSettingOk returns a tuple with the Setting field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationConfigOption) GetSettingOk() (*string, bool) {
if o == nil || IsNil(o.Setting) {
return nil, false
}
return o.Setting, true
}
// HasSetting returns a boolean if a field has been set.
func (o *ApplicationConfigOption) HasSetting() bool {
if o != nil && !IsNil(o.Setting) {
return true
}
return false
}
// SetSetting gets a reference to the given string and assigns it to the Setting field.
func (o *ApplicationConfigOption) SetSetting(v string) {
o.Setting = &v
}
func (o ApplicationConfigOption) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ApplicationConfigOption) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Parameter) {
toSerialize["parameter"] = o.Parameter
}
if !IsNil(o.Setting) {
toSerialize["setting"] = o.Setting
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ApplicationConfigOption) UnmarshalJSON(data []byte) (err error) {
varApplicationConfigOption := _ApplicationConfigOption{}
err = json.Unmarshal(data, &varApplicationConfigOption)
if err != nil {
return err
}
*o = ApplicationConfigOption(varApplicationConfigOption)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "parameter")
delete(additionalProperties, "setting")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableApplicationConfigOption struct {
value *ApplicationConfigOption
isSet bool
}
func (v NullableApplicationConfigOption) Get() *ApplicationConfigOption {
return v.value
}
func (v *NullableApplicationConfigOption) Set(val *ApplicationConfigOption) {
v.value = val
v.isSet = true
}
func (v NullableApplicationConfigOption) IsSet() bool {
return v.isSet
}
func (v *NullableApplicationConfigOption) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableApplicationConfigOption(val *ApplicationConfigOption) *NullableApplicationConfigOption {
return &NullableApplicationConfigOption{value: val, isSet: true}
}
func (v NullableApplicationConfigOption) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableApplicationConfigOption) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}