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

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

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

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

// GetSocket returns the Socket field value
func (o *TpmConfig) 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 *TpmConfig) GetSocketOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Socket, true
}

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

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

type NullableTpmConfig struct {
	value *TpmConfig
	isSet bool
}

func (v NullableTpmConfig) Get() *TpmConfig {
	return v.value
}

func (v *NullableTpmConfig) Set(val *TpmConfig) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableTpmConfig(val *TpmConfig) *NullableTpmConfig {
	return &NullableTpmConfig{value: val, isSet: true}
}

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

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