/*
Payments App API

API version: 1
*/

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

package paymentsapp

import (
	"encoding/json"

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

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

// PaymentsAppResponse struct for PaymentsAppResponse
type PaymentsAppResponse struct {
	// List of Payments Apps.
	PaymentsApps []PaymentsAppDto `json:"paymentsApps"`
}

// NewPaymentsAppResponse instantiates a new PaymentsAppResponse 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 NewPaymentsAppResponse(paymentsApps []PaymentsAppDto) *PaymentsAppResponse {
	this := PaymentsAppResponse{}
	this.PaymentsApps = paymentsApps
	return &this
}

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

// GetPaymentsApps returns the PaymentsApps field value
func (o *PaymentsAppResponse) GetPaymentsApps() []PaymentsAppDto {
	if o == nil {
		var ret []PaymentsAppDto
		return ret
	}

	return o.PaymentsApps
}

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

// SetPaymentsApps sets field value
func (o *PaymentsAppResponse) SetPaymentsApps(v []PaymentsAppDto) {
	o.PaymentsApps = v
}

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

func (o PaymentsAppResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["paymentsApps"] = o.PaymentsApps
	return toSerialize, nil
}

type NullablePaymentsAppResponse struct {
	value *PaymentsAppResponse
	isSet bool
}

func (v NullablePaymentsAppResponse) Get() *PaymentsAppResponse {
	return v.value
}

func (v *NullablePaymentsAppResponse) Set(val *PaymentsAppResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePaymentsAppResponse(val *PaymentsAppResponse) *NullablePaymentsAppResponse {
	return &NullablePaymentsAppResponse{value: val, isSet: true}
}

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

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