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

// MouseScrollRequest struct for MouseScrollRequest
type MouseScrollRequest struct {
	Amount *int32 `json:"amount,omitempty"`
	// up, down
	Direction *string `json:"direction,omitempty"`
	X *int32 `json:"x,omitempty"`
	Y *int32 `json:"y,omitempty"`
}

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

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

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

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

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

	return false
}

// SetAmount gets a reference to the given int32 and assigns it to the Amount field.
func (o *MouseScrollRequest) SetAmount(v int32) {
	o.Amount = &v
}

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

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

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

	return false
}

// SetDirection gets a reference to the given string and assigns it to the Direction field.
func (o *MouseScrollRequest) SetDirection(v string) {
	o.Direction = &v
}

// GetX returns the X field value if set, zero value otherwise.
func (o *MouseScrollRequest) 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 *MouseScrollRequest) 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 *MouseScrollRequest) 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 *MouseScrollRequest) SetX(v int32) {
	o.X = &v
}

// GetY returns the Y field value if set, zero value otherwise.
func (o *MouseScrollRequest) 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 *MouseScrollRequest) 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 *MouseScrollRequest) 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 *MouseScrollRequest) SetY(v int32) {
	o.Y = &v
}

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

func (o MouseScrollRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Amount) {
		toSerialize["amount"] = o.Amount
	}
	if !IsNil(o.Direction) {
		toSerialize["direction"] = o.Direction
	}
	if !IsNil(o.X) {
		toSerialize["x"] = o.X
	}
	if !IsNil(o.Y) {
		toSerialize["y"] = o.Y
	}
	return toSerialize, nil
}

type NullableMouseScrollRequest struct {
	value *MouseScrollRequest
	isSet bool
}

func (v NullableMouseScrollRequest) Get() *MouseScrollRequest {
	return v.value
}

func (v *NullableMouseScrollRequest) Set(val *MouseScrollRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMouseScrollRequest(val *MouseScrollRequest) *NullableMouseScrollRequest {
	return &NullableMouseScrollRequest{value: val, isSet: true}
}

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

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


