# coding: utf-8

"""
    Salt Edge Account Information API

    API Reference for services  # noqa: E501

    OpenAPI spec version: 5.0.0
    Contact: support@saltedge.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Account(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 = {
        'id': 'str',
        'name': 'str',
        'nature': 'str',
        'balance': 'float',
        'currency_code': 'str',
        'extra': 'AccountExtra',
        'connection_id': 'str',
        'created_at': 'datetime',
        'updated_at': 'datetime'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'nature': 'nature',
        'balance': 'balance',
        'currency_code': 'currency_code',
        'extra': 'extra',
        'connection_id': 'connection_id',
        'created_at': 'created_at',
        'updated_at': 'updated_at'
    }

    def __init__(self, id=None, name=None, nature=None, balance=None, currency_code=None, extra=None, connection_id=None, created_at=None, updated_at=None):  # noqa: E501
        """Account - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._nature = None
        self._balance = None
        self._currency_code = None
        self._extra = None
        self._connection_id = None
        self._created_at = None
        self._updated_at = None
        self.discriminator = None
        self.id = id
        self.name = name
        self.nature = nature
        self.balance = balance
        self.currency_code = currency_code
        self.extra = extra
        self.connection_id = connection_id
        self.created_at = created_at
        self.updated_at = updated_at

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

        the `id` of the account  # noqa: E501

        :return: The id of this Account.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Account.

        the `id` of the account  # noqa: E501

        :param id: The id of this Account.  # noqa: E501
        :type: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        the unique name of the account  <strong>Note:</strong> The name directly identifies the account. In case the account’s name has changed (in the bank’s WEB/API interface, through code changes, etc.) a new account will be created.   # noqa: E501

        :return: The name of this Account.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Account.

        the unique name of the account  <strong>Note:</strong> The name directly identifies the account. In case the account’s name has changed (in the bank’s WEB/API interface, through code changes, etc.) a new account will be created.   # noqa: E501

        :param name: The name of this Account.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        the type of the account  <strong>Note:</strong> for `credit_card` nature, the balance represents the sum of all negative transactions, the positive ones do not count.   # noqa: E501

        :return: The nature of this Account.  # noqa: E501
        :rtype: str
        """
        return self._nature

    @nature.setter
    def nature(self, nature):
        """Sets the nature of this Account.

        the type of the account  <strong>Note:</strong> for `credit_card` nature, the balance represents the sum of all negative transactions, the positive ones do not count.   # noqa: E501

        :param nature: The nature of this Account.  # noqa: E501
        :type: str
        """
        if nature is None:
            raise ValueError("Invalid value for `nature`, must not be `None`")  # noqa: E501
        allowed_values = ["account", "bonus", "card", "checking", "credit", "credit_card", "debit_card", "ewallet", "insurance", "investment", "loan", "mortgage", "savings"]  # noqa: E501
        if nature not in allowed_values:
            raise ValueError(
                "Invalid value for `nature` ({0}), must be one of {1}"  # noqa: E501
                .format(nature, allowed_values)
            )

        self._nature = nature

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

        the account's current balance  # noqa: E501

        :return: The balance of this Account.  # noqa: E501
        :rtype: float
        """
        return self._balance

    @balance.setter
    def balance(self, balance):
        """Sets the balance of this Account.

        the account's current balance  # noqa: E501

        :param balance: The balance of this Account.  # noqa: E501
        :type: float
        """
        if balance is None:
            raise ValueError("Invalid value for `balance`, must not be `None`")  # noqa: E501

        self._balance = balance

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

        one of the possible values for [currency codes](#currencies). Maximum 3 letters.  <strong>Note:</strong> The currency directly identifies the account. In case the account’s currency code has changed (in the bank’s WEB/API interface, through code changes, etc.) a new account will be created.   # noqa: E501

        :return: The currency_code of this Account.  # noqa: E501
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """Sets the currency_code of this Account.

        one of the possible values for [currency codes](#currencies). Maximum 3 letters.  <strong>Note:</strong> The currency directly identifies the account. In case the account’s currency code has changed (in the bank’s WEB/API interface, through code changes, etc.) a new account will be created.   # noqa: E501

        :param currency_code: The currency_code of this Account.  # noqa: E501
        :type: str
        """
        if currency_code is None:
            raise ValueError("Invalid value for `currency_code`, must not be `None`")  # noqa: E501

        self._currency_code = currency_code

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


        :return: The extra of this Account.  # noqa: E501
        :rtype: AccountExtra
        """
        return self._extra

    @extra.setter
    def extra(self, extra):
        """Sets the extra of this Account.


        :param extra: The extra of this Account.  # noqa: E501
        :type: AccountExtra
        """
        if extra is None:
            raise ValueError("Invalid value for `extra`, must not be `None`")  # noqa: E501

        self._extra = extra

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

        the `id` of the connection the account belongs to  # noqa: E501

        :return: The connection_id of this Account.  # noqa: E501
        :rtype: str
        """
        return self._connection_id

    @connection_id.setter
    def connection_id(self, connection_id):
        """Sets the connection_id of this Account.

        the `id` of the connection the account belongs to  # noqa: E501

        :param connection_id: The connection_id of this Account.  # noqa: E501
        :type: str
        """
        if connection_id is None:
            raise ValueError("Invalid value for `connection_id`, must not be `None`")  # noqa: E501

        self._connection_id = connection_id

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

        time and date when the account was imported  # noqa: E501

        :return: The created_at of this Account.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Account.

        time and date when the account was imported  # noqa: E501

        :param created_at: The created_at of this Account.  # noqa: E501
        :type: datetime
        """
        if created_at is None:
            raise ValueError("Invalid value for `created_at`, must not be `None`")  # noqa: E501

        self._created_at = created_at

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

        the last time when the account's balance was changed or new transactions were imported  # noqa: E501

        :return: The updated_at of this Account.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this Account.

        the last time when the account's balance was changed or new transactions were imported  # noqa: E501

        :param updated_at: The updated_at of this Account.  # noqa: E501
        :type: datetime
        """
        if updated_at is None:
            raise ValueError("Invalid value for `updated_at`, must not be `None`")  # noqa: E501

        self._updated_at = updated_at

    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(Account, 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, Account):
            return False

        return self.__dict__ == other.__dict__

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