# 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 WithdrawRequestPreview(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 = {
        'address': 'str',
        'network': 'Network',
        'symbol': 'Symbol',
        'amount': 'Currency',
        'fee': 'Currency',
        'balance_after_withdraw': 'Currency'
    }

    attribute_map = {
        'address': 'address',
        'network': 'network',
        'symbol': 'symbol',
        'amount': 'amount',
        'fee': 'fee',
        'balance_after_withdraw': 'balanceAfterWithdraw'
    }

    def __init__(self, address=None, network=None, symbol=None, amount=None, fee=None, balance_after_withdraw=None, local_vars_configuration=None):  # noqa: E501
        """WithdrawRequestPreview - 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._address = None
        self._network = None
        self._symbol = None
        self._amount = None
        self._fee = None
        self._balance_after_withdraw = None
        self.discriminator = None

        self.address = address
        self.network = network
        self.symbol = symbol
        self.amount = amount
        self.fee = fee
        self.balance_after_withdraw = balance_after_withdraw

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

        Withdrawal address  # noqa: E501

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

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

        Withdrawal address  # noqa: E501

        :param address: The address of this WithdrawRequestPreview.  # 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 network(self):
        """Gets the network of this WithdrawRequestPreview.  # noqa: E501


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

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


        :param network: The network of this WithdrawRequestPreview.  # 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 WithdrawRequestPreview.  # noqa: E501


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

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


        :param symbol: The symbol of this WithdrawRequestPreview.  # 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 WithdrawRequestPreview.  # noqa: E501


        :return: The amount of this WithdrawRequestPreview.  # noqa: E501
        :rtype: Currency
        """
        return self._amount

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


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


        :return: The fee of this WithdrawRequestPreview.  # noqa: E501
        :rtype: Currency
        """
        return self._fee

    @fee.setter
    def fee(self, fee):
        """Sets the fee of this WithdrawRequestPreview.


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

        self._fee = fee

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


        :return: The balance_after_withdraw of this WithdrawRequestPreview.  # noqa: E501
        :rtype: Currency
        """
        return self._balance_after_withdraw

    @balance_after_withdraw.setter
    def balance_after_withdraw(self, balance_after_withdraw):
        """Sets the balance_after_withdraw of this WithdrawRequestPreview.


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

        self._balance_after_withdraw = balance_after_withdraw

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

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