/*
Transfers API

API version: 4
*/

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

package transfers

import (
	"encoding/json"

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

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

// FindTransfersResponse struct for FindTransfersResponse
type FindTransfersResponse struct {
	Links *Links `json:"_links,omitempty"`
	// Contains the transfers that match the query parameters.
	Data []TransferData `json:"data,omitempty"`
}

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

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

// GetLinks returns the Links field value if set, zero value otherwise.
func (o *FindTransfersResponse) GetLinks() Links {
	if o == nil || common.IsNil(o.Links) {
		var ret Links
		return ret
	}
	return *o.Links
}

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

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

	return false
}

// SetLinks gets a reference to the given Links and assigns it to the Links field.
func (o *FindTransfersResponse) SetLinks(v Links) {
	o.Links = &v
}

// GetData returns the Data field value if set, zero value otherwise.
func (o *FindTransfersResponse) GetData() []TransferData {
	if o == nil || common.IsNil(o.Data) {
		var ret []TransferData
		return ret
	}
	return o.Data
}

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

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

	return false
}

// SetData gets a reference to the given []TransferData and assigns it to the Data field.
func (o *FindTransfersResponse) SetData(v []TransferData) {
	o.Data = v
}

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

func (o FindTransfersResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !common.IsNil(o.Links) {
		toSerialize["_links"] = o.Links
	}
	if !common.IsNil(o.Data) {
		toSerialize["data"] = o.Data
	}
	return toSerialize, nil
}

type NullableFindTransfersResponse struct {
	value *FindTransfersResponse
	isSet bool
}

func (v NullableFindTransfersResponse) Get() *FindTransfersResponse {
	return v.value
}

func (v *NullableFindTransfersResponse) Set(val *FindTransfersResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableFindTransfersResponse(val *FindTransfersResponse) *NullableFindTransfersResponse {
	return &NullableFindTransfersResponse{value: val, isSet: true}
}

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

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