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

// MouseDragRequest struct for MouseDragRequest
type MouseDragRequest struct {
	Button *string `json:"button,omitempty"`
	EndX *int32 `json:"endX,omitempty"`
	EndY *int32 `json:"endY,omitempty"`
	StartX *int32 `json:"startX,omitempty"`
	StartY *int32 `json:"startY,omitempty"`
}

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

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

// GetButton returns the Button field value if set, zero value otherwise.
func (o *MouseDragRequest) 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 *MouseDragRequest) 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 *MouseDragRequest) 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 *MouseDragRequest) SetButton(v string) {
	o.Button = &v
}

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

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

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

	return false
}

// SetEndX gets a reference to the given int32 and assigns it to the EndX field.
func (o *MouseDragRequest) SetEndX(v int32) {
	o.EndX = &v
}

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

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

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

	return false
}

// SetEndY gets a reference to the given int32 and assigns it to the EndY field.
func (o *MouseDragRequest) SetEndY(v int32) {
	o.EndY = &v
}

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

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

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

	return false
}

// SetStartX gets a reference to the given int32 and assigns it to the StartX field.
func (o *MouseDragRequest) SetStartX(v int32) {
	o.StartX = &v
}

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

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

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

	return false
}

// SetStartY gets a reference to the given int32 and assigns it to the StartY field.
func (o *MouseDragRequest) SetStartY(v int32) {
	o.StartY = &v
}

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

func (o MouseDragRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Button) {
		toSerialize["button"] = o.Button
	}
	if !IsNil(o.EndX) {
		toSerialize["endX"] = o.EndX
	}
	if !IsNil(o.EndY) {
		toSerialize["endY"] = o.EndY
	}
	if !IsNil(o.StartX) {
		toSerialize["startX"] = o.StartX
	}
	if !IsNil(o.StartY) {
		toSerialize["startY"] = o.StartY
	}
	return toSerialize, nil
}

type NullableMouseDragRequest struct {
	value *MouseDragRequest
	isSet bool
}

func (v NullableMouseDragRequest) Get() *MouseDragRequest {
	return v.value
}

func (v *NullableMouseDragRequest) Set(val *MouseDragRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMouseDragRequest(val *MouseDragRequest) *NullableMouseDragRequest {
	return &NullableMouseDragRequest{value: val, isSet: true}
}

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

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


