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

// GetStoresUnderAccountRequest struct for GetStoresUnderAccountRequest
type GetStoresUnderAccountRequest struct {
	// The company account. If you only specify this parameter, the response includes the stores of all merchant accounts that are associated with the company account.
	CompanyAccount string `json:"companyAccount"`
	// The merchant account. With this parameter, the response only includes the stores of the specified merchant account.
	MerchantAccount *string `json:"merchantAccount,omitempty"`
}

// NewGetStoresUnderAccountRequest instantiates a new GetStoresUnderAccountRequest 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 NewGetStoresUnderAccountRequest(companyAccount string) *GetStoresUnderAccountRequest {
	this := GetStoresUnderAccountRequest{}
	this.CompanyAccount = companyAccount
	return &this
}

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

// GetCompanyAccount returns the CompanyAccount field value
func (o *GetStoresUnderAccountRequest) GetCompanyAccount() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.CompanyAccount
}

// GetCompanyAccountOk returns a tuple with the CompanyAccount field value
// and a boolean to check if the value has been set.
func (o *GetStoresUnderAccountRequest) GetCompanyAccountOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.CompanyAccount, true
}

// SetCompanyAccount sets field value
func (o *GetStoresUnderAccountRequest) SetCompanyAccount(v string) {
	o.CompanyAccount = v
}

// GetMerchantAccount returns the MerchantAccount field value if set, zero value otherwise.
func (o *GetStoresUnderAccountRequest) GetMerchantAccount() string {
	if o == nil || common.IsNil(o.MerchantAccount) {
		var ret string
		return ret
	}
	return *o.MerchantAccount
}

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

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

	return false
}

// SetMerchantAccount gets a reference to the given string and assigns it to the MerchantAccount field.
func (o *GetStoresUnderAccountRequest) SetMerchantAccount(v string) {
	o.MerchantAccount = &v
}

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

func (o GetStoresUnderAccountRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["companyAccount"] = o.CompanyAccount
	if !common.IsNil(o.MerchantAccount) {
		toSerialize["merchantAccount"] = o.MerchantAccount
	}
	return toSerialize, nil
}

type NullableGetStoresUnderAccountRequest struct {
	value *GetStoresUnderAccountRequest
	isSet bool
}

func (v NullableGetStoresUnderAccountRequest) Get() *GetStoresUnderAccountRequest {
	return v.value
}

func (v *NullableGetStoresUnderAccountRequest) Set(val *GetStoresUnderAccountRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableGetStoresUnderAccountRequest(val *GetStoresUnderAccountRequest) *NullableGetStoresUnderAccountRequest {
	return &NullableGetStoresUnderAccountRequest{value: val, isSet: true}
}

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

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