# coding: utf-8

"""
    Hydrogen Proton API

    Financial engineering module of Hydrogen Atom  # noqa: E501

    OpenAPI spec version: 1.8.0
    Contact: info@hydrogenplatform.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class BacktestRequest(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 = {
        'asset_size': 'float',
        'end_date': 'date',
        'stats': 'bool',
        'asset_sizes': 'bool',
        'model_id': 'str',
        'initial_weights': 'object',
        'trades': 'bool',
        'start_date': 'date',
        'settings': 'Settings',
        'holdings': 'bool'
    }

    attribute_map = {
        'asset_size': 'asset_size',
        'end_date': 'end_date',
        'stats': 'stats',
        'asset_sizes': 'asset_sizes',
        'model_id': 'model_id',
        'initial_weights': 'initial_weights',
        'trades': 'trades',
        'start_date': 'start_date',
        'settings': 'settings',
        'holdings': 'holdings'
    }

    def __init__(self, asset_size=None, end_date=None, stats=True, asset_sizes=True, model_id=None, initial_weights=None, trades=True, start_date=None, settings=None, holdings=True):  # noqa: E501
        """BacktestRequest - a model defined in Swagger"""  # noqa: E501

        self._asset_size = None
        self._end_date = None
        self._stats = None
        self._asset_sizes = None
        self._model_id = None
        self._initial_weights = None
        self._trades = None
        self._start_date = None
        self._settings = None
        self._holdings = None
        self.discriminator = None

        if asset_size is not None:
            self.asset_size = asset_size
        self.end_date = end_date
        if stats is not None:
            self.stats = stats
        if asset_sizes is not None:
            self.asset_sizes = asset_sizes
        if model_id is not None:
            self.model_id = model_id
        if initial_weights is not None:
            self.initial_weights = initial_weights
        if trades is not None:
            self.trades = trades
        self.start_date = start_date
        if settings is not None:
            self.settings = settings
        if holdings is not None:
            self.holdings = holdings

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


        :return: The asset_size of this BacktestRequest.  # noqa: E501
        :rtype: float
        """
        return self._asset_size

    @asset_size.setter
    def asset_size(self, asset_size):
        """Sets the asset_size of this BacktestRequest.


        :param asset_size: The asset_size of this BacktestRequest.  # noqa: E501
        :type: float
        """
        if asset_size is not None and asset_size < 0:  # noqa: E501
            raise ValueError("Invalid value for `asset_size`, must be a value greater than or equal to `0`")  # noqa: E501

        self._asset_size = asset_size

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


        :return: The end_date of this BacktestRequest.  # noqa: E501
        :rtype: date
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this BacktestRequest.


        :param end_date: The end_date of this BacktestRequest.  # noqa: E501
        :type: date
        """
        if end_date is None:
            raise ValueError("Invalid value for `end_date`, must not be `None`")  # noqa: E501

        self._end_date = end_date

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


        :return: The stats of this BacktestRequest.  # noqa: E501
        :rtype: bool
        """
        return self._stats

    @stats.setter
    def stats(self, stats):
        """Sets the stats of this BacktestRequest.


        :param stats: The stats of this BacktestRequest.  # noqa: E501
        :type: bool
        """

        self._stats = stats

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


        :return: The asset_sizes of this BacktestRequest.  # noqa: E501
        :rtype: bool
        """
        return self._asset_sizes

    @asset_sizes.setter
    def asset_sizes(self, asset_sizes):
        """Sets the asset_sizes of this BacktestRequest.


        :param asset_sizes: The asset_sizes of this BacktestRequest.  # noqa: E501
        :type: bool
        """

        self._asset_sizes = asset_sizes

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


        :return: The model_id of this BacktestRequest.  # noqa: E501
        :rtype: str
        """
        return self._model_id

    @model_id.setter
    def model_id(self, model_id):
        """Sets the model_id of this BacktestRequest.


        :param model_id: The model_id of this BacktestRequest.  # noqa: E501
        :type: str
        """

        self._model_id = model_id

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


        :return: The initial_weights of this BacktestRequest.  # noqa: E501
        :rtype: object
        """
        return self._initial_weights

    @initial_weights.setter
    def initial_weights(self, initial_weights):
        """Sets the initial_weights of this BacktestRequest.


        :param initial_weights: The initial_weights of this BacktestRequest.  # noqa: E501
        :type: object
        """

        self._initial_weights = initial_weights

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


        :return: The trades of this BacktestRequest.  # noqa: E501
        :rtype: bool
        """
        return self._trades

    @trades.setter
    def trades(self, trades):
        """Sets the trades of this BacktestRequest.


        :param trades: The trades of this BacktestRequest.  # noqa: E501
        :type: bool
        """

        self._trades = trades

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


        :return: The start_date of this BacktestRequest.  # noqa: E501
        :rtype: date
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this BacktestRequest.


        :param start_date: The start_date of this BacktestRequest.  # noqa: E501
        :type: date
        """
        if start_date is None:
            raise ValueError("Invalid value for `start_date`, must not be `None`")  # noqa: E501

        self._start_date = start_date

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


        :return: The settings of this BacktestRequest.  # noqa: E501
        :rtype: Settings
        """
        return self._settings

    @settings.setter
    def settings(self, settings):
        """Sets the settings of this BacktestRequest.


        :param settings: The settings of this BacktestRequest.  # noqa: E501
        :type: Settings
        """

        self._settings = settings

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


        :return: The holdings of this BacktestRequest.  # noqa: E501
        :rtype: bool
        """
        return self._holdings

    @holdings.setter
    def holdings(self, holdings):
        """Sets the holdings of this BacktestRequest.


        :param holdings: The holdings of this BacktestRequest.  # noqa: E501
        :type: bool
        """

        self._holdings = holdings

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

        return self.__dict__ == other.__dict__

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