/* STACKIT Edge Cloud API This API provides endpoints for managing STACKIT Edge Cloud instances. API version: 1beta1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package edgebeta import ( "encoding/json" ) // checks if the BadRequest type satisfies the MappedNullable interface at compile time var _ MappedNullable = &BadRequest{} /* types and functions for code */ // isNotNullableString type BadRequestGetCodeAttributeType = *string func getBadRequestGetCodeAttributeTypeOk(arg BadRequestGetCodeAttributeType) (ret BadRequestGetCodeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBadRequestGetCodeAttributeType(arg *BadRequestGetCodeAttributeType, val BadRequestGetCodeRetType) { *arg = &val } type BadRequestGetCodeArgType = string type BadRequestGetCodeRetType = string /* types and functions for message */ // isNotNullableString type BadRequestGetMessageAttributeType = *string func getBadRequestGetMessageAttributeTypeOk(arg BadRequestGetMessageAttributeType) (ret BadRequestGetMessageRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setBadRequestGetMessageAttributeType(arg *BadRequestGetMessageAttributeType, val BadRequestGetMessageRetType) { *arg = &val } type BadRequestGetMessageArgType = string type BadRequestGetMessageRetType = string // BadRequest struct for BadRequest type BadRequest struct { Code BadRequestGetCodeAttributeType `json:"code,omitempty"` Message BadRequestGetMessageAttributeType `json:"message,omitempty"` } // NewBadRequest instantiates a new BadRequest 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 NewBadRequest() *BadRequest { this := BadRequest{} return &this } // NewBadRequestWithDefaults instantiates a new BadRequest 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 NewBadRequestWithDefaults() *BadRequest { this := BadRequest{} return &this } // GetCode returns the Code field value if set, zero value otherwise. func (o *BadRequest) GetCode() (res BadRequestGetCodeRetType) { res, _ = o.GetCodeOk() return } // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BadRequest) GetCodeOk() (ret BadRequestGetCodeRetType, ok bool) { return getBadRequestGetCodeAttributeTypeOk(o.Code) } // HasCode returns a boolean if a field has been set. func (o *BadRequest) HasCode() bool { _, ok := o.GetCodeOk() return ok } // SetCode gets a reference to the given string and assigns it to the Code field. func (o *BadRequest) SetCode(v BadRequestGetCodeRetType) { setBadRequestGetCodeAttributeType(&o.Code, v) } // GetMessage returns the Message field value if set, zero value otherwise. func (o *BadRequest) GetMessage() (res BadRequestGetMessageRetType) { res, _ = o.GetMessageOk() return } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *BadRequest) GetMessageOk() (ret BadRequestGetMessageRetType, ok bool) { return getBadRequestGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. func (o *BadRequest) HasMessage() bool { _, ok := o.GetMessageOk() return ok } // SetMessage gets a reference to the given string and assigns it to the Message field. func (o *BadRequest) SetMessage(v BadRequestGetMessageRetType) { setBadRequestGetMessageAttributeType(&o.Message, v) } func (o BadRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getBadRequestGetCodeAttributeTypeOk(o.Code); ok { toSerialize["Code"] = val } if val, ok := getBadRequestGetMessageAttributeTypeOk(o.Message); ok { toSerialize["Message"] = val } return toSerialize, nil } type NullableBadRequest struct { value *BadRequest isSet bool } func (v NullableBadRequest) Get() *BadRequest { return v.value } func (v *NullableBadRequest) Set(val *BadRequest) { v.value = val v.isSet = true } func (v NullableBadRequest) IsSet() bool { return v.isSet } func (v *NullableBadRequest) Unset() { v.value = nil v.isSet = false } func NewNullableBadRequest(val *BadRequest) *NullableBadRequest { return &NullableBadRequest{value: val, isSet: true} } func (v NullableBadRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableBadRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }