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

// ScrollResponse struct for ScrollResponse
type ScrollResponse struct {
	Success *bool `json:"success,omitempty"`
}

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

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

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

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

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

	return false
}

// SetSuccess gets a reference to the given bool and assigns it to the Success field.
func (o *ScrollResponse) SetSuccess(v bool) {
	o.Success = &v
}

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

func (o ScrollResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Success) {
		toSerialize["success"] = o.Success
	}
	return toSerialize, nil
}

type NullableScrollResponse struct {
	value *ScrollResponse
	isSet bool
}

func (v NullableScrollResponse) Get() *ScrollResponse {
	return v.value
}

func (v *NullableScrollResponse) Set(val *ScrollResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableScrollResponse(val *ScrollResponse) *NullableScrollResponse {
	return &NullableScrollResponse{value: val, isSet: true}
}

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

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


