/*
Configuration API

API version: 2
*/

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

package balanceplatform

import (
	"encoding/json"

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

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

// PaginatedAccountHoldersResponse struct for PaginatedAccountHoldersResponse
type PaginatedAccountHoldersResponse struct {
	// List of account holders.
	AccountHolders []AccountHolder `json:"accountHolders"`
	// Indicates whether there are more items on the next page.
	HasNext bool `json:"hasNext"`
	// Indicates whether there are more items on the previous page.
	HasPrevious bool `json:"hasPrevious"`
}

// NewPaginatedAccountHoldersResponse instantiates a new PaginatedAccountHoldersResponse 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 NewPaginatedAccountHoldersResponse(accountHolders []AccountHolder, hasNext bool, hasPrevious bool) *PaginatedAccountHoldersResponse {
	this := PaginatedAccountHoldersResponse{}
	this.AccountHolders = accountHolders
	this.HasNext = hasNext
	this.HasPrevious = hasPrevious
	return &this
}

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

// GetAccountHolders returns the AccountHolders field value
func (o *PaginatedAccountHoldersResponse) GetAccountHolders() []AccountHolder {
	if o == nil {
		var ret []AccountHolder
		return ret
	}

	return o.AccountHolders
}

// GetAccountHoldersOk returns a tuple with the AccountHolders field value
// and a boolean to check if the value has been set.
func (o *PaginatedAccountHoldersResponse) GetAccountHoldersOk() ([]AccountHolder, bool) {
	if o == nil {
		return nil, false
	}
	return o.AccountHolders, true
}

// SetAccountHolders sets field value
func (o *PaginatedAccountHoldersResponse) SetAccountHolders(v []AccountHolder) {
	o.AccountHolders = v
}

// GetHasNext returns the HasNext field value
func (o *PaginatedAccountHoldersResponse) GetHasNext() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.HasNext
}

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

// SetHasNext sets field value
func (o *PaginatedAccountHoldersResponse) SetHasNext(v bool) {
	o.HasNext = v
}

// GetHasPrevious returns the HasPrevious field value
func (o *PaginatedAccountHoldersResponse) GetHasPrevious() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.HasPrevious
}

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

// SetHasPrevious sets field value
func (o *PaginatedAccountHoldersResponse) SetHasPrevious(v bool) {
	o.HasPrevious = v
}

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

func (o PaginatedAccountHoldersResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["accountHolders"] = o.AccountHolders
	toSerialize["hasNext"] = o.HasNext
	toSerialize["hasPrevious"] = o.HasPrevious
	return toSerialize, nil
}

type NullablePaginatedAccountHoldersResponse struct {
	value *PaginatedAccountHoldersResponse
	isSet bool
}

func (v NullablePaginatedAccountHoldersResponse) Get() *PaginatedAccountHoldersResponse {
	return v.value
}

func (v *NullablePaginatedAccountHoldersResponse) Set(val *PaginatedAccountHoldersResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePaginatedAccountHoldersResponse(val *PaginatedAccountHoldersResponse) *NullablePaginatedAccountHoldersResponse {
	return &NullablePaginatedAccountHoldersResponse{value: val, isSet: true}
}

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

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