# 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 AnalysisSummary(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 = {
        'analysis_name': 'str',
        'start_date': 'date',
        'end_date': 'date',
        'time_created': 'datetime',
        'kpis': 'list[str]',
        'status': 'str',
        'analysis_id': 'str'
    }

    attribute_map = {
        'analysis_name': 'analysis_name',
        'start_date': 'start_date',
        'end_date': 'end_date',
        'time_created': 'time_created',
        'kpis': 'kpis',
        'status': 'status',
        'analysis_id': 'analysis_id'
    }

    def __init__(self, analysis_name=None, start_date=None, end_date=None, time_created=None, kpis=None, status=None, analysis_id=None):  # noqa: E501
        """AnalysisSummary - a model defined in Swagger"""  # noqa: E501
        self._analysis_name = None
        self._start_date = None
        self._end_date = None
        self._time_created = None
        self._kpis = None
        self._status = None
        self._analysis_id = None
        self.discriminator = None
        self.analysis_name = analysis_name
        self.start_date = start_date
        self.end_date = end_date
        if time_created is not None:
            self.time_created = time_created
        if kpis is not None:
            self.kpis = kpis
        if status is not None:
            self.status = status
        self.analysis_id = analysis_id

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


        :return: The analysis_name of this AnalysisSummary.  # noqa: E501
        :rtype: str
        """
        return self._analysis_name

    @analysis_name.setter
    def analysis_name(self, analysis_name):
        """Sets the analysis_name of this AnalysisSummary.


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

        self._analysis_name = analysis_name

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


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

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


        :param start_date: The start_date of this AnalysisSummary.  # 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 AnalysisSummary.  # noqa: E501


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

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


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


        :return: The time_created of this AnalysisSummary.  # noqa: E501
        :rtype: datetime
        """
        return self._time_created

    @time_created.setter
    def time_created(self, time_created):
        """Sets the time_created of this AnalysisSummary.


        :param time_created: The time_created of this AnalysisSummary.  # noqa: E501
        :type: datetime
        """

        self._time_created = time_created

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


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

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


        :param kpis: The kpis of this AnalysisSummary.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["total_revenue", "average_revenue", "new_revenue", "total_cost", "profit", "churn"]  # 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 status(self):
        """Gets the status of this AnalysisSummary.  # noqa: E501

        * `running` - Running * `completed` - Completed * `failed` - Failed  # noqa: E501

        :return: The status of this AnalysisSummary.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this AnalysisSummary.

        * `running` - Running * `completed` - Completed * `failed` - Failed  # noqa: E501

        :param status: The status of this AnalysisSummary.  # noqa: E501
        :type: str
        """
        allowed_values = ["running", "completed", "failed"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The analysis_id of this AnalysisSummary.  # noqa: E501
        :rtype: str
        """
        return self._analysis_id

    @analysis_id.setter
    def analysis_id(self, analysis_id):
        """Sets the analysis_id of this AnalysisSummary.


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

        self._analysis_id = analysis_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
        if issubclass(AnalysisSummary, 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, AnalysisSummary):
            return False

        return self.__dict__ == other.__dict__

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