/*
Cloud Hypervisor API

Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.

API version: 0.3.0
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package openapi

import (
	"encoding/json"
)

// VmResizeDisk struct for VmResizeDisk
type VmResizeDisk struct {
	// disk identifier
	Id *string `json:"id,omitempty"`
	// desired disk size in bytes
	DesiredSize *int64 `json:"desired_size,omitempty"`
}

// NewVmResizeDisk instantiates a new VmResizeDisk 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 NewVmResizeDisk() *VmResizeDisk {
	this := VmResizeDisk{}
	return &this
}

// NewVmResizeDiskWithDefaults instantiates a new VmResizeDisk 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 NewVmResizeDiskWithDefaults() *VmResizeDisk {
	this := VmResizeDisk{}
	return &this
}

// GetId returns the Id field value if set, zero value otherwise.
func (o *VmResizeDisk) GetId() string {
	if o == nil || o.Id == nil {
		var ret string
		return ret
	}
	return *o.Id
}

// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmResizeDisk) GetIdOk() (*string, bool) {
	if o == nil || o.Id == nil {
		return nil, false
	}
	return o.Id, true
}

// HasId returns a boolean if a field has been set.
func (o *VmResizeDisk) HasId() bool {
	if o != nil && o.Id != nil {
		return true
	}

	return false
}

// SetId gets a reference to the given string and assigns it to the Id field.
func (o *VmResizeDisk) SetId(v string) {
	o.Id = &v
}

// GetDesiredSize returns the DesiredSize field value if set, zero value otherwise.
func (o *VmResizeDisk) GetDesiredSize() int64 {
	if o == nil || o.DesiredSize == nil {
		var ret int64
		return ret
	}
	return *o.DesiredSize
}

// GetDesiredSizeOk returns a tuple with the DesiredSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmResizeDisk) GetDesiredSizeOk() (*int64, bool) {
	if o == nil || o.DesiredSize == nil {
		return nil, false
	}
	return o.DesiredSize, true
}

// HasDesiredSize returns a boolean if a field has been set.
func (o *VmResizeDisk) HasDesiredSize() bool {
	if o != nil && o.DesiredSize != nil {
		return true
	}

	return false
}

// SetDesiredSize gets a reference to the given int64 and assigns it to the DesiredSize field.
func (o *VmResizeDisk) SetDesiredSize(v int64) {
	o.DesiredSize = &v
}

func (o VmResizeDisk) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Id != nil {
		toSerialize["id"] = o.Id
	}
	if o.DesiredSize != nil {
		toSerialize["desired_size"] = o.DesiredSize
	}
	return json.Marshal(toSerialize)
}

type NullableVmResizeDisk struct {
	value *VmResizeDisk
	isSet bool
}

func (v NullableVmResizeDisk) Get() *VmResizeDisk {
	return v.value
}

func (v *NullableVmResizeDisk) Set(val *VmResizeDisk) {
	v.value = val
	v.isSet = true
}

func (v NullableVmResizeDisk) IsSet() bool {
	return v.isSet
}

func (v *NullableVmResizeDisk) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableVmResizeDisk(val *VmResizeDisk) *NullableVmResizeDisk {
	return &NullableVmResizeDisk{value: val, isSet: true}
}

func (v NullableVmResizeDisk) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableVmResizeDisk) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
