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

// AssociationInitiateRequest struct for AssociationInitiateRequest
type AssociationInitiateRequest struct {
	// The list of unique identifiers of the resources that you are associating with the SCA device.  Maximum: 5 strings.
	Ids []string `json:"ids"`
	// The type of resource that you are associating with the SCA device.  Possible value: **PaymentInstrument**
	Type string `json:"type"`
}

// NewAssociationInitiateRequest instantiates a new AssociationInitiateRequest 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 NewAssociationInitiateRequest(ids []string, type_ string) *AssociationInitiateRequest {
	this := AssociationInitiateRequest{}
	this.Ids = ids
	this.Type = type_
	return &this
}

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

// GetIds returns the Ids field value
func (o *AssociationInitiateRequest) GetIds() []string {
	if o == nil {
		var ret []string
		return ret
	}

	return o.Ids
}

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

// SetIds sets field value
func (o *AssociationInitiateRequest) SetIds(v []string) {
	o.Ids = v
}

// GetType returns the Type field value
func (o *AssociationInitiateRequest) GetType() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Type
}

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

// SetType sets field value
func (o *AssociationInitiateRequest) SetType(v string) {
	o.Type = v
}

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

func (o AssociationInitiateRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["ids"] = o.Ids
	toSerialize["type"] = o.Type
	return toSerialize, nil
}

type NullableAssociationInitiateRequest struct {
	value *AssociationInitiateRequest
	isSet bool
}

func (v NullableAssociationInitiateRequest) Get() *AssociationInitiateRequest {
	return v.value
}

func (v *NullableAssociationInitiateRequest) Set(val *AssociationInitiateRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAssociationInitiateRequest(val *AssociationInitiateRequest) *NullableAssociationInitiateRequest {
	return &NullableAssociationInitiateRequest{value: val, isSet: true}
}

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

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

func (o *AssociationInitiateRequest) isValidType() bool {
	var allowedEnumValues = []string{"PaymentInstrument"}
	for _, allowed := range allowedEnumValues {
		if o.GetType() == allowed {
			return true
		}
	}
	return false
}
