# 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 TradeResultData(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 = {
        'from_asset': 'str',
        'to_asset': 'str',
        'ledger_entries': 'list[LedgerEntryData]',
        'trade_id': 'str',
        'account_id': 'str',
        'custodian_code': 'str'
    }

    attribute_map = {
        'from_asset': 'fromAsset',
        'to_asset': 'toAsset',
        'ledger_entries': 'ledgerEntries',
        'trade_id': 'tradeId',
        'account_id': 'accountId',
        'custodian_code': 'custodianCode'
    }

    def __init__(self, from_asset=None, to_asset=None, ledger_entries=None, trade_id=None, account_id=None, custodian_code=None):  # noqa: E501
        """TradeResultData - a model defined in Swagger"""  # noqa: E501
        self._from_asset = None
        self._to_asset = None
        self._ledger_entries = None
        self._trade_id = None
        self._account_id = None
        self._custodian_code = None
        self.discriminator = None
        if from_asset is not None:
            self.from_asset = from_asset
        if to_asset is not None:
            self.to_asset = to_asset
        if ledger_entries is not None:
            self.ledger_entries = ledger_entries
        if trade_id is not None:
            self.trade_id = trade_id
        if account_id is not None:
            self.account_id = account_id
        if custodian_code is not None:
            self.custodian_code = custodian_code

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

        The asset to trade.  # noqa: E501

        :return: The from_asset of this TradeResultData.  # noqa: E501
        :rtype: str
        """
        return self._from_asset

    @from_asset.setter
    def from_asset(self, from_asset):
        """Sets the from_asset of this TradeResultData.

        The asset to trade.  # noqa: E501

        :param from_asset: The from_asset of this TradeResultData.  # noqa: E501
        :type: str
        """

        self._from_asset = from_asset

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

        The asset you want.  # noqa: E501

        :return: The to_asset of this TradeResultData.  # noqa: E501
        :rtype: str
        """
        return self._to_asset

    @to_asset.setter
    def to_asset(self, to_asset):
        """Sets the to_asset of this TradeResultData.

        The asset you want.  # noqa: E501

        :param to_asset: The to_asset of this TradeResultData.  # noqa: E501
        :type: str
        """

        self._to_asset = to_asset

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

        The asset entries that were changed during the trade. This is an array of at least 2 items with the asset sold and the asset gained. It may also include ledger entries for the costs of the trade and possibly exchange tokens used.  # noqa: E501

        :return: The ledger_entries of this TradeResultData.  # noqa: E501
        :rtype: list[LedgerEntryData]
        """
        return self._ledger_entries

    @ledger_entries.setter
    def ledger_entries(self, ledger_entries):
        """Sets the ledger_entries of this TradeResultData.

        The asset entries that were changed during the trade. This is an array of at least 2 items with the asset sold and the asset gained. It may also include ledger entries for the costs of the trade and possibly exchange tokens used.  # noqa: E501

        :param ledger_entries: The ledger_entries of this TradeResultData.  # noqa: E501
        :type: list[LedgerEntryData]
        """

        self._ledger_entries = ledger_entries

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

        The unique ID of the trade used by the exchange. This ID can be used to get the details of this trade at a later time.  # noqa: E501

        :return: The trade_id of this TradeResultData.  # noqa: E501
        :rtype: str
        """
        return self._trade_id

    @trade_id.setter
    def trade_id(self, trade_id):
        """Sets the trade_id of this TradeResultData.

        The unique ID of the trade used by the exchange. This ID can be used to get the details of this trade at a later time.  # noqa: E501

        :param trade_id: The trade_id of this TradeResultData.  # noqa: E501
        :type: str
        """

        self._trade_id = trade_id

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

        The unique ID of the custodian account used.  # noqa: E501

        :return: The account_id of this TradeResultData.  # noqa: E501
        :rtype: str
        """
        return self._account_id

    @account_id.setter
    def account_id(self, account_id):
        """Sets the account_id of this TradeResultData.

        The unique ID of the custodian account used.  # noqa: E501

        :param account_id: The account_id of this TradeResultData.  # noqa: E501
        :type: str
        """

        self._account_id = account_id

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

        The code of the custodian used.  # noqa: E501

        :return: The custodian_code of this TradeResultData.  # noqa: E501
        :rtype: str
        """
        return self._custodian_code

    @custodian_code.setter
    def custodian_code(self, custodian_code):
        """Sets the custodian_code of this TradeResultData.

        The code of the custodian used.  # noqa: E501

        :param custodian_code: The custodian_code of this TradeResultData.  # noqa: E501
        :type: str
        """

        self._custodian_code = custodian_code

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

        return self.__dict__ == other.__dict__

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