# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class Transfer(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 = {
        'display': 'str',
        '_date': 'datetime',
        'amount': 'BigDecimal',
        'type': 'EntityReference',
        'currency': 'Currency',
        '_from': 'AccountWithOwner',
        'to': 'AccountWithOwner',
        'transaction_number': 'str',
        'statuses': 'list[TransferStatus]'
    }

    attribute_map = {
        'display': 'display',
        '_date': 'date',
        'amount': 'amount',
        'type': 'type',
        'currency': 'currency',
        '_from': 'from',
        'to': 'to',
        'transaction_number': 'transactionNumber',
        'statuses': 'statuses'
    }

    def __init__(self, display=None, _date=None, amount=None, type=None, currency=None, _from=None, to=None, transaction_number=None, statuses=None, _configuration=None):  # noqa: E501
        """Transfer - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._display = None
        self.__date = None
        self._amount = None
        self._type = None
        self._currency = None
        self.__from = None
        self._to = None
        self._transaction_number = None
        self._statuses = None
        self.discriminator = None

        if display is not None:
            self.display = display
        if _date is not None:
            self._date = _date
        if amount is not None:
            self.amount = amount
        if type is not None:
            self.type = type
        if currency is not None:
            self.currency = currency
        if _from is not None:
            self._from = _from
        if to is not None:
            self.to = to
        if transaction_number is not None:
            self.transaction_number = transaction_number
        if statuses is not None:
            self.statuses = statuses

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

        The descriptive text for this transfer, according to the transfer type and currency configuration in Cyclos    # noqa: E501

        :return: The display of this Transfer.  # noqa: E501
        :rtype: str
        """
        return self._display

    @display.setter
    def display(self, display):
        """Sets the display of this Transfer.

        The descriptive text for this transfer, according to the transfer type and currency configuration in Cyclos    # noqa: E501

        :param display: The display of this Transfer.  # noqa: E501
        :type: str
        """

        self._display = display

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

        The transfer date and time  # noqa: E501

        :return: The _date of this Transfer.  # noqa: E501
        :rtype: datetime
        """
        return self.__date

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

        The transfer date and time  # noqa: E501

        :param _date: The _date of this Transfer.  # noqa: E501
        :type: datetime
        """

        self.__date = _date

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

        The transfer amount. May be positive or negative.  # noqa: E501

        :return: The amount of this Transfer.  # noqa: E501
        :rtype: BigDecimal
        """
        return self._amount

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

        The transfer amount. May be positive or negative.  # noqa: E501

        :param amount: The amount of this Transfer.  # noqa: E501
        :type: BigDecimal
        """

        self._amount = amount

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

        The transfer type  # noqa: E501

        :return: The type of this Transfer.  # noqa: E501
        :rtype: EntityReference
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Transfer.

        The transfer type  # noqa: E501

        :param type: The type of this Transfer.  # noqa: E501
        :type: EntityReference
        """

        self._type = type

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

        The transfer currency  # noqa: E501

        :return: The currency of this Transfer.  # noqa: E501
        :rtype: Currency
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this Transfer.

        The transfer currency  # noqa: E501

        :param currency: The currency of this Transfer.  # noqa: E501
        :type: Currency
        """

        self._currency = currency

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

        The account that sent the balance  # noqa: E501

        :return: The _from of this Transfer.  # noqa: E501
        :rtype: AccountWithOwner
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this Transfer.

        The account that sent the balance  # noqa: E501

        :param _from: The _from of this Transfer.  # noqa: E501
        :type: AccountWithOwner
        """

        self.__from = _from

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

        The account that received the balance  # noqa: E501

        :return: The to of this Transfer.  # noqa: E501
        :rtype: AccountWithOwner
        """
        return self._to

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

        The account that received the balance  # noqa: E501

        :param to: The to of this Transfer.  # noqa: E501
        :type: AccountWithOwner
        """

        self._to = to

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

        The transaction number identifying this balance transfer. The currency configuration has the definition on whether transaction numbers are enabled and which format they have.   # noqa: E501

        :return: The transaction_number of this Transfer.  # noqa: E501
        :rtype: str
        """
        return self._transaction_number

    @transaction_number.setter
    def transaction_number(self, transaction_number):
        """Sets the transaction_number of this Transfer.

        The transaction number identifying this balance transfer. The currency configuration has the definition on whether transaction numbers are enabled and which format they have.   # noqa: E501

        :param transaction_number: The transaction_number of this Transfer.  # noqa: E501
        :type: str
        """

        self._transaction_number = transaction_number

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

        Contains the current status for each status flow this transfer has   # noqa: E501

        :return: The statuses of this Transfer.  # noqa: E501
        :rtype: list[TransferStatus]
        """
        return self._statuses

    @statuses.setter
    def statuses(self, statuses):
        """Sets the statuses of this Transfer.

        Contains the current status for each status flow this transfer has   # noqa: E501

        :param statuses: The statuses of this Transfer.  # noqa: E501
        :type: list[TransferStatus]
        """

        self._statuses = statuses

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

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