# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

    OpenAPI spec version: 4.11.5
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class AccountStatus(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 = {
        'balance': 'BigDecimal',
        'credit_limit': 'BigDecimal',
        'upper_credit_limit': 'BigDecimal',
        'reserved_amount': 'BigDecimal',
        'available_balance': 'BigDecimal',
        'negative_since': 'datetime',
        'a_rate': 'BigDecimal',
        'd_rate': 'BigDecimal',
        'rate_balance_correction': 'BigDecimal',
        'virtual_rated_balance': 'BigDecimal'
    }

    attribute_map = {
        'balance': 'balance',
        'credit_limit': 'creditLimit',
        'upper_credit_limit': 'upperCreditLimit',
        'reserved_amount': 'reservedAmount',
        'available_balance': 'availableBalance',
        'negative_since': 'negativeSince',
        'a_rate': 'aRate',
        'd_rate': 'dRate',
        'rate_balance_correction': 'rateBalanceCorrection',
        'virtual_rated_balance': 'virtualRatedBalance'
    }

    def __init__(self, balance=None, credit_limit=None, upper_credit_limit=None, reserved_amount=None, available_balance=None, negative_since=None, a_rate=None, d_rate=None, rate_balance_correction=None, virtual_rated_balance=None, _configuration=None):  # noqa: E501
        """AccountStatus - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._balance = None
        self._credit_limit = None
        self._upper_credit_limit = None
        self._reserved_amount = None
        self._available_balance = None
        self._negative_since = None
        self._a_rate = None
        self._d_rate = None
        self._rate_balance_correction = None
        self._virtual_rated_balance = None
        self.discriminator = None

        if balance is not None:
            self.balance = balance
        if credit_limit is not None:
            self.credit_limit = credit_limit
        if upper_credit_limit is not None:
            self.upper_credit_limit = upper_credit_limit
        if reserved_amount is not None:
            self.reserved_amount = reserved_amount
        if available_balance is not None:
            self.available_balance = available_balance
        if negative_since is not None:
            self.negative_since = negative_since
        if a_rate is not None:
            self.a_rate = a_rate
        if d_rate is not None:
            self.d_rate = d_rate
        if rate_balance_correction is not None:
            self.rate_balance_correction = rate_balance_correction
        if virtual_rated_balance is not None:
            self.virtual_rated_balance = virtual_rated_balance

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

        The raw account balance  # noqa: E501

        :return: The balance of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._balance

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

        The raw account balance  # noqa: E501

        :param balance: The balance of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._balance = balance

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

        The maximum negative balance an account may get  # noqa: E501

        :return: The credit_limit of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._credit_limit

    @credit_limit.setter
    def credit_limit(self, credit_limit):
        """Sets the credit_limit of this AccountStatus.

        The maximum negative balance an account may get  # noqa: E501

        :param credit_limit: The credit_limit of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._credit_limit = credit_limit

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

        The maximum positive balance an account may get  # noqa: E501

        :return: The upper_credit_limit of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._upper_credit_limit

    @upper_credit_limit.setter
    def upper_credit_limit(self, upper_credit_limit):
        """Sets the upper_credit_limit of this AccountStatus.

        The maximum positive balance an account may get  # noqa: E501

        :param upper_credit_limit: The upper_credit_limit of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._upper_credit_limit = upper_credit_limit

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

        The reserved amount is part of the raw balance, but cannot be used for payments because of some other events, like payments pending authorization, confirmed webshop orders, scheduled payments (when configured to reserve the total amount) and so on.   # noqa: E501

        :return: The reserved_amount of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._reserved_amount

    @reserved_amount.setter
    def reserved_amount(self, reserved_amount):
        """Sets the reserved_amount of this AccountStatus.

        The reserved amount is part of the raw balance, but cannot be used for payments because of some other events, like payments pending authorization, confirmed webshop orders, scheduled payments (when configured to reserve the total amount) and so on.   # noqa: E501

        :param reserved_amount: The reserved_amount of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._reserved_amount = reserved_amount

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

        The available balance to be used, taking into account the raw balance, credit limit and reserved amount    # noqa: E501

        :return: The available_balance of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._available_balance

    @available_balance.setter
    def available_balance(self, available_balance):
        """Sets the available_balance of this AccountStatus.

        The available balance to be used, taking into account the raw balance, credit limit and reserved amount    # noqa: E501

        :param available_balance: The available_balance of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._available_balance = available_balance

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

        If the account is negative, contains the date since it became so    # noqa: E501

        :return: The negative_since of this AccountStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._negative_since

    @negative_since.setter
    def negative_since(self, negative_since):
        """Sets the negative_since of this AccountStatus.

        If the account is negative, contains the date since it became so    # noqa: E501

        :param negative_since: The negative_since of this AccountStatus.  # noqa: E501
        :type: datetime
        """

        self._negative_since = negative_since

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

        The balance aging counter  # noqa: E501

        :return: The a_rate of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._a_rate

    @a_rate.setter
    def a_rate(self, a_rate):
        """Sets the a_rate of this AccountStatus.

        The balance aging counter  # noqa: E501

        :param a_rate: The a_rate of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._a_rate = a_rate

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

        The balance maturity  # noqa: E501

        :return: The d_rate of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._d_rate

    @d_rate.setter
    def d_rate(self, d_rate):
        """Sets the d_rate of this AccountStatus.

        The balance maturity  # noqa: E501

        :param d_rate: The d_rate of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._d_rate = d_rate

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


        :return: The rate_balance_correction of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._rate_balance_correction

    @rate_balance_correction.setter
    def rate_balance_correction(self, rate_balance_correction):
        """Sets the rate_balance_correction of this AccountStatus.


        :param rate_balance_correction: The rate_balance_correction of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._rate_balance_correction = rate_balance_correction

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


        :return: The virtual_rated_balance of this AccountStatus.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._virtual_rated_balance

    @virtual_rated_balance.setter
    def virtual_rated_balance(self, virtual_rated_balance):
        """Sets the virtual_rated_balance of this AccountStatus.


        :param virtual_rated_balance: The virtual_rated_balance of this AccountStatus.  # noqa: E501
        :type: BigDecimal
        """

        self._virtual_rated_balance = virtual_rated_balance

    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(AccountStatus, 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, AccountStatus):
            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, AccountStatus):
            return True

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