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

// UserSvcListPermitsResponse struct for UserSvcListPermitsResponse
type UserSvcListPermitsResponse struct {
	Permits []UserSvcPermit `json:"permits,omitempty"`
}

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

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

// GetPermits returns the Permits field value if set, zero value otherwise.
func (o *UserSvcListPermitsResponse) GetPermits() []UserSvcPermit {
	if o == nil || IsNil(o.Permits) {
		var ret []UserSvcPermit
		return ret
	}
	return o.Permits
}

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

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

	return false
}

// SetPermits gets a reference to the given []UserSvcPermit and assigns it to the Permits field.
func (o *UserSvcListPermitsResponse) SetPermits(v []UserSvcPermit) {
	o.Permits = v
}

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

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

type NullableUserSvcListPermitsResponse struct {
	value *UserSvcListPermitsResponse
	isSet bool
}

func (v NullableUserSvcListPermitsResponse) Get() *UserSvcListPermitsResponse {
	return v.value
}

func (v *NullableUserSvcListPermitsResponse) Set(val *UserSvcListPermitsResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUserSvcListPermitsResponse(val *UserSvcListPermitsResponse) *NullableUserSvcListPermitsResponse {
	return &NullableUserSvcListPermitsResponse{value: val, isSet: true}
}

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

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


