# 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 DepthHistoryItem(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 = {
        'asset_depth': 'str',
        'asset_price': 'str',
        'asset_price_usd': 'str',
        'end_time': 'str',
        'liquidity_units': 'str',
        'luvi': 'str',
        'members_count': 'str',
        'rune_depth': 'str',
        'start_time': 'str',
        'synth_supply': 'str',
        'synth_units': 'str',
        'units': 'str'
    }

    attribute_map = {
        'asset_depth': 'assetDepth',
        'asset_price': 'assetPrice',
        'asset_price_usd': 'assetPriceUSD',
        'end_time': 'endTime',
        'liquidity_units': 'liquidityUnits',
        'luvi': 'luvi',
        'members_count': 'membersCount',
        'rune_depth': 'runeDepth',
        'start_time': 'startTime',
        'synth_supply': 'synthSupply',
        'synth_units': 'synthUnits',
        'units': 'units'
    }

    def __init__(self, asset_depth=None, asset_price=None, asset_price_usd=None, end_time=None, liquidity_units=None, luvi=None, members_count=None, rune_depth=None, start_time=None, synth_supply=None, synth_units=None, units=None):  # noqa: E501
        """DepthHistoryItem - a model defined in Swagger"""  # noqa: E501
        self._asset_depth = None
        self._asset_price = None
        self._asset_price_usd = None
        self._end_time = None
        self._liquidity_units = None
        self._luvi = None
        self._members_count = None
        self._rune_depth = None
        self._start_time = None
        self._synth_supply = None
        self._synth_units = None
        self._units = None
        self.discriminator = None
        self.asset_depth = asset_depth
        self.asset_price = asset_price
        self.asset_price_usd = asset_price_usd
        self.end_time = end_time
        self.liquidity_units = liquidity_units
        self.luvi = luvi
        self.members_count = members_count
        self.rune_depth = rune_depth
        self.start_time = start_time
        self.synth_supply = synth_supply
        self.synth_units = synth_units
        self.units = units

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

        Int64(e8), the amount of Asset in the pool at the end of the interval  # noqa: E501

        :return: The asset_depth of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._asset_depth

    @asset_depth.setter
    def asset_depth(self, asset_depth):
        """Sets the asset_depth of this DepthHistoryItem.

        Int64(e8), the amount of Asset in the pool at the end of the interval  # noqa: E501

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

        self._asset_depth = asset_depth

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

        Float, price of asset in rune. I.e. rune amount / asset amount  # noqa: E501

        :return: The asset_price of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._asset_price

    @asset_price.setter
    def asset_price(self, asset_price):
        """Sets the asset_price of this DepthHistoryItem.

        Float, price of asset in rune. I.e. rune amount / asset amount  # noqa: E501

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

        self._asset_price = asset_price

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

        Float, the price of asset in USD (based on the deepest USD pool).  # noqa: E501

        :return: The asset_price_usd of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._asset_price_usd

    @asset_price_usd.setter
    def asset_price_usd(self, asset_price_usd):
        """Sets the asset_price_usd of this DepthHistoryItem.

        Float, the price of asset in USD (based on the deepest USD pool).  # noqa: E501

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

        self._asset_price_usd = asset_price_usd

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

        Int64, The end time of bucket in unix timestamp  # noqa: E501

        :return: The end_time of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._end_time

    @end_time.setter
    def end_time(self, end_time):
        """Sets the end_time of this DepthHistoryItem.

        Int64, The end time of bucket in unix timestamp  # noqa: E501

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

        self._end_time = end_time

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

        Int64, Liquidity Units in the pool at the end of the interval  # noqa: E501

        :return: The liquidity_units of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._liquidity_units

    @liquidity_units.setter
    def liquidity_units(self, liquidity_units):
        """Sets the liquidity_units of this DepthHistoryItem.

        Int64, Liquidity Units in the pool at the end of the interval  # noqa: E501

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

        self._liquidity_units = liquidity_units

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

        Float, The liquidity unit value index. Sqrt(assetDepth * runeDepth)/liquidity units   # noqa: E501

        :return: The luvi of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._luvi

    @luvi.setter
    def luvi(self, luvi):
        """Sets the luvi of this DepthHistoryItem.

        Float, The liquidity unit value index. Sqrt(assetDepth * runeDepth)/liquidity units   # noqa: E501

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

        self._luvi = luvi

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

        Int64, Number of liquidity members in the pool at the end of the interval  # noqa: E501

        :return: The members_count of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._members_count

    @members_count.setter
    def members_count(self, members_count):
        """Sets the members_count of this DepthHistoryItem.

        Int64, Number of liquidity members in the pool at the end of the interval  # noqa: E501

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

        self._members_count = members_count

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

        Int64(e8), the amount of Rune in the pool at the end of the interval  # noqa: E501

        :return: The rune_depth of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._rune_depth

    @rune_depth.setter
    def rune_depth(self, rune_depth):
        """Sets the rune_depth of this DepthHistoryItem.

        Int64(e8), the amount of Rune in the pool at the end of the interval  # noqa: E501

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

        self._rune_depth = rune_depth

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

        Int64, The beginning time of bucket in unix timestamp  # noqa: E501

        :return: The start_time of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this DepthHistoryItem.

        Int64, The beginning time of bucket in unix timestamp  # noqa: E501

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

        self._start_time = start_time

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

        Int64, Synth supply in the pool at the end of the interval  # noqa: E501

        :return: The synth_supply of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._synth_supply

    @synth_supply.setter
    def synth_supply(self, synth_supply):
        """Sets the synth_supply of this DepthHistoryItem.

        Int64, Synth supply in the pool at the end of the interval  # noqa: E501

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

        self._synth_supply = synth_supply

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

        Int64, Synth Units in the pool at the end of the interval  # noqa: E501

        :return: The synth_units of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._synth_units

    @synth_units.setter
    def synth_units(self, synth_units):
        """Sets the synth_units of this DepthHistoryItem.

        Int64, Synth Units in the pool at the end of the interval  # noqa: E501

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

        self._synth_units = synth_units

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

        Int64, Total Units (synthUnits + liquidityUnits) in the pool at the end of the interval   # noqa: E501

        :return: The units of this DepthHistoryItem.  # noqa: E501
        :rtype: str
        """
        return self._units

    @units.setter
    def units(self, units):
        """Sets the units of this DepthHistoryItem.

        Int64, Total Units (synthUnits + liquidityUnits) in the pool at the end of the interval   # noqa: E501

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

        self._units = units

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

        return self.__dict__ == other.__dict__

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