# coding: utf-8

"""
    BTCPay Greenfield API

    A full API to use your BTCPay Server  # noqa: E501

    OpenAPI spec version: v1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class PayoutData(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 = {
        'id': 'str',
        'revision': 'int',
        'pull_payment_id': 'str',
        '_date': 'str',
        'destination': 'str',
        'amount': 'str',
        'payment_method': 'str',
        'crypto_code': 'str',
        'payment_method_amount': 'str',
        'state': 'str'
    }

    attribute_map = {
        'id': 'id',
        'revision': 'revision',
        'pull_payment_id': 'pullPaymentId',
        '_date': 'date',
        'destination': 'destination',
        'amount': 'amount',
        'payment_method': 'paymentMethod',
        'crypto_code': 'cryptoCode',
        'payment_method_amount': 'paymentMethodAmount',
        'state': 'state'
    }

    def __init__(self, id=None, revision=None, pull_payment_id=None, _date=None, destination=None, amount=None, payment_method=None, crypto_code=None, payment_method_amount=None, state=None):  # noqa: E501
        """PayoutData - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._revision = None
        self._pull_payment_id = None
        self.__date = None
        self._destination = None
        self._amount = None
        self._payment_method = None
        self._crypto_code = None
        self._payment_method_amount = None
        self._state = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if revision is not None:
            self.revision = revision
        if pull_payment_id is not None:
            self.pull_payment_id = pull_payment_id
        if _date is not None:
            self._date = _date
        if destination is not None:
            self.destination = destination
        if amount is not None:
            self.amount = amount
        if payment_method is not None:
            self.payment_method = payment_method
        if crypto_code is not None:
            self.crypto_code = crypto_code
        if payment_method_amount is not None:
            self.payment_method_amount = payment_method_amount
        if state is not None:
            self.state = state

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

        The id of the payout  # noqa: E501

        :return: The id of this PayoutData.  # noqa: E501
        :rtype: str
        """
        return self._id

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

        The id of the payout  # noqa: E501

        :param id: The id of this PayoutData.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The revision number of the payout. This revision number is incremented when the payout amount or destination is modified before the approval.  # noqa: E501

        :return: The revision of this PayoutData.  # noqa: E501
        :rtype: int
        """
        return self._revision

    @revision.setter
    def revision(self, revision):
        """Sets the revision of this PayoutData.

        The revision number of the payout. This revision number is incremented when the payout amount or destination is modified before the approval.  # noqa: E501

        :param revision: The revision of this PayoutData.  # noqa: E501
        :type: int
        """

        self._revision = revision

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

        The id of the pull payment this payout belongs to  # noqa: E501

        :return: The pull_payment_id of this PayoutData.  # noqa: E501
        :rtype: str
        """
        return self._pull_payment_id

    @pull_payment_id.setter
    def pull_payment_id(self, pull_payment_id):
        """Sets the pull_payment_id of this PayoutData.

        The id of the pull payment this payout belongs to  # noqa: E501

        :param pull_payment_id: The pull_payment_id of this PayoutData.  # noqa: E501
        :type: str
        """

        self._pull_payment_id = pull_payment_id

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

        The creation date of the payout as a unix timestamp  # noqa: E501

        :return: The _date of this PayoutData.  # noqa: E501
        :rtype: str
        """
        return self.__date

    @_date.setter
    def _date(self, _date):
        """Sets the _date of this PayoutData.

        The creation date of the payout as a unix timestamp  # noqa: E501

        :param _date: The _date of this PayoutData.  # noqa: E501
        :type: str
        """

        self.__date = _date

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

        The destination of the payout (can be an address or a BIP21 url)  # noqa: E501

        :return: The destination of this PayoutData.  # noqa: E501
        :rtype: str
        """
        return self._destination

    @destination.setter
    def destination(self, destination):
        """Sets the destination of this PayoutData.

        The destination of the payout (can be an address or a BIP21 url)  # noqa: E501

        :param destination: The destination of this PayoutData.  # noqa: E501
        :type: str
        """

        self._destination = destination

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

        The amount of the payout in the currency of the pull payment (eg. USD).  # noqa: E501

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

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

        The amount of the payout in the currency of the pull payment (eg. USD).  # noqa: E501

        :param amount: The amount of this PayoutData.  # noqa: E501
        :type: str
        """

        self._amount = amount

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

        The payment method of the payout (e.g., \"BTC\" or \"BTC_LightningLike\"  # noqa: E501

        :return: The payment_method of this PayoutData.  # noqa: E501
        :rtype: str
        """
        return self._payment_method

    @payment_method.setter
    def payment_method(self, payment_method):
        """Sets the payment_method of this PayoutData.

        The payment method of the payout (e.g., \"BTC\" or \"BTC_LightningLike\"  # noqa: E501

        :param payment_method: The payment_method of this PayoutData.  # noqa: E501
        :type: str
        """

        self._payment_method = payment_method

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

        Crypto code of the payment method of the payout (e.g., \"BTC\" or \"LTC\")  # noqa: E501

        :return: The crypto_code of this PayoutData.  # noqa: E501
        :rtype: str
        """
        return self._crypto_code

    @crypto_code.setter
    def crypto_code(self, crypto_code):
        """Sets the crypto_code of this PayoutData.

        Crypto code of the payment method of the payout (e.g., \"BTC\" or \"LTC\")  # noqa: E501

        :param crypto_code: The crypto_code of this PayoutData.  # noqa: E501
        :type: str
        """

        self._crypto_code = crypto_code

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

        The amount of the payout in the currency of the payment method (eg. BTC). This is only available from the `AwaitingPayment` state.  # noqa: E501

        :return: The payment_method_amount of this PayoutData.  # noqa: E501
        :rtype: str
        """
        return self._payment_method_amount

    @payment_method_amount.setter
    def payment_method_amount(self, payment_method_amount):
        """Sets the payment_method_amount of this PayoutData.

        The amount of the payout in the currency of the payment method (eg. BTC). This is only available from the `AwaitingPayment` state.  # noqa: E501

        :param payment_method_amount: The payment_method_amount of this PayoutData.  # noqa: E501
        :type: str
        """

        self._payment_method_amount = payment_method_amount

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

        The state of the payout (`AwaitingApproval`, `AwaitingPayment`, `InProgress`, `Completed`, `Cancelled`)  # noqa: E501

        :return: The state of this PayoutData.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this PayoutData.

        The state of the payout (`AwaitingApproval`, `AwaitingPayment`, `InProgress`, `Completed`, `Cancelled`)  # noqa: E501

        :param state: The state of this PayoutData.  # noqa: E501
        :type: str
        """
        allowed_values = ["AwaitingApproval", "AwaitingPayment", "InProgress", "Completed", "Cancelled"]  # noqa: E501
        if state not in allowed_values:
            raise ValueError(
                "Invalid value for `state` ({0}), must be one of {1}"  # noqa: E501
                .format(state, allowed_values)
            )

        self._state = state

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

        return self.__dict__ == other.__dict__

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