/*
Daytona Toolbox API

Daytona Toolbox API

API version: v0.0.0-dev
*/

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

package toolbox

import (
	"encoding/json"
)

// checks if the PtyCreateRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PtyCreateRequest{}

// PtyCreateRequest struct for PtyCreateRequest
type PtyCreateRequest struct {
	Cols *int32 `json:"cols,omitempty"`
	Cwd *string `json:"cwd,omitempty"`
	Envs *map[string]string `json:"envs,omitempty"`
	Id *string `json:"id,omitempty"`
	// Don't start PTY until first client connects
	LazyStart *bool `json:"lazyStart,omitempty"`
	Rows *int32 `json:"rows,omitempty"`
}

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

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

// GetCols returns the Cols field value if set, zero value otherwise.
func (o *PtyCreateRequest) GetCols() int32 {
	if o == nil || IsNil(o.Cols) {
		var ret int32
		return ret
	}
	return *o.Cols
}

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

// HasCols returns a boolean if a field has been set.
func (o *PtyCreateRequest) HasCols() bool {
	if o != nil && !IsNil(o.Cols) {
		return true
	}

	return false
}

// SetCols gets a reference to the given int32 and assigns it to the Cols field.
func (o *PtyCreateRequest) SetCols(v int32) {
	o.Cols = &v
}

// GetCwd returns the Cwd field value if set, zero value otherwise.
func (o *PtyCreateRequest) GetCwd() string {
	if o == nil || IsNil(o.Cwd) {
		var ret string
		return ret
	}
	return *o.Cwd
}

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

// HasCwd returns a boolean if a field has been set.
func (o *PtyCreateRequest) HasCwd() bool {
	if o != nil && !IsNil(o.Cwd) {
		return true
	}

	return false
}

// SetCwd gets a reference to the given string and assigns it to the Cwd field.
func (o *PtyCreateRequest) SetCwd(v string) {
	o.Cwd = &v
}

// GetEnvs returns the Envs field value if set, zero value otherwise.
func (o *PtyCreateRequest) GetEnvs() map[string]string {
	if o == nil || IsNil(o.Envs) {
		var ret map[string]string
		return ret
	}
	return *o.Envs
}

// GetEnvsOk returns a tuple with the Envs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PtyCreateRequest) GetEnvsOk() (*map[string]string, bool) {
	if o == nil || IsNil(o.Envs) {
		return nil, false
	}
	return o.Envs, true
}

// HasEnvs returns a boolean if a field has been set.
func (o *PtyCreateRequest) HasEnvs() bool {
	if o != nil && !IsNil(o.Envs) {
		return true
	}

	return false
}

// SetEnvs gets a reference to the given map[string]string and assigns it to the Envs field.
func (o *PtyCreateRequest) SetEnvs(v map[string]string) {
	o.Envs = &v
}

// GetId returns the Id field value if set, zero value otherwise.
func (o *PtyCreateRequest) GetId() string {
	if o == nil || IsNil(o.Id) {
		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 *PtyCreateRequest) GetIdOk() (*string, bool) {
	if o == nil || IsNil(o.Id) {
		return nil, false
	}
	return o.Id, true
}

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

	return false
}

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

// GetLazyStart returns the LazyStart field value if set, zero value otherwise.
func (o *PtyCreateRequest) GetLazyStart() bool {
	if o == nil || IsNil(o.LazyStart) {
		var ret bool
		return ret
	}
	return *o.LazyStart
}

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

// HasLazyStart returns a boolean if a field has been set.
func (o *PtyCreateRequest) HasLazyStart() bool {
	if o != nil && !IsNil(o.LazyStart) {
		return true
	}

	return false
}

// SetLazyStart gets a reference to the given bool and assigns it to the LazyStart field.
func (o *PtyCreateRequest) SetLazyStart(v bool) {
	o.LazyStart = &v
}

// GetRows returns the Rows field value if set, zero value otherwise.
func (o *PtyCreateRequest) GetRows() int32 {
	if o == nil || IsNil(o.Rows) {
		var ret int32
		return ret
	}
	return *o.Rows
}

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

// HasRows returns a boolean if a field has been set.
func (o *PtyCreateRequest) HasRows() bool {
	if o != nil && !IsNil(o.Rows) {
		return true
	}

	return false
}

// SetRows gets a reference to the given int32 and assigns it to the Rows field.
func (o *PtyCreateRequest) SetRows(v int32) {
	o.Rows = &v
}

func (o PtyCreateRequest) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o PtyCreateRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Cols) {
		toSerialize["cols"] = o.Cols
	}
	if !IsNil(o.Cwd) {
		toSerialize["cwd"] = o.Cwd
	}
	if !IsNil(o.Envs) {
		toSerialize["envs"] = o.Envs
	}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.LazyStart) {
		toSerialize["lazyStart"] = o.LazyStart
	}
	if !IsNil(o.Rows) {
		toSerialize["rows"] = o.Rows
	}
	return toSerialize, nil
}

type NullablePtyCreateRequest struct {
	value *PtyCreateRequest
	isSet bool
}

func (v NullablePtyCreateRequest) Get() *PtyCreateRequest {
	return v.value
}

func (v *NullablePtyCreateRequest) Set(val *PtyCreateRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePtyCreateRequest(val *PtyCreateRequest) *NullablePtyCreateRequest {
	return &NullablePtyCreateRequest{value: val, isSet: true}
}

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

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


