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

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

// AccessibilityInvokeRequest struct for AccessibilityInvokeRequest
type AccessibilityInvokeRequest struct {
	Action *string `json:"action,omitempty"`
	Id string `json:"id"`
}

type _AccessibilityInvokeRequest AccessibilityInvokeRequest

// NewAccessibilityInvokeRequest instantiates a new AccessibilityInvokeRequest 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 NewAccessibilityInvokeRequest(id string) *AccessibilityInvokeRequest {
	this := AccessibilityInvokeRequest{}
	this.Id = id
	return &this
}

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

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

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

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

	return false
}

// SetAction gets a reference to the given string and assigns it to the Action field.
func (o *AccessibilityInvokeRequest) SetAction(v string) {
	o.Action = &v
}

// GetId returns the Id field value
func (o *AccessibilityInvokeRequest) GetId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Id
}

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

// SetId sets field value
func (o *AccessibilityInvokeRequest) SetId(v string) {
	o.Id = v
}

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

func (o AccessibilityInvokeRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Action) {
		toSerialize["action"] = o.Action
	}
	toSerialize["id"] = o.Id
	return toSerialize, nil
}

func (o *AccessibilityInvokeRequest) UnmarshalJSON(data []byte) (err error) {
	// This validates that all required properties are included in the JSON object
	// by unmarshalling the object into a generic map with string keys and checking
	// that every required field exists as a key in the generic map.
	requiredProperties := []string{
		"id",
	}

	allProperties := make(map[string]interface{})

	err = json.Unmarshal(data, &allProperties)

	if err != nil {
		return err;
	}

	for _, requiredProperty := range(requiredProperties) {
		if _, exists := allProperties[requiredProperty]; !exists {
			return fmt.Errorf("no value given for required property %v", requiredProperty)
		}
	}

	varAccessibilityInvokeRequest := _AccessibilityInvokeRequest{}

	decoder := json.NewDecoder(bytes.NewReader(data))
	decoder.DisallowUnknownFields()
	err = decoder.Decode(&varAccessibilityInvokeRequest)

	if err != nil {
		return err
	}

	*o = AccessibilityInvokeRequest(varAccessibilityInvokeRequest)

	return err
}

type NullableAccessibilityInvokeRequest struct {
	value *AccessibilityInvokeRequest
	isSet bool
}

func (v NullableAccessibilityInvokeRequest) Get() *AccessibilityInvokeRequest {
	return v.value
}

func (v *NullableAccessibilityInvokeRequest) Set(val *AccessibilityInvokeRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAccessibilityInvokeRequest(val *AccessibilityInvokeRequest) *NullableAccessibilityInvokeRequest {
	return &NullableAccessibilityInvokeRequest{value: val, isSet: true}
}

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

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


