# coding: utf-8

"""
    Midgard Public API

    The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses transaction event data from THORChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with THORChain protocol, users should query THORNode directly.  # noqa: E501

    OpenAPI spec version: 2.20.1
    Contact: devs@thorchain.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class BorrowerPool(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 = {
        'collateral_asset': 'str',
        'collateral_deposited': 'str',
        'collateral_withdrawn': 'str',
        'debt_issued_tor': 'str',
        'debt_repaid_tor': 'str',
        'last_open_loan_timestamp': 'str',
        'last_repay_loan_timestamp': 'str',
        'target_assets': 'list[str]'
    }

    attribute_map = {
        'collateral_asset': 'collateral_asset',
        'collateral_deposited': 'collateral_deposited',
        'collateral_withdrawn': 'collateral_withdrawn',
        'debt_issued_tor': 'debt_issued_tor',
        'debt_repaid_tor': 'debt_repaid_tor',
        'last_open_loan_timestamp': 'last_open_loan_timestamp',
        'last_repay_loan_timestamp': 'last_repay_loan_timestamp',
        'target_assets': 'target_assets'
    }

    def __init__(self, collateral_asset=None, collateral_deposited=None, collateral_withdrawn=None, debt_issued_tor=None, debt_repaid_tor=None, last_open_loan_timestamp=None, last_repay_loan_timestamp=None, target_assets=None):  # noqa: E501
        """BorrowerPool - a model defined in Swagger"""  # noqa: E501
        self._collateral_asset = None
        self._collateral_deposited = None
        self._collateral_withdrawn = None
        self._debt_issued_tor = None
        self._debt_repaid_tor = None
        self._last_open_loan_timestamp = None
        self._last_repay_loan_timestamp = None
        self._target_assets = None
        self.discriminator = None
        self.collateral_asset = collateral_asset
        self.collateral_deposited = collateral_deposited
        self.collateral_withdrawn = collateral_withdrawn
        self.debt_issued_tor = debt_issued_tor
        self.debt_repaid_tor = debt_repaid_tor
        self.last_open_loan_timestamp = last_open_loan_timestamp
        self.last_repay_loan_timestamp = last_repay_loan_timestamp
        self.target_assets = target_assets

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

        The asset that the borrower used as collateral  # noqa: E501

        :return: The collateral_asset of this BorrowerPool.  # noqa: E501
        :rtype: str
        """
        return self._collateral_asset

    @collateral_asset.setter
    def collateral_asset(self, collateral_asset):
        """Sets the collateral_asset of this BorrowerPool.

        The asset that the borrower used as collateral  # noqa: E501

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

        self._collateral_asset = collateral_asset

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

        Int64(e8), The total amount of collateral that user deposited  # noqa: E501

        :return: The collateral_deposited of this BorrowerPool.  # noqa: E501
        :rtype: str
        """
        return self._collateral_deposited

    @collateral_deposited.setter
    def collateral_deposited(self, collateral_deposited):
        """Sets the collateral_deposited of this BorrowerPool.

        Int64(e8), The total amount of collateral that user deposited  # noqa: E501

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

        self._collateral_deposited = collateral_deposited

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

        Int64(e8), The total amount of collateral the system paid back to the user  # noqa: E501

        :return: The collateral_withdrawn of this BorrowerPool.  # noqa: E501
        :rtype: str
        """
        return self._collateral_withdrawn

    @collateral_withdrawn.setter
    def collateral_withdrawn(self, collateral_withdrawn):
        """Sets the collateral_withdrawn of this BorrowerPool.

        Int64(e8), The total amount of collateral the system paid back to the user  # noqa: E501

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

        self._collateral_withdrawn = collateral_withdrawn

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

        Int64(e8), The total amount of debt issued as debt for user. denominated in TOR.  # noqa: E501

        :return: The debt_issued_tor of this BorrowerPool.  # noqa: E501
        :rtype: str
        """
        return self._debt_issued_tor

    @debt_issued_tor.setter
    def debt_issued_tor(self, debt_issued_tor):
        """Sets the debt_issued_tor of this BorrowerPool.

        Int64(e8), The total amount of debt issued as debt for user. denominated in TOR.  # noqa: E501

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

        self._debt_issued_tor = debt_issued_tor

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

        Int64(e8), The total amount of debt that the user paid back. denominated in TOR.  # noqa: E501

        :return: The debt_repaid_tor of this BorrowerPool.  # noqa: E501
        :rtype: str
        """
        return self._debt_repaid_tor

    @debt_repaid_tor.setter
    def debt_repaid_tor(self, debt_repaid_tor):
        """Sets the debt_repaid_tor of this BorrowerPool.

        Int64(e8), The total amount of debt that the user paid back. denominated in TOR.  # noqa: E501

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

        self._debt_repaid_tor = debt_repaid_tor

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

        Int64, Unix timestamp for the last time borrower opened a loan  # noqa: E501

        :return: The last_open_loan_timestamp of this BorrowerPool.  # noqa: E501
        :rtype: str
        """
        return self._last_open_loan_timestamp

    @last_open_loan_timestamp.setter
    def last_open_loan_timestamp(self, last_open_loan_timestamp):
        """Sets the last_open_loan_timestamp of this BorrowerPool.

        Int64, Unix timestamp for the last time borrower opened a loan  # noqa: E501

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

        self._last_open_loan_timestamp = last_open_loan_timestamp

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

        Int64, Unix timestamp for the last time borrower repayment occurred  # noqa: E501

        :return: The last_repay_loan_timestamp of this BorrowerPool.  # noqa: E501
        :rtype: str
        """
        return self._last_repay_loan_timestamp

    @last_repay_loan_timestamp.setter
    def last_repay_loan_timestamp(self, last_repay_loan_timestamp):
        """Sets the last_repay_loan_timestamp of this BorrowerPool.

        Int64, Unix timestamp for the last time borrower repayment occurred  # noqa: E501

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

        self._last_repay_loan_timestamp = last_repay_loan_timestamp

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


        :return: The target_assets of this BorrowerPool.  # noqa: E501
        :rtype: list[str]
        """
        return self._target_assets

    @target_assets.setter
    def target_assets(self, target_assets):
        """Sets the target_assets of this BorrowerPool.


        :param target_assets: The target_assets of this BorrowerPool.  # noqa: E501
        :type: list[str]
        """
        if target_assets is None:
            raise ValueError("Invalid value for `target_assets`, must not be `None`")  # noqa: E501

        self._target_assets = target_assets

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

        return self.__dict__ == other.__dict__

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