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

// IbanAccountIdentificationRequirement struct for IbanAccountIdentificationRequirement
type IbanAccountIdentificationRequirement struct {
	// Specifies the allowed prefixes for the international bank account number as defined in the ISO-13616 standard.
	Description *string `json:"description,omitempty"`
	// Contains the list of allowed prefixes for international bank accounts. For example: NL, US, UK.
	IbanPrefixes []string `json:"ibanPrefixes,omitempty"`
	// **ibanAccountIdentificationRequirement**
	Type string `json:"type"`
}

// NewIbanAccountIdentificationRequirement instantiates a new IbanAccountIdentificationRequirement 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 NewIbanAccountIdentificationRequirement(type_ string) *IbanAccountIdentificationRequirement {
	this := IbanAccountIdentificationRequirement{}
	this.Type = type_
	return &this
}

// NewIbanAccountIdentificationRequirementWithDefaults instantiates a new IbanAccountIdentificationRequirement 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 NewIbanAccountIdentificationRequirementWithDefaults() *IbanAccountIdentificationRequirement {
	this := IbanAccountIdentificationRequirement{}
	var type_ string = "ibanAccountIdentificationRequirement"
	this.Type = type_
	return &this
}

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

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

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

	return false
}

// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *IbanAccountIdentificationRequirement) SetDescription(v string) {
	o.Description = &v
}

// GetIbanPrefixes returns the IbanPrefixes field value if set, zero value otherwise.
func (o *IbanAccountIdentificationRequirement) GetIbanPrefixes() []string {
	if o == nil || common.IsNil(o.IbanPrefixes) {
		var ret []string
		return ret
	}
	return o.IbanPrefixes
}

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

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

	return false
}

// SetIbanPrefixes gets a reference to the given []string and assigns it to the IbanPrefixes field.
func (o *IbanAccountIdentificationRequirement) SetIbanPrefixes(v []string) {
	o.IbanPrefixes = v
}

// GetType returns the Type field value
func (o *IbanAccountIdentificationRequirement) 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 *IbanAccountIdentificationRequirement) GetTypeOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Type, true
}

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

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

func (o IbanAccountIdentificationRequirement) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !common.IsNil(o.Description) {
		toSerialize["description"] = o.Description
	}
	if !common.IsNil(o.IbanPrefixes) {
		toSerialize["ibanPrefixes"] = o.IbanPrefixes
	}
	toSerialize["type"] = o.Type
	return toSerialize, nil
}

type NullableIbanAccountIdentificationRequirement struct {
	value *IbanAccountIdentificationRequirement
	isSet bool
}

func (v NullableIbanAccountIdentificationRequirement) Get() *IbanAccountIdentificationRequirement {
	return v.value
}

func (v *NullableIbanAccountIdentificationRequirement) Set(val *IbanAccountIdentificationRequirement) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableIbanAccountIdentificationRequirement(val *IbanAccountIdentificationRequirement) *NullableIbanAccountIdentificationRequirement {
	return &NullableIbanAccountIdentificationRequirement{value: val, isSet: true}
}

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

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

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