# coding: utf-8

"""
    The Selling Partner API for Amazon Seller Wallet Open Banking API Spec.  For more information, refer to the [Seller Wallet Open Banking API Use Case Guide](doc:seller-wallet-open-banking-api-v2024-03-01-use-case-guide).

    The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.

    The version of the OpenAPI document: 2024-03-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class Balance(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'account_id': 'str',
        'balance_type': 'BalanceType',
        'balance_amount': 'float',
        'balance_currency': 'str',
        'last_update_date': 'datetime',
    }

    attribute_map = {
        'account_id': 'accountId',
        'balance_type': 'balanceType',
        'balance_amount': 'balanceAmount',
        'balance_currency': 'balanceCurrency',
        'last_update_date': 'lastUpdateDate',
    }

    def __init__(self, account_id=None, balance_type=None, balance_amount=None, balance_currency=None, last_update_date=None, _configuration=None):  # noqa: E501
        """Balance - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._account_id = None
        self._balance_type = None
        self._balance_amount = None
        self._balance_currency = None
        self._last_update_date = None
        self.discriminator = None

        self.account_id = account_id
        if balance_type is not None:
            self.balance_type = balance_type
        self.balance_amount = balance_amount
        self.balance_currency = balance_currency
        self.last_update_date = last_update_date

    @property
    def account_id(self):
        """Gets the account_id of this Balance.  # noqa: E501

        The unique identifier provided by Amazon to identify the account   # noqa: E501

        :return: The account_id of this Balance.  # noqa: E501
        :rtype: str
        """
        return self._account_id

    @account_id.setter
    def account_id(self, account_id):
        """Sets the account_id of this Balance.

        The unique identifier provided by Amazon to identify the account   # noqa: E501

        :param account_id: The account_id of this Balance.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and account_id is None:
            raise ValueError("Invalid value for `account_id`, must not be `None`")  # noqa: E501

        self._account_id = account_id

    @property
    def balance_type(self):
        """Gets the balance_type of this Balance.  # noqa: E501


        :return: The balance_type of this Balance.  # noqa: E501
        :rtype: BalanceType
        """
        return self._balance_type

    @balance_type.setter
    def balance_type(self, balance_type):
        """Sets the balance_type of this Balance.


        :param balance_type: The balance_type of this Balance.  # noqa: E501
        :type: BalanceType
        """

        self._balance_type = balance_type

    @property
    def balance_amount(self):
        """Gets the balance_amount of this Balance.  # noqa: E501

        A decimal number such as amount or FX rate.  # noqa: E501

        :return: The balance_amount of this Balance.  # noqa: E501
        :rtype: float
        """
        return self._balance_amount

    @balance_amount.setter
    def balance_amount(self, balance_amount):
        """Sets the balance_amount of this Balance.

        A decimal number such as amount or FX rate.  # noqa: E501

        :param balance_amount: The balance_amount of this Balance.  # noqa: E501
        :type: float
        """
        if self._configuration.client_side_validation and balance_amount is None:
            raise ValueError("Invalid value for `balance_amount`, must not be `None`")  # noqa: E501

        self._balance_amount = balance_amount

    @property
    def balance_currency(self):
        """Gets the balance_currency of this Balance.  # noqa: E501

        The Amazon SW bank account currency code in ISO 4217 format   # noqa: E501

        :return: The balance_currency of this Balance.  # noqa: E501
        :rtype: str
        """
        return self._balance_currency

    @balance_currency.setter
    def balance_currency(self, balance_currency):
        """Sets the balance_currency of this Balance.

        The Amazon SW bank account currency code in ISO 4217 format   # noqa: E501

        :param balance_currency: The balance_currency of this Balance.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and balance_currency is None:
            raise ValueError("Invalid value for `balance_currency`, must not be `None`")  # noqa: E501

        self._balance_currency = balance_currency

    @property
    def last_update_date(self):
        """Gets the last_update_date of this Balance.  # noqa: E501

        The last update date on the account balance   # noqa: E501

        :return: The last_update_date of this Balance.  # noqa: E501
        :rtype: datetime
        """
        return self._last_update_date

    @last_update_date.setter
    def last_update_date(self, last_update_date):
        """Sets the last_update_date of this Balance.

        The last update date on the account balance   # noqa: E501

        :param last_update_date: The last_update_date of this Balance.  # noqa: E501
        :type: datetime
        """
        if self._configuration.client_side_validation and last_update_date is None:
            raise ValueError("Invalid value for `last_update_date`, must not be `None`")  # noqa: E501

        self._last_update_date = last_update_date

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(Balance, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, Balance):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, Balance):
            return True

        return self.to_dict() != other.to_dict()
