/*
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"
)

// VmAddUserDevice struct for VmAddUserDevice
type VmAddUserDevice struct {
	Socket string `json:"socket"`
}

// NewVmAddUserDevice instantiates a new VmAddUserDevice 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 NewVmAddUserDevice(socket string) *VmAddUserDevice {
	this := VmAddUserDevice{}
	this.Socket = socket
	return &this
}

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

// GetSocket returns the Socket field value
func (o *VmAddUserDevice) GetSocket() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Socket
}

// GetSocketOk returns a tuple with the Socket field value
// and a boolean to check if the value has been set.
func (o *VmAddUserDevice) GetSocketOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Socket, true
}

// SetSocket sets field value
func (o *VmAddUserDevice) SetSocket(v string) {
	o.Socket = v
}

func (o VmAddUserDevice) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["socket"] = o.Socket
	}
	return json.Marshal(toSerialize)
}

type NullableVmAddUserDevice struct {
	value *VmAddUserDevice
	isSet bool
}

func (v NullableVmAddUserDevice) Get() *VmAddUserDevice {
	return v.value
}

func (v *NullableVmAddUserDevice) Set(val *VmAddUserDevice) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableVmAddUserDevice(val *VmAddUserDevice) *NullableVmAddUserDevice {
	return &NullableVmAddUserDevice{value: val, isSet: true}
}

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

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