# coding: utf-8

"""
    Zarban Wallet API

    API for Zarban wallet 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.wallet.openapi_client.configuration import Configuration


class WithdrawRequest(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 = {
        'id': 'int',
        'time_created': 'Timestamp',
        'network': 'Network',
        'symbol': 'Symbol',
        'amount': 'str',
        'to': 'str',
        'comment': 'str',
        'status': 'str',
        'block_explorer_url': 'str'
    }

    attribute_map = {
        'id': 'id',
        'time_created': 'timeCreated',
        'network': 'network',
        'symbol': 'symbol',
        'amount': 'amount',
        'to': 'to',
        'comment': 'comment',
        'status': 'status',
        'block_explorer_url': 'blockExplorerUrl'
    }

    def __init__(self, id=None, time_created=None, network=None, symbol=None, amount=None, to=None, comment=None, status=None, block_explorer_url=None, local_vars_configuration=None):  # noqa: E501
        """WithdrawRequest - 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._id = None
        self._time_created = None
        self._network = None
        self._symbol = None
        self._amount = None
        self._to = None
        self._comment = None
        self._status = None
        self._block_explorer_url = None
        self.discriminator = None

        self.id = id
        self.time_created = time_created
        self.network = network
        self.symbol = symbol
        self.amount = amount
        self.to = to
        self.comment = comment
        self.status = status
        self.block_explorer_url = block_explorer_url

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


        :return: The id of this WithdrawRequest.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this WithdrawRequest.


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

        self._id = id

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


        :return: The time_created of this WithdrawRequest.  # noqa: E501
        :rtype: Timestamp
        """
        return self._time_created

    @time_created.setter
    def time_created(self, time_created):
        """Sets the time_created of this WithdrawRequest.


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

        self._time_created = time_created

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


        :return: The network of this WithdrawRequest.  # noqa: E501
        :rtype: Network
        """
        return self._network

    @network.setter
    def network(self, network):
        """Sets the network of this WithdrawRequest.


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

        self._network = network

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


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

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


        :param symbol: The symbol of this WithdrawRequest.  # 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 amount(self):
        """Gets the amount of this WithdrawRequest.  # noqa: E501


        :return: The amount of this WithdrawRequest.  # noqa: E501
        :rtype: str
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this WithdrawRequest.


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

        self._amount = amount

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


        :return: The to of this WithdrawRequest.  # noqa: E501
        :rtype: str
        """
        return self._to

    @to.setter
    def to(self, to):
        """Sets the to of this WithdrawRequest.


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

        self._to = to

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


        :return: The comment of this WithdrawRequest.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this WithdrawRequest.


        :param comment: The comment of this WithdrawRequest.  # noqa: E501
        :type: str
        """

        self._comment = comment

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


        :return: The status of this WithdrawRequest.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this WithdrawRequest.


        :param status: The status of this WithdrawRequest.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and status is None:  # noqa: E501
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501
        allowed_values = ["Pending", "Canceled", "Approved", "Rejected", "Proccessing", "Failed", "Sent", "AccountDebited", "AccountBalanceUnlocked", "Completed"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The block_explorer_url of this WithdrawRequest.  # noqa: E501
        :rtype: str
        """
        return self._block_explorer_url

    @block_explorer_url.setter
    def block_explorer_url(self, block_explorer_url):
        """Sets the block_explorer_url of this WithdrawRequest.


        :param block_explorer_url: The block_explorer_url of this WithdrawRequest.  # noqa: E501
        :type: str
        """

        self._block_explorer_url = block_explorer_url

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

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