# coding: utf-8

"""
    Zarban API

    API for Zarban services.  # noqa: E501

    The version of the OpenAPI document: 2.0.0
    Contact: info@zarban.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from zarban.service.openapi_client.configuration import Configuration


class Token(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'name': 'str',
        'symbol': 'Symbol',
        'decimals': 'int',
        'address': 'str',
        'logo_uri': 'str',
        'chain_id': 'int',
        'persian_name': 'str'
    }

    attribute_map = {
        'name': 'name',
        'symbol': 'symbol',
        'decimals': 'decimals',
        'address': 'address',
        'logo_uri': 'logoUri',
        'chain_id': 'chainId',
        'persian_name': 'persianName'
    }

    def __init__(self, name=None, symbol=None, decimals=None, address=None, logo_uri=None, chain_id=None, persian_name=None, local_vars_configuration=None):  # noqa: E501
        """Token - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._symbol = None
        self._decimals = None
        self._address = None
        self._logo_uri = None
        self._chain_id = None
        self._persian_name = None
        self.discriminator = None

        self.name = name
        self.symbol = symbol
        self.decimals = decimals
        self.address = address
        self.logo_uri = logo_uri
        self.chain_id = chain_id
        self.persian_name = persian_name

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

        The name of the token.  # noqa: E501

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

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

        The name of the token.  # noqa: E501

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

        self._name = name

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


        :return: The symbol of this Token.  # noqa: E501
        :rtype: Symbol
        """
        return self._symbol

    @symbol.setter
    def symbol(self, symbol):
        """Sets the symbol of this Token.


        :param symbol: The symbol of this Token.  # noqa: E501
        :type: Symbol
        """
        if self.local_vars_configuration.client_side_validation and symbol is None:  # noqa: E501
            raise ValueError("Invalid value for `symbol`, must not be `None`")  # noqa: E501

        self._symbol = symbol

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

        The number of decimals for the token.  # noqa: E501

        :return: The decimals of this Token.  # noqa: E501
        :rtype: int
        """
        return self._decimals

    @decimals.setter
    def decimals(self, decimals):
        """Sets the decimals of this Token.

        The number of decimals for the token.  # noqa: E501

        :param decimals: The decimals of this Token.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and decimals is None:  # noqa: E501
            raise ValueError("Invalid value for `decimals`, must not be `None`")  # noqa: E501

        self._decimals = decimals

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

        The Ethereum address of the token.  # noqa: E501

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

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

        The Ethereum address of the token.  # noqa: E501

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

        self._address = address

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

        The URI of the token's logo.  # noqa: E501

        :return: The logo_uri of this Token.  # noqa: E501
        :rtype: str
        """
        return self._logo_uri

    @logo_uri.setter
    def logo_uri(self, logo_uri):
        """Sets the logo_uri of this Token.

        The URI of the token's logo.  # noqa: E501

        :param logo_uri: The logo_uri of this Token.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and logo_uri is None:  # noqa: E501
            raise ValueError("Invalid value for `logo_uri`, must not be `None`")  # noqa: E501

        self._logo_uri = logo_uri

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

        The chain ID of the token.  # noqa: E501

        :return: The chain_id of this Token.  # noqa: E501
        :rtype: int
        """
        return self._chain_id

    @chain_id.setter
    def chain_id(self, chain_id):
        """Sets the chain_id of this Token.

        The chain ID of the token.  # noqa: E501

        :param chain_id: The chain_id of this Token.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and chain_id is None:  # noqa: E501
            raise ValueError("Invalid value for `chain_id`, must not be `None`")  # noqa: E501

        self._chain_id = chain_id

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

        The Persian name of the token.  # noqa: E501

        :return: The persian_name of this Token.  # noqa: E501
        :rtype: str
        """
        return self._persian_name

    @persian_name.setter
    def persian_name(self, persian_name):
        """Sets the persian_name of this Token.

        The Persian name of the token.  # noqa: E501

        :param persian_name: The persian_name of this Token.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and persian_name is None:  # noqa: E501
            raise ValueError("Invalid value for `persian_name`, must not be `None`")  # noqa: E501

        self._persian_name = persian_name

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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