/*
1Backend

AI-native microservices platform.

API version: 0.8.2
Contact: sales@singulatron.com
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package openapi

import (
	"encoding/json"
)

// checks if the ProxySvcSaveRoutesRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProxySvcSaveRoutesRequest{}

// ProxySvcSaveRoutesRequest struct for ProxySvcSaveRoutesRequest
type ProxySvcSaveRoutesRequest struct {
	Routes []ProxySvcRouteInput `json:"routes,omitempty"`
}

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

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

// GetRoutes returns the Routes field value if set, zero value otherwise.
func (o *ProxySvcSaveRoutesRequest) GetRoutes() []ProxySvcRouteInput {
	if o == nil || IsNil(o.Routes) {
		var ret []ProxySvcRouteInput
		return ret
	}
	return o.Routes
}

// GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxySvcSaveRoutesRequest) GetRoutesOk() ([]ProxySvcRouteInput, bool) {
	if o == nil || IsNil(o.Routes) {
		return nil, false
	}
	return o.Routes, true
}

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

	return false
}

// SetRoutes gets a reference to the given []ProxySvcRouteInput and assigns it to the Routes field.
func (o *ProxySvcSaveRoutesRequest) SetRoutes(v []ProxySvcRouteInput) {
	o.Routes = v
}

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

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

type NullableProxySvcSaveRoutesRequest struct {
	value *ProxySvcSaveRoutesRequest
	isSet bool
}

func (v NullableProxySvcSaveRoutesRequest) Get() *ProxySvcSaveRoutesRequest {
	return v.value
}

func (v *NullableProxySvcSaveRoutesRequest) Set(val *ProxySvcSaveRoutesRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableProxySvcSaveRoutesRequest(val *ProxySvcSaveRoutesRequest) *NullableProxySvcSaveRoutesRequest {
	return &NullableProxySvcSaveRoutesRequest{value: val, isSet: true}
}

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

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


