# coding: utf-8

"""
    PowerBot - Webservice for algotrading

    # TERMS AND CONDITIONS The PowerBot system provides B2B services for trading at intraday power markets. By using the PowerBot service, each user agrees to the terms and conditions of this licence: 1. The user confirms that they are familiar with the exchanges trading system and all relevant rules, is professionally qualified and in possession of a trading license for the relevant exchange. 2. The user will comply with the exchanges market rules (e.g. [EPEX Spot Market Rules](https://www.epexspot.com/en/downloads#rules-fees-processes) or [Nord Pool Market Rules](https://www.nordpoolgroup.com/trading/Rules-and-regulations/)) and will not endanger the exchange system at any time with heavy load from trading algorithms or by other use. 3. The user is aware of limits imposed by the exchange. 4. The user is solely liable for actions resulting from the use of PowerBot.   # INTRODUCTION PowerBot is a web-based software service enabling algorithmic trading on intraday power exchanges such as EPEX, Nord Pool, HUPX, BSP Southpool, TGE, OPCOM or ETPA. The service is straightforward to integrate in an existing software environment and provides a variety of programming interfaces for development of individual trading algorithms and software tools. Besides enabling fully automated intraday trading, it can be used to create tools for human traders providing relevant information and trading opportunities or can be integrated in existing software tools. For further details see https://www.powerbot-trading.com  ## Knowledge Base In addition to this API guide, please find the documentation at https://docs.powerbot-trading.com - the password will be provided by the PowerBot team. If not, please reach out to us at support@powerbot-trading.com  ## Endpoints The PowerBot service is available at the following REST endpoints:  | Instance      | Base URL for REST Endpoints                                      | |---------------|------------------------------------------------------------------| | EPEX          | https://staging.powerbot-trading.com/playground/epex/v2/api      | | Nord Pool     | https://staging.powerbot-trading.com/playground/nordpool/v2/api  | | HUPX          | https://staging.powerbot-trading.com/playground/hupx/v2/api      | | BSP Southpool | https://staging.powerbot-trading.com/playground/southpool/v2/api | | TGE           | https://staging.powerbot-trading.com/playground/tge/v2/api       | | IBEX          | https://staging.powerbot-trading.com/playground/ibex/v2/api      | | CROPEX        | https://staging.powerbot-trading.com/playground/cropex/v2/api    | | OPCOM         | https://staging.powerbot-trading.com/playground/opcom/v2/api     | | ETPA          | https://staging.powerbot-trading.com/playground/etpa/v2/api      | | BRM           | https://staging.powerbot-trading.com/playground/brm/v2/api       |  Access to endpoints is secured via an API Key, which needs to be passed as an \"api_key\" header in each request.   Notes on API Keys:  * API keys are specific to Test, Staging or Production.  * API keys are generated by the system administrator and need to be requested.  ## How to generate API clients (libraries) This OpenAPI specification can be used to generate API clients (programming libraries) for a wide range of programming languages using tools like [OpenAPI Generator](https://openapi-generator.tech/). A detailed guide can be found in the [knowledge base](https://docs.powerbot-trading.com/articles/getting-started/generating-clients/).  ## PowerBot Python client For Python, a ready-made client is also available on PyPI and can be downloaded locally via:  ```shell   pip install powerbot-client ```  ## Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be in JSON format as follows:  ``` {   \"message\": \"... an error message ...\" } ```  ## Paging The API uses offset and limit parameters for paged operations. An X-Total-Count header is added to responses to indicate the total number of items in a paged response.  ## API Rate Limiting The API limits the number of concurrent calls to 50 - when that limit is reached, the client will receive 503 http status codes (service unavailable) with the following text:  ``` {   \"message\": \"API rate limit exceeded\" } ``` Clients should ensure that they stay within the limit for concurrent API calls.    ## Additional code samples Additional information and code samples demonstrating the use of the API can be found at in our [knowledge base](https://docs.powerbot-trading.com/docs/programmatic-access/)  # noqa: E501

    The version of the OpenAPI document: 2.21.0-rc1
    Contact: office@powerbot-trading.com
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from powerbot_asyncio_client.configuration import Configuration


class Trade(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 = {
        'trade_id': 'str',
        'state': 'TradeState',
        'exchange': 'str',
        'delivery_area': 'str',
        'api_timestamp': 'datetime',
        'exec_time': 'datetime',
        'buy': 'bool',
        'sell': 'bool',
        'buy_order_id': 'str',
        'buy_delivery_area': 'str',
        'buy_cl_order_id': 'str',
        'buy_txt': 'str',
        'buy_user_code': 'str',
        'buy_member_id': 'str',
        'buy_aggressor_indicator': 'AggressorIndicator',
        'buy_portfolio_id': 'str',
        'sell_order_id': 'str',
        'sell_delivery_area': 'str',
        'sell_cl_order_id': 'str',
        'sell_txt': 'str',
        'sell_user_code': 'str',
        'sell_member_id': 'str',
        'sell_aggressor_indicator': 'AggressorIndicator',
        'sell_portfolio_id': 'str',
        'contract_id': 'str',
        'contract_name': 'str',
        'delivery_start': 'datetime',
        'delivery_end': 'datetime',
        'price': 'float',
        'quantity': 'float',
        'prod': 'str',
        'self_trade': 'bool',
        'pre_arranged': 'bool',
        'pre_arrange_type': 'str',
        'buy_clearing_account_type': 'str',
        'sell_clearing_account_type': 'str',
        'buy_account_id': 'str',
        'sell_account_id': 'str',
        'location': 'str',
        'buy_strategy_id': 'str',
        'sell_strategy_id': 'str'
    }

    attribute_map = {
        'trade_id': 'trade_id',
        'state': 'state',
        'exchange': 'exchange',
        'delivery_area': 'delivery_area',
        'api_timestamp': 'api_timestamp',
        'exec_time': 'exec_time',
        'buy': 'buy',
        'sell': 'sell',
        'buy_order_id': 'buy_order_id',
        'buy_delivery_area': 'buy_delivery_area',
        'buy_cl_order_id': 'buy_clOrderId',
        'buy_txt': 'buy_txt',
        'buy_user_code': 'buy_user_code',
        'buy_member_id': 'buy_member_id',
        'buy_aggressor_indicator': 'buy_aggressor_indicator',
        'buy_portfolio_id': 'buy_portfolio_id',
        'sell_order_id': 'sell_order_id',
        'sell_delivery_area': 'sell_delivery_area',
        'sell_cl_order_id': 'sell_clOrderId',
        'sell_txt': 'sell_txt',
        'sell_user_code': 'sell_user_code',
        'sell_member_id': 'sell_member_id',
        'sell_aggressor_indicator': 'sell_aggressor_indicator',
        'sell_portfolio_id': 'sell_portfolio_id',
        'contract_id': 'contract_id',
        'contract_name': 'contract_name',
        'delivery_start': 'delivery_start',
        'delivery_end': 'delivery_end',
        'price': 'price',
        'quantity': 'quantity',
        'prod': 'prod',
        'self_trade': 'self_trade',
        'pre_arranged': 'pre_arranged',
        'pre_arrange_type': 'pre_arrange_type',
        'buy_clearing_account_type': 'buy_clearing_account_type',
        'sell_clearing_account_type': 'sell_clearing_account_type',
        'buy_account_id': 'buy_account_id',
        'sell_account_id': 'sell_account_id',
        'location': 'location',
        'buy_strategy_id': 'buy_strategy_id',
        'sell_strategy_id': 'sell_strategy_id'
    }

    def __init__(self, trade_id=None, state=None, exchange=None, delivery_area=None, api_timestamp=None, exec_time=None, buy=None, sell=None, buy_order_id=None, buy_delivery_area=None, buy_cl_order_id=None, buy_txt=None, buy_user_code=None, buy_member_id=None, buy_aggressor_indicator=None, buy_portfolio_id=None, sell_order_id=None, sell_delivery_area=None, sell_cl_order_id=None, sell_txt=None, sell_user_code=None, sell_member_id=None, sell_aggressor_indicator=None, sell_portfolio_id=None, contract_id=None, contract_name=None, delivery_start=None, delivery_end=None, price=None, quantity=None, prod=None, self_trade=None, pre_arranged=None, pre_arrange_type=None, buy_clearing_account_type=None, sell_clearing_account_type=None, buy_account_id=None, sell_account_id=None, location=None, buy_strategy_id=None, sell_strategy_id=None, local_vars_configuration=None):  # noqa: E501
        """Trade - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._trade_id = None
        self._state = None
        self._exchange = None
        self._delivery_area = None
        self._api_timestamp = None
        self._exec_time = None
        self._buy = None
        self._sell = None
        self._buy_order_id = None
        self._buy_delivery_area = None
        self._buy_cl_order_id = None
        self._buy_txt = None
        self._buy_user_code = None
        self._buy_member_id = None
        self._buy_aggressor_indicator = None
        self._buy_portfolio_id = None
        self._sell_order_id = None
        self._sell_delivery_area = None
        self._sell_cl_order_id = None
        self._sell_txt = None
        self._sell_user_code = None
        self._sell_member_id = None
        self._sell_aggressor_indicator = None
        self._sell_portfolio_id = None
        self._contract_id = None
        self._contract_name = None
        self._delivery_start = None
        self._delivery_end = None
        self._price = None
        self._quantity = None
        self._prod = None
        self._self_trade = None
        self._pre_arranged = None
        self._pre_arrange_type = None
        self._buy_clearing_account_type = None
        self._sell_clearing_account_type = None
        self._buy_account_id = None
        self._sell_account_id = None
        self._location = None
        self._buy_strategy_id = None
        self._sell_strategy_id = None
        self.discriminator = None

        if trade_id is not None:
            self.trade_id = trade_id
        if state is not None:
            self.state = state
        if exchange is not None:
            self.exchange = exchange
        if delivery_area is not None:
            self.delivery_area = delivery_area
        if api_timestamp is not None:
            self.api_timestamp = api_timestamp
        if exec_time is not None:
            self.exec_time = exec_time
        if buy is not None:
            self.buy = buy
        if sell is not None:
            self.sell = sell
        if buy_order_id is not None:
            self.buy_order_id = buy_order_id
        if buy_delivery_area is not None:
            self.buy_delivery_area = buy_delivery_area
        if buy_cl_order_id is not None:
            self.buy_cl_order_id = buy_cl_order_id
        if buy_txt is not None:
            self.buy_txt = buy_txt
        if buy_user_code is not None:
            self.buy_user_code = buy_user_code
        if buy_member_id is not None:
            self.buy_member_id = buy_member_id
        if buy_aggressor_indicator is not None:
            self.buy_aggressor_indicator = buy_aggressor_indicator
        if buy_portfolio_id is not None:
            self.buy_portfolio_id = buy_portfolio_id
        if sell_order_id is not None:
            self.sell_order_id = sell_order_id
        if sell_delivery_area is not None:
            self.sell_delivery_area = sell_delivery_area
        if sell_cl_order_id is not None:
            self.sell_cl_order_id = sell_cl_order_id
        if sell_txt is not None:
            self.sell_txt = sell_txt
        if sell_user_code is not None:
            self.sell_user_code = sell_user_code
        if sell_member_id is not None:
            self.sell_member_id = sell_member_id
        if sell_aggressor_indicator is not None:
            self.sell_aggressor_indicator = sell_aggressor_indicator
        if sell_portfolio_id is not None:
            self.sell_portfolio_id = sell_portfolio_id
        if contract_id is not None:
            self.contract_id = contract_id
        if contract_name is not None:
            self.contract_name = contract_name
        if delivery_start is not None:
            self.delivery_start = delivery_start
        if delivery_end is not None:
            self.delivery_end = delivery_end
        if price is not None:
            self.price = price
        if quantity is not None:
            self.quantity = quantity
        if prod is not None:
            self.prod = prod
        if self_trade is not None:
            self.self_trade = self_trade
        if pre_arranged is not None:
            self.pre_arranged = pre_arranged
        if pre_arrange_type is not None:
            self.pre_arrange_type = pre_arrange_type
        if buy_clearing_account_type is not None:
            self.buy_clearing_account_type = buy_clearing_account_type
        if sell_clearing_account_type is not None:
            self.sell_clearing_account_type = sell_clearing_account_type
        if buy_account_id is not None:
            self.buy_account_id = buy_account_id
        if sell_account_id is not None:
            self.sell_account_id = sell_account_id
        if location is not None:
            self.location = location
        if buy_strategy_id is not None:
            self.buy_strategy_id = buy_strategy_id
        if sell_strategy_id is not None:
            self.sell_strategy_id = sell_strategy_id

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

        Unique trade_id  # noqa: E501

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

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

        Unique trade_id  # noqa: E501

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

        self._trade_id = trade_id

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


        :return: The state of this Trade.  # noqa: E501
        :rtype: TradeState
        """
        return self._state

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


        :param state: The state of this Trade.  # noqa: E501
        :type state: TradeState
        """

        self._state = state

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

        The exchange where the trade was executed  # noqa: E501

        :return: The exchange of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._exchange

    @exchange.setter
    def exchange(self, exchange):
        """Sets the exchange of this Trade.

        The exchange where the trade was executed  # noqa: E501

        :param exchange: The exchange of this Trade.  # noqa: E501
        :type exchange: str
        """

        self._exchange = exchange

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

        If you sold energy with this trade, delivery_area will contain the sell_delivery_area, otherwise the buy_delivery_area  # noqa: E501

        :return: The delivery_area of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._delivery_area

    @delivery_area.setter
    def delivery_area(self, delivery_area):
        """Sets the delivery_area of this Trade.

        If you sold energy with this trade, delivery_area will contain the sell_delivery_area, otherwise the buy_delivery_area  # noqa: E501

        :param delivery_area: The delivery_area of this Trade.  # noqa: E501
        :type delivery_area: str
        """

        self._delivery_area = delivery_area

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

        The timestamp when the trade was received (UTC time zone)  # noqa: E501

        :return: The api_timestamp of this Trade.  # noqa: E501
        :rtype: datetime
        """
        return self._api_timestamp

    @api_timestamp.setter
    def api_timestamp(self, api_timestamp):
        """Sets the api_timestamp of this Trade.

        The timestamp when the trade was received (UTC time zone)  # noqa: E501

        :param api_timestamp: The api_timestamp of this Trade.  # noqa: E501
        :type api_timestamp: datetime
        """

        self._api_timestamp = api_timestamp

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

        The timestamp when the trade was executed (UTC time zone)  # noqa: E501

        :return: The exec_time of this Trade.  # noqa: E501
        :rtype: datetime
        """
        return self._exec_time

    @exec_time.setter
    def exec_time(self, exec_time):
        """Sets the exec_time of this Trade.

        The timestamp when the trade was executed (UTC time zone)  # noqa: E501

        :param exec_time: The exec_time of this Trade.  # noqa: E501
        :type exec_time: datetime
        """

        self._exec_time = exec_time

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

        true if you bought energy  # noqa: E501

        :return: The buy of this Trade.  # noqa: E501
        :rtype: bool
        """
        return self._buy

    @buy.setter
    def buy(self, buy):
        """Sets the buy of this Trade.

        true if you bought energy  # noqa: E501

        :param buy: The buy of this Trade.  # noqa: E501
        :type buy: bool
        """

        self._buy = buy

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

        true if you sold energy  # noqa: E501

        :return: The sell of this Trade.  # noqa: E501
        :rtype: bool
        """
        return self._sell

    @sell.setter
    def sell(self, sell):
        """Sets the sell of this Trade.

        true if you sold energy  # noqa: E501

        :param sell: The sell of this Trade.  # noqa: E501
        :type sell: bool
        """

        self._sell = sell

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

        the order_id of the underlying buy-order  # noqa: E501

        :return: The buy_order_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_order_id

    @buy_order_id.setter
    def buy_order_id(self, buy_order_id):
        """Sets the buy_order_id of this Trade.

        the order_id of the underlying buy-order  # noqa: E501

        :param buy_order_id: The buy_order_id of this Trade.  # noqa: E501
        :type buy_order_id: str
        """

        self._buy_order_id = buy_order_id

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

        The delivery area of the buy-side of the trade.  # noqa: E501

        :return: The buy_delivery_area of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_delivery_area

    @buy_delivery_area.setter
    def buy_delivery_area(self, buy_delivery_area):
        """Sets the buy_delivery_area of this Trade.

        The delivery area of the buy-side of the trade.  # noqa: E501

        :param buy_delivery_area: The buy_delivery_area of this Trade.  # noqa: E501
        :type buy_delivery_area: str
        """

        self._buy_delivery_area = buy_delivery_area

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

        the client order id of the buy order  # noqa: E501

        :return: The buy_cl_order_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_cl_order_id

    @buy_cl_order_id.setter
    def buy_cl_order_id(self, buy_cl_order_id):
        """Sets the buy_cl_order_id of this Trade.

        the client order id of the buy order  # noqa: E501

        :param buy_cl_order_id: The buy_cl_order_id of this Trade.  # noqa: E501
        :type buy_cl_order_id: str
        """

        self._buy_cl_order_id = buy_cl_order_id

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

        the custom text of the buy order  # noqa: E501

        :return: The buy_txt of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_txt

    @buy_txt.setter
    def buy_txt(self, buy_txt):
        """Sets the buy_txt of this Trade.

        the custom text of the buy order  # noqa: E501

        :param buy_txt: The buy_txt of this Trade.  # noqa: E501
        :type buy_txt: str
        """

        self._buy_txt = buy_txt

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

        the buyer's exchange user code  # noqa: E501

        :return: The buy_user_code of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_user_code

    @buy_user_code.setter
    def buy_user_code(self, buy_user_code):
        """Sets the buy_user_code of this Trade.

        the buyer's exchange user code  # noqa: E501

        :param buy_user_code: The buy_user_code of this Trade.  # noqa: E501
        :type buy_user_code: str
        """

        self._buy_user_code = buy_user_code

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

        the buyer's exchange member id  # noqa: E501

        :return: The buy_member_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_member_id

    @buy_member_id.setter
    def buy_member_id(self, buy_member_id):
        """Sets the buy_member_id of this Trade.

        the buyer's exchange member id  # noqa: E501

        :param buy_member_id: The buy_member_id of this Trade.  # noqa: E501
        :type buy_member_id: str
        """

        self._buy_member_id = buy_member_id

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


        :return: The buy_aggressor_indicator of this Trade.  # noqa: E501
        :rtype: AggressorIndicator
        """
        return self._buy_aggressor_indicator

    @buy_aggressor_indicator.setter
    def buy_aggressor_indicator(self, buy_aggressor_indicator):
        """Sets the buy_aggressor_indicator of this Trade.


        :param buy_aggressor_indicator: The buy_aggressor_indicator of this Trade.  # noqa: E501
        :type buy_aggressor_indicator: AggressorIndicator
        """

        self._buy_aggressor_indicator = buy_aggressor_indicator

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


        :return: The buy_portfolio_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_portfolio_id

    @buy_portfolio_id.setter
    def buy_portfolio_id(self, buy_portfolio_id):
        """Sets the buy_portfolio_id of this Trade.


        :param buy_portfolio_id: The buy_portfolio_id of this Trade.  # noqa: E501
        :type buy_portfolio_id: str
        """

        self._buy_portfolio_id = buy_portfolio_id

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

        The seller's order id  # noqa: E501

        :return: The sell_order_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_order_id

    @sell_order_id.setter
    def sell_order_id(self, sell_order_id):
        """Sets the sell_order_id of this Trade.

        The seller's order id  # noqa: E501

        :param sell_order_id: The sell_order_id of this Trade.  # noqa: E501
        :type sell_order_id: str
        """

        self._sell_order_id = sell_order_id

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

        delivery area of the sell order  # noqa: E501

        :return: The sell_delivery_area of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_delivery_area

    @sell_delivery_area.setter
    def sell_delivery_area(self, sell_delivery_area):
        """Sets the sell_delivery_area of this Trade.

        delivery area of the sell order  # noqa: E501

        :param sell_delivery_area: The sell_delivery_area of this Trade.  # noqa: E501
        :type sell_delivery_area: str
        """

        self._sell_delivery_area = sell_delivery_area

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

        The sell order's client id  # noqa: E501

        :return: The sell_cl_order_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_cl_order_id

    @sell_cl_order_id.setter
    def sell_cl_order_id(self, sell_cl_order_id):
        """Sets the sell_cl_order_id of this Trade.

        The sell order's client id  # noqa: E501

        :param sell_cl_order_id: The sell_cl_order_id of this Trade.  # noqa: E501
        :type sell_cl_order_id: str
        """

        self._sell_cl_order_id = sell_cl_order_id

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

        The sell order's custom text  # noqa: E501

        :return: The sell_txt of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_txt

    @sell_txt.setter
    def sell_txt(self, sell_txt):
        """Sets the sell_txt of this Trade.

        The sell order's custom text  # noqa: E501

        :param sell_txt: The sell_txt of this Trade.  # noqa: E501
        :type sell_txt: str
        """

        self._sell_txt = sell_txt

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

        The seller's exchange user code  # noqa: E501

        :return: The sell_user_code of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_user_code

    @sell_user_code.setter
    def sell_user_code(self, sell_user_code):
        """Sets the sell_user_code of this Trade.

        The seller's exchange user code  # noqa: E501

        :param sell_user_code: The sell_user_code of this Trade.  # noqa: E501
        :type sell_user_code: str
        """

        self._sell_user_code = sell_user_code

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

        The seller's exchange member id  # noqa: E501

        :return: The sell_member_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_member_id

    @sell_member_id.setter
    def sell_member_id(self, sell_member_id):
        """Sets the sell_member_id of this Trade.

        The seller's exchange member id  # noqa: E501

        :param sell_member_id: The sell_member_id of this Trade.  # noqa: E501
        :type sell_member_id: str
        """

        self._sell_member_id = sell_member_id

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


        :return: The sell_aggressor_indicator of this Trade.  # noqa: E501
        :rtype: AggressorIndicator
        """
        return self._sell_aggressor_indicator

    @sell_aggressor_indicator.setter
    def sell_aggressor_indicator(self, sell_aggressor_indicator):
        """Sets the sell_aggressor_indicator of this Trade.


        :param sell_aggressor_indicator: The sell_aggressor_indicator of this Trade.  # noqa: E501
        :type sell_aggressor_indicator: AggressorIndicator
        """

        self._sell_aggressor_indicator = sell_aggressor_indicator

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


        :return: The sell_portfolio_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_portfolio_id

    @sell_portfolio_id.setter
    def sell_portfolio_id(self, sell_portfolio_id):
        """Sets the sell_portfolio_id of this Trade.


        :param sell_portfolio_id: The sell_portfolio_id of this Trade.  # noqa: E501
        :type sell_portfolio_id: str
        """

        self._sell_portfolio_id = sell_portfolio_id

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

        The contract_id against which the trade was executed  # noqa: E501

        :return: The contract_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._contract_id

    @contract_id.setter
    def contract_id(self, contract_id):
        """Sets the contract_id of this Trade.

        The contract_id against which the trade was executed  # noqa: E501

        :param contract_id: The contract_id of this Trade.  # noqa: E501
        :type contract_id: str
        """

        self._contract_id = contract_id

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

        The contract's name against which the trade was executed.  # noqa: E501

        :return: The contract_name of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._contract_name

    @contract_name.setter
    def contract_name(self, contract_name):
        """Sets the contract_name of this Trade.

        The contract's name against which the trade was executed.  # noqa: E501

        :param contract_name: The contract_name of this Trade.  # noqa: E501
        :type contract_name: str
        """

        self._contract_name = contract_name

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

        Time when the delivery of this trade starts (UTC timezone)  # noqa: E501

        :return: The delivery_start of this Trade.  # noqa: E501
        :rtype: datetime
        """
        return self._delivery_start

    @delivery_start.setter
    def delivery_start(self, delivery_start):
        """Sets the delivery_start of this Trade.

        Time when the delivery of this trade starts (UTC timezone)  # noqa: E501

        :param delivery_start: The delivery_start of this Trade.  # noqa: E501
        :type delivery_start: datetime
        """

        self._delivery_start = delivery_start

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

        Time when the delivery of this trade ends (UTC timezone)  # noqa: E501

        :return: The delivery_end of this Trade.  # noqa: E501
        :rtype: datetime
        """
        return self._delivery_end

    @delivery_end.setter
    def delivery_end(self, delivery_end):
        """Sets the delivery_end of this Trade.

        Time when the delivery of this trade ends (UTC timezone)  # noqa: E501

        :param delivery_end: The delivery_end of this Trade.  # noqa: E501
        :type delivery_end: datetime
        """

        self._delivery_end = delivery_end

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

        Price of the trade  # noqa: E501

        :return: The price of this Trade.  # noqa: E501
        :rtype: float
        """
        return self._price

    @price.setter
    def price(self, price):
        """Sets the price of this Trade.

        Price of the trade  # noqa: E501

        :param price: The price of this Trade.  # noqa: E501
        :type price: float
        """

        self._price = price

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

        Quantity in MW for this trade  # noqa: E501

        :return: The quantity of this Trade.  # noqa: E501
        :rtype: float
        """
        return self._quantity

    @quantity.setter
    def quantity(self, quantity):
        """Sets the quantity of this Trade.

        Quantity in MW for this trade  # noqa: E501

        :param quantity: The quantity of this Trade.  # noqa: E501
        :type quantity: float
        """

        self._quantity = quantity

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

        Product id  # noqa: E501

        :return: The prod of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._prod

    @prod.setter
    def prod(self, prod):
        """Sets the prod of this Trade.

        Product id  # noqa: E501

        :param prod: The prod of this Trade.  # noqa: E501
        :type prod: str
        """

        self._prod = prod

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


        :return: The self_trade of this Trade.  # noqa: E501
        :rtype: bool
        """
        return self._self_trade

    @self_trade.setter
    def self_trade(self, self_trade):
        """Sets the self_trade of this Trade.


        :param self_trade: The self_trade of this Trade.  # noqa: E501
        :type self_trade: bool
        """

        self._self_trade = self_trade

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


        :return: The pre_arranged of this Trade.  # noqa: E501
        :rtype: bool
        """
        return self._pre_arranged

    @pre_arranged.setter
    def pre_arranged(self, pre_arranged):
        """Sets the pre_arranged of this Trade.


        :param pre_arranged: The pre_arranged of this Trade.  # noqa: E501
        :type pre_arranged: bool
        """

        self._pre_arranged = pre_arranged

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


        :return: The pre_arrange_type of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._pre_arrange_type

    @pre_arrange_type.setter
    def pre_arrange_type(self, pre_arrange_type):
        """Sets the pre_arrange_type of this Trade.


        :param pre_arrange_type: The pre_arrange_type of this Trade.  # noqa: E501
        :type pre_arrange_type: str
        """

        self._pre_arrange_type = pre_arrange_type

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

        A label for internal use, indicating whether the order is entered on its own account (\"P\") or as an agent (\"A\"). This label does not impact exchange functionality and is primarily used for internal categorization.  **Note**: Only relevant for M7 based exchanges (HUPX, SouthPool, TGE, EPEX, SEMO, OPCOM).  # noqa: E501

        :return: The buy_clearing_account_type of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_clearing_account_type

    @buy_clearing_account_type.setter
    def buy_clearing_account_type(self, buy_clearing_account_type):
        """Sets the buy_clearing_account_type of this Trade.

        A label for internal use, indicating whether the order is entered on its own account (\"P\") or as an agent (\"A\"). This label does not impact exchange functionality and is primarily used for internal categorization.  **Note**: Only relevant for M7 based exchanges (HUPX, SouthPool, TGE, EPEX, SEMO, OPCOM).  # noqa: E501

        :param buy_clearing_account_type: The buy_clearing_account_type of this Trade.  # noqa: E501
        :type buy_clearing_account_type: str
        """

        self._buy_clearing_account_type = buy_clearing_account_type

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

        A label for internal use, indicating whether the order is entered on its own account (\"P\") or as an agent (\"A\"). This label does not impact exchange functionality and is primarily used for internal categorization.  **Note**: Only relevant for M7 based exchanges (HUPX, SouthPool, TGE, EPEX, SEMO, OPCOM).  # noqa: E501

        :return: The sell_clearing_account_type of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_clearing_account_type

    @sell_clearing_account_type.setter
    def sell_clearing_account_type(self, sell_clearing_account_type):
        """Sets the sell_clearing_account_type of this Trade.

        A label for internal use, indicating whether the order is entered on its own account (\"P\") or as an agent (\"A\"). This label does not impact exchange functionality and is primarily used for internal categorization.  **Note**: Only relevant for M7 based exchanges (HUPX, SouthPool, TGE, EPEX, SEMO, OPCOM).  # noqa: E501

        :param sell_clearing_account_type: The sell_clearing_account_type of this Trade.  # noqa: E501
        :type sell_clearing_account_type: str
        """

        self._sell_clearing_account_type = sell_clearing_account_type

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

        The account for which the order was entered.  # noqa: E501

        :return: The buy_account_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_account_id

    @buy_account_id.setter
    def buy_account_id(self, buy_account_id):
        """Sets the buy_account_id of this Trade.

        The account for which the order was entered.  # noqa: E501

        :param buy_account_id: The buy_account_id of this Trade.  # noqa: E501
        :type buy_account_id: str
        """

        self._buy_account_id = buy_account_id

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

        The account for which the order was entered.  # noqa: E501

        :return: The sell_account_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_account_id

    @sell_account_id.setter
    def sell_account_id(self, sell_account_id):
        """Sets the sell_account_id of this Trade.

        The account for which the order was entered.  # noqa: E501

        :param sell_account_id: The sell_account_id of this Trade.  # noqa: E501
        :type sell_account_id: str
        """

        self._sell_account_id = sell_account_id

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

        Location within the delivery area.  **Note**: At this moment only M7 (HUPX, SouthPool, TGE, EPEX, SEMO, OPCOM) supports this field.  # noqa: E501

        :return: The location of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this Trade.

        Location within the delivery area.  **Note**: At this moment only M7 (HUPX, SouthPool, TGE, EPEX, SEMO, OPCOM) supports this field.  # noqa: E501

        :param location: The location of this Trade.  # noqa: E501
        :type location: str
        """

        self._location = location

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

        The strategy ID of the trade's buy order  # noqa: E501

        :return: The buy_strategy_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._buy_strategy_id

    @buy_strategy_id.setter
    def buy_strategy_id(self, buy_strategy_id):
        """Sets the buy_strategy_id of this Trade.

        The strategy ID of the trade's buy order  # noqa: E501

        :param buy_strategy_id: The buy_strategy_id of this Trade.  # noqa: E501
        :type buy_strategy_id: str
        """

        self._buy_strategy_id = buy_strategy_id

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

        The strategy ID of the trade's sell order  # noqa: E501

        :return: The sell_strategy_id of this Trade.  # noqa: E501
        :rtype: str
        """
        return self._sell_strategy_id

    @sell_strategy_id.setter
    def sell_strategy_id(self, sell_strategy_id):
        """Sets the sell_strategy_id of this Trade.

        The strategy ID of the trade's sell order  # noqa: E501

        :param sell_strategy_id: The sell_strategy_id of this Trade.  # noqa: E501
        :type sell_strategy_id: str
        """

        self._sell_strategy_id = sell_strategy_id

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, Trade):
            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, Trade):
            return True

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