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

// MouseClickRequest struct for MouseClickRequest
type MouseClickRequest struct {
	// left, right, middle
	Button *string `json:"button,omitempty"`
	Double *bool `json:"double,omitempty"`
	X *int32 `json:"x,omitempty"`
	Y *int32 `json:"y,omitempty"`
}

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

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

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

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

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

	return false
}

// SetButton gets a reference to the given string and assigns it to the Button field.
func (o *MouseClickRequest) SetButton(v string) {
	o.Button = &v
}

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

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

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

	return false
}

// SetDouble gets a reference to the given bool and assigns it to the Double field.
func (o *MouseClickRequest) SetDouble(v bool) {
	o.Double = &v
}

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

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

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

	return false
}

// SetX gets a reference to the given int32 and assigns it to the X field.
func (o *MouseClickRequest) SetX(v int32) {
	o.X = &v
}

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

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

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

	return false
}

// SetY gets a reference to the given int32 and assigns it to the Y field.
func (o *MouseClickRequest) SetY(v int32) {
	o.Y = &v
}

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

func (o MouseClickRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Button) {
		toSerialize["button"] = o.Button
	}
	if !IsNil(o.Double) {
		toSerialize["double"] = o.Double
	}
	if !IsNil(o.X) {
		toSerialize["x"] = o.X
	}
	if !IsNil(o.Y) {
		toSerialize["y"] = o.Y
	}
	return toSerialize, nil
}

type NullableMouseClickRequest struct {
	value *MouseClickRequest
	isSet bool
}

func (v NullableMouseClickRequest) Get() *MouseClickRequest {
	return v.value
}

func (v *NullableMouseClickRequest) Set(val *MouseClickRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMouseClickRequest(val *MouseClickRequest) *NullableMouseClickRequest {
	return &NullableMouseClickRequest{value: val, isSet: true}
}

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

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


