/* STACKIT IaaS API This API allows you to create and modify IaaS resources. API version: 2beta1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package iaasbeta import ( "encoding/json" ) // checks if the ImageCreateResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ImageCreateResponse{} /* types and functions for id */ // isNotNullableString type ImageCreateResponseGetIdAttributeType = *string func getImageCreateResponseGetIdAttributeTypeOk(arg ImageCreateResponseGetIdAttributeType) (ret ImageCreateResponseGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setImageCreateResponseGetIdAttributeType(arg *ImageCreateResponseGetIdAttributeType, val ImageCreateResponseGetIdRetType) { *arg = &val } type ImageCreateResponseGetIdArgType = string type ImageCreateResponseGetIdRetType = string /* types and functions for uploadUrl */ // isNotNullableString type ImageCreateResponseGetUploadUrlAttributeType = *string func getImageCreateResponseGetUploadUrlAttributeTypeOk(arg ImageCreateResponseGetUploadUrlAttributeType) (ret ImageCreateResponseGetUploadUrlRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setImageCreateResponseGetUploadUrlAttributeType(arg *ImageCreateResponseGetUploadUrlAttributeType, val ImageCreateResponseGetUploadUrlRetType) { *arg = &val } type ImageCreateResponseGetUploadUrlArgType = string type ImageCreateResponseGetUploadUrlRetType = string // ImageCreateResponse Image creation response. type ImageCreateResponse struct { // Universally Unique Identifier (UUID). // REQUIRED Id ImageCreateResponseGetIdAttributeType `json:"id" required:"true"` // REQUIRED UploadUrl ImageCreateResponseGetUploadUrlAttributeType `json:"uploadUrl" required:"true"` } type _ImageCreateResponse ImageCreateResponse // NewImageCreateResponse instantiates a new ImageCreateResponse 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 NewImageCreateResponse(id ImageCreateResponseGetIdArgType, uploadUrl ImageCreateResponseGetUploadUrlArgType) *ImageCreateResponse { this := ImageCreateResponse{} setImageCreateResponseGetIdAttributeType(&this.Id, id) setImageCreateResponseGetUploadUrlAttributeType(&this.UploadUrl, uploadUrl) return &this } // NewImageCreateResponseWithDefaults instantiates a new ImageCreateResponse 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 NewImageCreateResponseWithDefaults() *ImageCreateResponse { this := ImageCreateResponse{} return &this } // GetId returns the Id field value func (o *ImageCreateResponse) GetId() (ret ImageCreateResponseGetIdRetType) { 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 *ImageCreateResponse) GetIdOk() (ret ImageCreateResponseGetIdRetType, ok bool) { return getImageCreateResponseGetIdAttributeTypeOk(o.Id) } // SetId sets field value func (o *ImageCreateResponse) SetId(v ImageCreateResponseGetIdRetType) { setImageCreateResponseGetIdAttributeType(&o.Id, v) } // GetUploadUrl returns the UploadUrl field value func (o *ImageCreateResponse) GetUploadUrl() (ret ImageCreateResponseGetUploadUrlRetType) { ret, _ = o.GetUploadUrlOk() return ret } // GetUploadUrlOk returns a tuple with the UploadUrl field value // and a boolean to check if the value has been set. func (o *ImageCreateResponse) GetUploadUrlOk() (ret ImageCreateResponseGetUploadUrlRetType, ok bool) { return getImageCreateResponseGetUploadUrlAttributeTypeOk(o.UploadUrl) } // SetUploadUrl sets field value func (o *ImageCreateResponse) SetUploadUrl(v ImageCreateResponseGetUploadUrlRetType) { setImageCreateResponseGetUploadUrlAttributeType(&o.UploadUrl, v) } func (o ImageCreateResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getImageCreateResponseGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } if val, ok := getImageCreateResponseGetUploadUrlAttributeTypeOk(o.UploadUrl); ok { toSerialize["UploadUrl"] = val } return toSerialize, nil } type NullableImageCreateResponse struct { value *ImageCreateResponse isSet bool } func (v NullableImageCreateResponse) Get() *ImageCreateResponse { return v.value } func (v *NullableImageCreateResponse) Set(val *ImageCreateResponse) { v.value = val v.isSet = true } func (v NullableImageCreateResponse) IsSet() bool { return v.isSet } func (v *NullableImageCreateResponse) Unset() { v.value = nil v.isSet = false } func NewNullableImageCreateResponse(val *ImageCreateResponse) *NullableImageCreateResponse { return &NullableImageCreateResponse{value: val, isSet: true} } func (v NullableImageCreateResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableImageCreateResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }