# coding: utf-8

"""
    OANDA v20 REST API

    The full OANDA v20 REST API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more. To authenticate use the string 'Bearer ' followed by the token which can be obtained at https://www.oanda.com/demo-account/tpa/personal_token  # noqa: E501

    OpenAPI spec version: 3.0.23
    Contact: api@oanda.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from oanda.models.market_order_transaction import MarketOrderTransaction  # noqa: F401,E501
from oanda.models.order_cancel_transaction import OrderCancelTransaction  # noqa: F401,E501
from oanda.models.order_fill_transaction import OrderFillTransaction  # noqa: F401,E501


class InlineResponse20014(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 = {
        'long_order_create_transaction': 'MarketOrderTransaction',
        'long_order_fill_transaction': 'OrderFillTransaction',
        'long_order_cancel_transaction': 'OrderCancelTransaction',
        'short_order_create_transaction': 'MarketOrderTransaction',
        'short_order_fill_transaction': 'OrderFillTransaction',
        'short_order_cancel_transaction': 'OrderCancelTransaction',
        'related_transaction_i_ds': 'list[str]',
        'last_transaction_id': 'str'
    }

    attribute_map = {
        'long_order_create_transaction': 'longOrderCreateTransaction',
        'long_order_fill_transaction': 'longOrderFillTransaction',
        'long_order_cancel_transaction': 'longOrderCancelTransaction',
        'short_order_create_transaction': 'shortOrderCreateTransaction',
        'short_order_fill_transaction': 'shortOrderFillTransaction',
        'short_order_cancel_transaction': 'shortOrderCancelTransaction',
        'related_transaction_i_ds': 'relatedTransactionIDs',
        'last_transaction_id': 'lastTransactionID'
    }

    def __init__(self, long_order_create_transaction=None, long_order_fill_transaction=None, long_order_cancel_transaction=None, short_order_create_transaction=None, short_order_fill_transaction=None, short_order_cancel_transaction=None, related_transaction_i_ds=None, last_transaction_id=None):  # noqa: E501
        """InlineResponse20014 - a model defined in Swagger"""  # noqa: E501

        self._long_order_create_transaction = None
        self._long_order_fill_transaction = None
        self._long_order_cancel_transaction = None
        self._short_order_create_transaction = None
        self._short_order_fill_transaction = None
        self._short_order_cancel_transaction = None
        self._related_transaction_i_ds = None
        self._last_transaction_id = None
        self.discriminator = None

        if long_order_create_transaction is not None:
            self.long_order_create_transaction = long_order_create_transaction
        if long_order_fill_transaction is not None:
            self.long_order_fill_transaction = long_order_fill_transaction
        if long_order_cancel_transaction is not None:
            self.long_order_cancel_transaction = long_order_cancel_transaction
        if short_order_create_transaction is not None:
            self.short_order_create_transaction = short_order_create_transaction
        if short_order_fill_transaction is not None:
            self.short_order_fill_transaction = short_order_fill_transaction
        if short_order_cancel_transaction is not None:
            self.short_order_cancel_transaction = short_order_cancel_transaction
        if related_transaction_i_ds is not None:
            self.related_transaction_i_ds = related_transaction_i_ds
        if last_transaction_id is not None:
            self.last_transaction_id = last_transaction_id

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


        :return: The long_order_create_transaction of this InlineResponse20014.  # noqa: E501
        :rtype: MarketOrderTransaction
        """
        return self._long_order_create_transaction

    @long_order_create_transaction.setter
    def long_order_create_transaction(self, long_order_create_transaction):
        """Sets the long_order_create_transaction of this InlineResponse20014.


        :param long_order_create_transaction: The long_order_create_transaction of this InlineResponse20014.  # noqa: E501
        :type: MarketOrderTransaction
        """

        self._long_order_create_transaction = long_order_create_transaction

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


        :return: The long_order_fill_transaction of this InlineResponse20014.  # noqa: E501
        :rtype: OrderFillTransaction
        """
        return self._long_order_fill_transaction

    @long_order_fill_transaction.setter
    def long_order_fill_transaction(self, long_order_fill_transaction):
        """Sets the long_order_fill_transaction of this InlineResponse20014.


        :param long_order_fill_transaction: The long_order_fill_transaction of this InlineResponse20014.  # noqa: E501
        :type: OrderFillTransaction
        """

        self._long_order_fill_transaction = long_order_fill_transaction

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


        :return: The long_order_cancel_transaction of this InlineResponse20014.  # noqa: E501
        :rtype: OrderCancelTransaction
        """
        return self._long_order_cancel_transaction

    @long_order_cancel_transaction.setter
    def long_order_cancel_transaction(self, long_order_cancel_transaction):
        """Sets the long_order_cancel_transaction of this InlineResponse20014.


        :param long_order_cancel_transaction: The long_order_cancel_transaction of this InlineResponse20014.  # noqa: E501
        :type: OrderCancelTransaction
        """

        self._long_order_cancel_transaction = long_order_cancel_transaction

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


        :return: The short_order_create_transaction of this InlineResponse20014.  # noqa: E501
        :rtype: MarketOrderTransaction
        """
        return self._short_order_create_transaction

    @short_order_create_transaction.setter
    def short_order_create_transaction(self, short_order_create_transaction):
        """Sets the short_order_create_transaction of this InlineResponse20014.


        :param short_order_create_transaction: The short_order_create_transaction of this InlineResponse20014.  # noqa: E501
        :type: MarketOrderTransaction
        """

        self._short_order_create_transaction = short_order_create_transaction

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


        :return: The short_order_fill_transaction of this InlineResponse20014.  # noqa: E501
        :rtype: OrderFillTransaction
        """
        return self._short_order_fill_transaction

    @short_order_fill_transaction.setter
    def short_order_fill_transaction(self, short_order_fill_transaction):
        """Sets the short_order_fill_transaction of this InlineResponse20014.


        :param short_order_fill_transaction: The short_order_fill_transaction of this InlineResponse20014.  # noqa: E501
        :type: OrderFillTransaction
        """

        self._short_order_fill_transaction = short_order_fill_transaction

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


        :return: The short_order_cancel_transaction of this InlineResponse20014.  # noqa: E501
        :rtype: OrderCancelTransaction
        """
        return self._short_order_cancel_transaction

    @short_order_cancel_transaction.setter
    def short_order_cancel_transaction(self, short_order_cancel_transaction):
        """Sets the short_order_cancel_transaction of this InlineResponse20014.


        :param short_order_cancel_transaction: The short_order_cancel_transaction of this InlineResponse20014.  # noqa: E501
        :type: OrderCancelTransaction
        """

        self._short_order_cancel_transaction = short_order_cancel_transaction

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

        The IDs of all Transactions that were created while satisfying the request.  # noqa: E501

        :return: The related_transaction_i_ds of this InlineResponse20014.  # noqa: E501
        :rtype: list[str]
        """
        return self._related_transaction_i_ds

    @related_transaction_i_ds.setter
    def related_transaction_i_ds(self, related_transaction_i_ds):
        """Sets the related_transaction_i_ds of this InlineResponse20014.

        The IDs of all Transactions that were created while satisfying the request.  # noqa: E501

        :param related_transaction_i_ds: The related_transaction_i_ds of this InlineResponse20014.  # noqa: E501
        :type: list[str]
        """

        self._related_transaction_i_ds = related_transaction_i_ds

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

        The ID of the most recent Transaction created for the Account  # noqa: E501

        :return: The last_transaction_id of this InlineResponse20014.  # noqa: E501
        :rtype: str
        """
        return self._last_transaction_id

    @last_transaction_id.setter
    def last_transaction_id(self, last_transaction_id):
        """Sets the last_transaction_id of this InlineResponse20014.

        The ID of the most recent Transaction created for the Account  # noqa: E501

        :param last_transaction_id: The last_transaction_id of this InlineResponse20014.  # noqa: E501
        :type: str
        """

        self._last_transaction_id = last_transaction_id

    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

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

        return self.__dict__ == other.__dict__

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