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

// DebugConsoleConfig struct for DebugConsoleConfig
type DebugConsoleConfig struct {
	File   *string `json:"file,omitempty"`
	Mode   string  `json:"mode"`
	Iobase *int32  `json:"iobase,omitempty"`
}

// NewDebugConsoleConfig instantiates a new DebugConsoleConfig 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 NewDebugConsoleConfig(mode string) *DebugConsoleConfig {
	this := DebugConsoleConfig{}
	this.Mode = mode
	return &this
}

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

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

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

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

	return false
}

// SetFile gets a reference to the given string and assigns it to the File field.
func (o *DebugConsoleConfig) SetFile(v string) {
	o.File = &v
}

// GetMode returns the Mode field value
func (o *DebugConsoleConfig) GetMode() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Mode
}

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

// SetMode sets field value
func (o *DebugConsoleConfig) SetMode(v string) {
	o.Mode = v
}

// GetIobase returns the Iobase field value if set, zero value otherwise.
func (o *DebugConsoleConfig) GetIobase() int32 {
	if o == nil || o.Iobase == nil {
		var ret int32
		return ret
	}
	return *o.Iobase
}

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

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

	return false
}

// SetIobase gets a reference to the given int32 and assigns it to the Iobase field.
func (o *DebugConsoleConfig) SetIobase(v int32) {
	o.Iobase = &v
}

func (o DebugConsoleConfig) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.File != nil {
		toSerialize["file"] = o.File
	}
	if true {
		toSerialize["mode"] = o.Mode
	}
	if o.Iobase != nil {
		toSerialize["iobase"] = o.Iobase
	}
	return json.Marshal(toSerialize)
}

type NullableDebugConsoleConfig struct {
	value *DebugConsoleConfig
	isSet bool
}

func (v NullableDebugConsoleConfig) Get() *DebugConsoleConfig {
	return v.value
}

func (v *NullableDebugConsoleConfig) Set(val *DebugConsoleConfig) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDebugConsoleConfig(val *DebugConsoleConfig) *NullableDebugConsoleConfig {
	return &NullableDebugConsoleConfig{value: val, isSet: true}
}

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

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