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

// IsPortInUseResponse struct for IsPortInUseResponse
type IsPortInUseResponse struct {
	IsInUse *bool `json:"isInUse,omitempty"`
}

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

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

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

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

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

	return false
}

// SetIsInUse gets a reference to the given bool and assigns it to the IsInUse field.
func (o *IsPortInUseResponse) SetIsInUse(v bool) {
	o.IsInUse = &v
}

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

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

type NullableIsPortInUseResponse struct {
	value *IsPortInUseResponse
	isSet bool
}

func (v NullableIsPortInUseResponse) Get() *IsPortInUseResponse {
	return v.value
}

func (v *NullableIsPortInUseResponse) Set(val *IsPortInUseResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableIsPortInUseResponse(val *IsPortInUseResponse) *NullableIsPortInUseResponse {
	return &NullableIsPortInUseResponse{value: val, isSet: true}
}

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

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


