/*
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 AccessibilityTreeResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AccessibilityTreeResponse{}

// AccessibilityTreeResponse struct for AccessibilityTreeResponse
type AccessibilityTreeResponse struct {
	Root *ComputerUseAccessibilityNode `json:"root,omitempty"`
	Truncated *bool `json:"truncated,omitempty"`
}

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

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

// GetRoot returns the Root field value if set, zero value otherwise.
func (o *AccessibilityTreeResponse) GetRoot() ComputerUseAccessibilityNode {
	if o == nil || IsNil(o.Root) {
		var ret ComputerUseAccessibilityNode
		return ret
	}
	return *o.Root
}

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

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

	return false
}

// SetRoot gets a reference to the given ComputerUseAccessibilityNode and assigns it to the Root field.
func (o *AccessibilityTreeResponse) SetRoot(v ComputerUseAccessibilityNode) {
	o.Root = &v
}

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

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

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

	return false
}

// SetTruncated gets a reference to the given bool and assigns it to the Truncated field.
func (o *AccessibilityTreeResponse) SetTruncated(v bool) {
	o.Truncated = &v
}

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

func (o AccessibilityTreeResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Root) {
		toSerialize["root"] = o.Root
	}
	if !IsNil(o.Truncated) {
		toSerialize["truncated"] = o.Truncated
	}
	return toSerialize, nil
}

type NullableAccessibilityTreeResponse struct {
	value *AccessibilityTreeResponse
	isSet bool
}

func (v NullableAccessibilityTreeResponse) Get() *AccessibilityTreeResponse {
	return v.value
}

func (v *NullableAccessibilityTreeResponse) Set(val *AccessibilityTreeResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAccessibilityTreeResponse(val *AccessibilityTreeResponse) *NullableAccessibilityTreeResponse {
	return &NullableAccessibilityTreeResponse{value: val, isSet: true}
}

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

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


