/*
POS Terminal Management API

API version: 1
*/

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

package posterminalmanagement

import (
	"encoding/json"

	"github.com/adyen/adyen-go-api-library/v21/src/common"
)

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

// GetStoresUnderAccountResponse struct for GetStoresUnderAccountResponse
type GetStoresUnderAccountResponse struct {
	// Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account.
	Stores []Store `json:"stores,omitempty"`
}

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

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

// GetStores returns the Stores field value if set, zero value otherwise.
func (o *GetStoresUnderAccountResponse) GetStores() []Store {
	if o == nil || common.IsNil(o.Stores) {
		var ret []Store
		return ret
	}
	return o.Stores
}

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

// HasStores returns a boolean if a field has been set.
func (o *GetStoresUnderAccountResponse) HasStores() bool {
	if o != nil && !common.IsNil(o.Stores) {
		return true
	}

	return false
}

// SetStores gets a reference to the given []Store and assigns it to the Stores field.
func (o *GetStoresUnderAccountResponse) SetStores(v []Store) {
	o.Stores = v
}

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

func (o GetStoresUnderAccountResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !common.IsNil(o.Stores) {
		toSerialize["stores"] = o.Stores
	}
	return toSerialize, nil
}

type NullableGetStoresUnderAccountResponse struct {
	value *GetStoresUnderAccountResponse
	isSet bool
}

func (v NullableGetStoresUnderAccountResponse) Get() *GetStoresUnderAccountResponse {
	return v.value
}

func (v *NullableGetStoresUnderAccountResponse) Set(val *GetStoresUnderAccountResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableGetStoresUnderAccountResponse(val *GetStoresUnderAccountResponse) *NullableGetStoresUnderAccountResponse {
	return &NullableGetStoresUnderAccountResponse{value: val, isSet: true}
}

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

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