# coding: utf-8

"""
    Lotus API

    Lotus is an open-core pricing and billing engine. We enable API companies to automate and optimize their custom usage-based pricing for any metric.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class BacktestCreateRequest(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 = {
        'start_date': 'date',
        'end_date': 'date',
        'substitutions': 'list[BacktestSubstitutionMultiRequest]',
        'kpis': 'list[str]',
        'backtest_name': 'str'
    }

    attribute_map = {
        'start_date': 'start_date',
        'end_date': 'end_date',
        'substitutions': 'substitutions',
        'kpis': 'kpis',
        'backtest_name': 'backtest_name'
    }

    def __init__(self, start_date=None, end_date=None, substitutions=None, kpis=None, backtest_name=None):  # noqa: E501
        """BacktestCreateRequest - a model defined in Swagger"""  # noqa: E501
        self._start_date = None
        self._end_date = None
        self._substitutions = None
        self._kpis = None
        self._backtest_name = None
        self.discriminator = None
        self.start_date = start_date
        self.end_date = end_date
        self.substitutions = substitutions
        self.kpis = kpis
        self.backtest_name = backtest_name

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


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

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


        :param start_date: The start_date of this BacktestCreateRequest.  # 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 end_date(self):
        """Gets the end_date of this BacktestCreateRequest.  # noqa: E501


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

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


        :param end_date: The end_date of this BacktestCreateRequest.  # 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 substitutions(self):
        """Gets the substitutions of this BacktestCreateRequest.  # noqa: E501


        :return: The substitutions of this BacktestCreateRequest.  # noqa: E501
        :rtype: list[BacktestSubstitutionMultiRequest]
        """
        return self._substitutions

    @substitutions.setter
    def substitutions(self, substitutions):
        """Sets the substitutions of this BacktestCreateRequest.


        :param substitutions: The substitutions of this BacktestCreateRequest.  # noqa: E501
        :type: list[BacktestSubstitutionMultiRequest]
        """
        if substitutions is None:
            raise ValueError("Invalid value for `substitutions`, must not be `None`")  # noqa: E501

        self._substitutions = substitutions

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


        :return: The kpis of this BacktestCreateRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._kpis

    @kpis.setter
    def kpis(self, kpis):
        """Sets the kpis of this BacktestCreateRequest.


        :param kpis: The kpis of this BacktestCreateRequest.  # noqa: E501
        :type: list[str]
        """
        if kpis is None:
            raise ValueError("Invalid value for `kpis`, must not be `None`")  # noqa: E501
        allowed_values = ["total_revenue"]  # noqa: E501
        if not set(kpis).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `kpis` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(kpis) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._kpis = kpis

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


        :return: The backtest_name of this BacktestCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._backtest_name

    @backtest_name.setter
    def backtest_name(self, backtest_name):
        """Sets the backtest_name of this BacktestCreateRequest.


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

        self._backtest_name = backtest_name

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

        return self.__dict__ == other.__dict__

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