/*
Basic Svc

An example service for bootstrapping.

API version: 0.3.0-rc.8
Contact: sales@singulatron.com
*/

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

package openapi

import (
	"encoding/json"
)

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

// BasicSvcListPetsResponse struct for BasicSvcListPetsResponse
type BasicSvcListPetsResponse struct {
	Pets []BasicSvcPet `json:"pets,omitempty"`
}

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

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

// GetPets returns the Pets field value if set, zero value otherwise.
func (o *BasicSvcListPetsResponse) GetPets() []BasicSvcPet {
	if o == nil || IsNil(o.Pets) {
		var ret []BasicSvcPet
		return ret
	}
	return o.Pets
}

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

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

	return false
}

// SetPets gets a reference to the given []BasicSvcPet and assigns it to the Pets field.
func (o *BasicSvcListPetsResponse) SetPets(v []BasicSvcPet) {
	o.Pets = v
}

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

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

type NullableBasicSvcListPetsResponse struct {
	value *BasicSvcListPetsResponse
	isSet bool
}

func (v NullableBasicSvcListPetsResponse) Get() *BasicSvcListPetsResponse {
	return v.value
}

func (v *NullableBasicSvcListPetsResponse) Set(val *BasicSvcListPetsResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableBasicSvcListPetsResponse(val *BasicSvcListPetsResponse) *NullableBasicSvcListPetsResponse {
	return &NullableBasicSvcListPetsResponse{value: val, isSet: true}
}

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

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


