/*
Balance webhook

API version: 1
*/

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

package balancewebhook

import (
	"encoding/json"
	"time"

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

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

// BalanceNotificationData struct for BalanceNotificationData
type BalanceNotificationData struct {
	// The unique identifier of the balance account.
	BalanceAccountId string `json:"balanceAccountId"`
	// The unique identifier of the balance platform.
	BalancePlatform *string  `json:"balancePlatform,omitempty"`
	Balances        Balances `json:"balances"`
	// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
	CreationDate *time.Time `json:"creationDate,omitempty"`
	// TThe three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
	Currency string `json:"currency"`
	// The ID of the resource.
	Id *string `json:"id,omitempty"`
	// The unique identifier of the balance webhook setting.
	SettingIds []string `json:"settingIds"`
}

// NewBalanceNotificationData instantiates a new BalanceNotificationData 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 NewBalanceNotificationData(balanceAccountId string, balances Balances, currency string, settingIds []string) *BalanceNotificationData {
	this := BalanceNotificationData{}
	this.BalanceAccountId = balanceAccountId
	this.Balances = balances
	this.Currency = currency
	this.SettingIds = settingIds
	return &this
}

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

// GetBalanceAccountId returns the BalanceAccountId field value
func (o *BalanceNotificationData) GetBalanceAccountId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.BalanceAccountId
}

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

// SetBalanceAccountId sets field value
func (o *BalanceNotificationData) SetBalanceAccountId(v string) {
	o.BalanceAccountId = v
}

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

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

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

	return false
}

// SetBalancePlatform gets a reference to the given string and assigns it to the BalancePlatform field.
func (o *BalanceNotificationData) SetBalancePlatform(v string) {
	o.BalancePlatform = &v
}

// GetBalances returns the Balances field value
func (o *BalanceNotificationData) GetBalances() Balances {
	if o == nil {
		var ret Balances
		return ret
	}

	return o.Balances
}

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

// SetBalances sets field value
func (o *BalanceNotificationData) SetBalances(v Balances) {
	o.Balances = v
}

// GetCreationDate returns the CreationDate field value if set, zero value otherwise.
func (o *BalanceNotificationData) GetCreationDate() time.Time {
	if o == nil || common.IsNil(o.CreationDate) {
		var ret time.Time
		return ret
	}
	return *o.CreationDate
}

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

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

	return false
}

// SetCreationDate gets a reference to the given time.Time and assigns it to the CreationDate field.
func (o *BalanceNotificationData) SetCreationDate(v time.Time) {
	o.CreationDate = &v
}

// GetCurrency returns the Currency field value
func (o *BalanceNotificationData) GetCurrency() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Currency
}

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

// SetCurrency sets field value
func (o *BalanceNotificationData) SetCurrency(v string) {
	o.Currency = v
}

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

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

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

	return false
}

// SetId gets a reference to the given string and assigns it to the Id field.
func (o *BalanceNotificationData) SetId(v string) {
	o.Id = &v
}

// GetSettingIds returns the SettingIds field value
func (o *BalanceNotificationData) GetSettingIds() []string {
	if o == nil {
		var ret []string
		return ret
	}

	return o.SettingIds
}

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

// SetSettingIds sets field value
func (o *BalanceNotificationData) SetSettingIds(v []string) {
	o.SettingIds = v
}

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

func (o BalanceNotificationData) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["balanceAccountId"] = o.BalanceAccountId
	if !common.IsNil(o.BalancePlatform) {
		toSerialize["balancePlatform"] = o.BalancePlatform
	}
	toSerialize["balances"] = o.Balances
	if !common.IsNil(o.CreationDate) {
		toSerialize["creationDate"] = o.CreationDate
	}
	toSerialize["currency"] = o.Currency
	if !common.IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	toSerialize["settingIds"] = o.SettingIds
	return toSerialize, nil
}

type NullableBalanceNotificationData struct {
	value *BalanceNotificationData
	isSet bool
}

func (v NullableBalanceNotificationData) Get() *BalanceNotificationData {
	return v.value
}

func (v *NullableBalanceNotificationData) Set(val *BalanceNotificationData) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableBalanceNotificationData(val *BalanceNotificationData) *NullableBalanceNotificationData {
	return &NullableBalanceNotificationData{value: val, isSet: true}
}

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

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