# 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.34.0
    Contact: devs@thorchain.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class TCYDistribution(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 = {
        'address': 'str',
        'apr': 'str',
        'distributions': 'list[TCYDistributionItem]',
        'total': 'str'
    }

    attribute_map = {
        'address': 'address',
        'apr': 'apr',
        'distributions': 'distributions',
        'total': 'total'
    }

    def __init__(self, address=None, apr=None, distributions=None, total=None):  # noqa: E501
        """TCYDistribution - a model defined in Swagger"""  # noqa: E501
        self._address = None
        self._apr = None
        self._distributions = None
        self._total = None
        self.discriminator = None
        self.address = address
        self.apr = apr
        self.distributions = distributions
        self.total = total

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

        TCY holder address.  # noqa: E501

        :return: The address of this TCYDistribution.  # noqa: E501
        :rtype: str
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this TCYDistribution.

        TCY holder address.  # noqa: E501

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

        self._address = address

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

        Float, annual percentage rate of the TCY distribution.  # noqa: E501

        :return: The apr of this TCYDistribution.  # noqa: E501
        :rtype: str
        """
        return self._apr

    @apr.setter
    def apr(self, apr):
        """Sets the apr of this TCYDistribution.

        Float, annual percentage rate of the TCY distribution.  # noqa: E501

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

        self._apr = apr

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

        List details of all the TCY distributions.  # noqa: E501

        :return: The distributions of this TCYDistribution.  # noqa: E501
        :rtype: list[TCYDistributionItem]
        """
        return self._distributions

    @distributions.setter
    def distributions(self, distributions):
        """Sets the distributions of this TCYDistribution.

        List details of all the TCY distributions.  # noqa: E501

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

        self._distributions = distributions

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

        Int64(e8), total amount of RUNE distributed to the TCY holder.  # noqa: E501

        :return: The total of this TCYDistribution.  # noqa: E501
        :rtype: str
        """
        return self._total

    @total.setter
    def total(self, total):
        """Sets the total of this TCYDistribution.

        Int64(e8), total amount of RUNE distributed to the TCY holder.  # noqa: E501

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

        self._total = total

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

        return self.__dict__ == other.__dict__

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