/* STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service API version: 3alpha1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package sqlserverflexalpha import ( "encoding/json" ) // checks if the ListInstance type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ListInstance{} /* types and functions for id */ // isNotNullableString type ListInstanceGetIdAttributeType = *string func getListInstanceGetIdAttributeTypeOk(arg ListInstanceGetIdAttributeType) (ret ListInstanceGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setListInstanceGetIdAttributeType(arg *ListInstanceGetIdAttributeType, val ListInstanceGetIdRetType) { *arg = &val } type ListInstanceGetIdArgType = string type ListInstanceGetIdRetType = string /* types and functions for isDeletable */ // isBoolean type ListInstancegetIsDeletableAttributeType = *bool type ListInstancegetIsDeletableArgType = bool type ListInstancegetIsDeletableRetType = bool func getListInstancegetIsDeletableAttributeTypeOk(arg ListInstancegetIsDeletableAttributeType) (ret ListInstancegetIsDeletableRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setListInstancegetIsDeletableAttributeType(arg *ListInstancegetIsDeletableAttributeType, val ListInstancegetIsDeletableRetType) { *arg = &val } /* types and functions for name */ // isNotNullableString type ListInstanceGetNameAttributeType = *string func getListInstanceGetNameAttributeTypeOk(arg ListInstanceGetNameAttributeType) (ret ListInstanceGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setListInstanceGetNameAttributeType(arg *ListInstanceGetNameAttributeType, val ListInstanceGetNameRetType) { *arg = &val } type ListInstanceGetNameArgType = string type ListInstanceGetNameRetType = string /* types and functions for status */ // isEnumRef type ListInstanceGetStatusAttributeType = *Status type ListInstanceGetStatusArgType = Status type ListInstanceGetStatusRetType = Status func getListInstanceGetStatusAttributeTypeOk(arg ListInstanceGetStatusAttributeType) (ret ListInstanceGetStatusRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setListInstanceGetStatusAttributeType(arg *ListInstanceGetStatusAttributeType, val ListInstanceGetStatusRetType) { *arg = &val } // ListInstance struct for ListInstance type ListInstance struct { // The ID of the instance. // REQUIRED Id ListInstanceGetIdAttributeType `json:"id" required:"true"` // Whether the instance can be deleted or not. // REQUIRED IsDeletable ListInstancegetIsDeletableAttributeType `json:"isDeletable" required:"true"` // The name of the instance. // REQUIRED Name ListInstanceGetNameAttributeType `json:"name" required:"true"` // REQUIRED Status ListInstanceGetStatusAttributeType `json:"status" required:"true"` } type _ListInstance ListInstance // NewListInstance instantiates a new ListInstance 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 NewListInstance(id ListInstanceGetIdArgType, isDeletable ListInstancegetIsDeletableArgType, name ListInstanceGetNameArgType, status ListInstanceGetStatusArgType) *ListInstance { this := ListInstance{} setListInstanceGetIdAttributeType(&this.Id, id) setListInstancegetIsDeletableAttributeType(&this.IsDeletable, isDeletable) setListInstanceGetNameAttributeType(&this.Name, name) setListInstanceGetStatusAttributeType(&this.Status, status) return &this } // NewListInstanceWithDefaults instantiates a new ListInstance 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 NewListInstanceWithDefaults() *ListInstance { this := ListInstance{} return &this } // GetId returns the Id field value func (o *ListInstance) GetId() (ret ListInstanceGetIdRetType) { ret, _ = o.GetIdOk() return ret } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. func (o *ListInstance) GetIdOk() (ret ListInstanceGetIdRetType, ok bool) { return getListInstanceGetIdAttributeTypeOk(o.Id) } // SetId sets field value func (o *ListInstance) SetId(v ListInstanceGetIdRetType) { setListInstanceGetIdAttributeType(&o.Id, v) } // GetIsDeletable returns the IsDeletable field value func (o *ListInstance) GetIsDeletable() (ret ListInstancegetIsDeletableRetType) { ret, _ = o.GetIsDeletableOk() return ret } // GetIsDeletableOk returns a tuple with the IsDeletable field value // and a boolean to check if the value has been set. func (o *ListInstance) GetIsDeletableOk() (ret ListInstancegetIsDeletableRetType, ok bool) { return getListInstancegetIsDeletableAttributeTypeOk(o.IsDeletable) } // SetIsDeletable sets field value func (o *ListInstance) SetIsDeletable(v ListInstancegetIsDeletableRetType) { setListInstancegetIsDeletableAttributeType(&o.IsDeletable, v) } // GetName returns the Name field value func (o *ListInstance) GetName() (ret ListInstanceGetNameRetType) { ret, _ = o.GetNameOk() return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. func (o *ListInstance) GetNameOk() (ret ListInstanceGetNameRetType, ok bool) { return getListInstanceGetNameAttributeTypeOk(o.Name) } // SetName sets field value func (o *ListInstance) SetName(v ListInstanceGetNameRetType) { setListInstanceGetNameAttributeType(&o.Name, v) } // GetStatus returns the Status field value func (o *ListInstance) GetStatus() (ret ListInstanceGetStatusRetType) { ret, _ = o.GetStatusOk() return ret } // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. func (o *ListInstance) GetStatusOk() (ret ListInstanceGetStatusRetType, ok bool) { return getListInstanceGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value func (o *ListInstance) SetStatus(v ListInstanceGetStatusRetType) { setListInstanceGetStatusAttributeType(&o.Status, v) } func (o ListInstance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListInstanceGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } if val, ok := getListInstancegetIsDeletableAttributeTypeOk(o.IsDeletable); ok { toSerialize["IsDeletable"] = val } if val, ok := getListInstanceGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getListInstanceGetStatusAttributeTypeOk(o.Status); ok { toSerialize["Status"] = val } return toSerialize, nil } type NullableListInstance struct { value *ListInstance isSet bool } func (v NullableListInstance) Get() *ListInstance { return v.value } func (v *NullableListInstance) Set(val *ListInstance) { v.value = val v.isSet = true } func (v NullableListInstance) IsSet() bool { return v.isSet } func (v *NullableListInstance) Unset() { v.value = nil v.isSet = false } func NewNullableListInstance(val *ListInstance) *NullableListInstance { return &NullableListInstance{value: val, isSet: true} } func (v NullableListInstance) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableListInstance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }