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

// TdxConfig struct for TdxConfig
type TdxConfig struct {
	// Path to the firmware that will be used to boot the TDx guest up.
	Firmware string `json:"firmware"`
}

// NewTdxConfig instantiates a new TdxConfig 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 NewTdxConfig(firmware string) *TdxConfig {
	this := TdxConfig{}
	this.Firmware = firmware
	return &this
}

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

// GetFirmware returns the Firmware field value
func (o *TdxConfig) GetFirmware() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Firmware
}

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

// SetFirmware sets field value
func (o *TdxConfig) SetFirmware(v string) {
	o.Firmware = v
}

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

type NullableTdxConfig struct {
	value *TdxConfig
	isSet bool
}

func (v NullableTdxConfig) Get() *TdxConfig {
	return v.value
}

func (v *NullableTdxConfig) Set(val *TdxConfig) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableTdxConfig(val *TdxConfig) *NullableTdxConfig {
	return &NullableTdxConfig{value: val, isSet: true}
}

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

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