# 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 CostAnalysis(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 = {
        'per_day': 'list[SingleDayCostAnalysis]',
        'total_cost': 'float',
        'total_revenue': 'float',
        'profit_margin': 'float',
        'markup': 'float'
    }

    attribute_map = {
        'per_day': 'per_day',
        'total_cost': 'total_cost',
        'total_revenue': 'total_revenue',
        'profit_margin': 'profit_margin',
        'markup': 'markup'
    }

    def __init__(self, per_day=None, total_cost=None, total_revenue=None, profit_margin=None, markup=None):  # noqa: E501
        """CostAnalysis - a model defined in Swagger"""  # noqa: E501
        self._per_day = None
        self._total_cost = None
        self._total_revenue = None
        self._profit_margin = None
        self._markup = None
        self.discriminator = None
        self.per_day = per_day
        self.total_cost = total_cost
        self.total_revenue = total_revenue
        self.profit_margin = profit_margin
        self.markup = markup

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


        :return: The per_day of this CostAnalysis.  # noqa: E501
        :rtype: list[SingleDayCostAnalysis]
        """
        return self._per_day

    @per_day.setter
    def per_day(self, per_day):
        """Sets the per_day of this CostAnalysis.


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

        self._per_day = per_day

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


        :return: The total_cost of this CostAnalysis.  # noqa: E501
        :rtype: float
        """
        return self._total_cost

    @total_cost.setter
    def total_cost(self, total_cost):
        """Sets the total_cost of this CostAnalysis.


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

        self._total_cost = total_cost

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


        :return: The total_revenue of this CostAnalysis.  # noqa: E501
        :rtype: float
        """
        return self._total_revenue

    @total_revenue.setter
    def total_revenue(self, total_revenue):
        """Sets the total_revenue of this CostAnalysis.


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

        self._total_revenue = total_revenue

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


        :return: The profit_margin of this CostAnalysis.  # noqa: E501
        :rtype: float
        """
        return self._profit_margin

    @profit_margin.setter
    def profit_margin(self, profit_margin):
        """Sets the profit_margin of this CostAnalysis.


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

        self._profit_margin = profit_margin

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


        :return: The markup of this CostAnalysis.  # noqa: E501
        :rtype: float
        """
        return self._markup

    @markup.setter
    def markup(self, markup):
        """Sets the markup of this CostAnalysis.


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

        self._markup = markup

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

        return self.__dict__ == other.__dict__

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