# 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 SingleSubstitution(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 = {
        'substitution_name': 'str',
        'original_plan': 'PlanRepresentation',
        'new_plan': 'PlanRepresentation',
        'pct_revenue_change': 'float',
        'results': 'SingleSubstitutionResults'
    }

    attribute_map = {
        'substitution_name': 'substitution_name',
        'original_plan': 'original_plan',
        'new_plan': 'new_plan',
        'pct_revenue_change': 'pct_revenue_change',
        'results': 'results'
    }

    def __init__(self, substitution_name=None, original_plan=None, new_plan=None, pct_revenue_change=None, results=None):  # noqa: E501
        """SingleSubstitution - a model defined in Swagger"""  # noqa: E501
        self._substitution_name = None
        self._original_plan = None
        self._new_plan = None
        self._pct_revenue_change = None
        self._results = None
        self.discriminator = None
        self.substitution_name = substitution_name
        self.original_plan = original_plan
        self.new_plan = new_plan
        self.pct_revenue_change = pct_revenue_change
        self.results = results

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


        :return: The substitution_name of this SingleSubstitution.  # noqa: E501
        :rtype: str
        """
        return self._substitution_name

    @substitution_name.setter
    def substitution_name(self, substitution_name):
        """Sets the substitution_name of this SingleSubstitution.


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

        self._substitution_name = substitution_name

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


        :return: The original_plan of this SingleSubstitution.  # noqa: E501
        :rtype: PlanRepresentation
        """
        return self._original_plan

    @original_plan.setter
    def original_plan(self, original_plan):
        """Sets the original_plan of this SingleSubstitution.


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

        self._original_plan = original_plan

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


        :return: The new_plan of this SingleSubstitution.  # noqa: E501
        :rtype: PlanRepresentation
        """
        return self._new_plan

    @new_plan.setter
    def new_plan(self, new_plan):
        """Sets the new_plan of this SingleSubstitution.


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

        self._new_plan = new_plan

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


        :return: The pct_revenue_change of this SingleSubstitution.  # noqa: E501
        :rtype: float
        """
        return self._pct_revenue_change

    @pct_revenue_change.setter
    def pct_revenue_change(self, pct_revenue_change):
        """Sets the pct_revenue_change of this SingleSubstitution.


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

        self._pct_revenue_change = pct_revenue_change

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


        :return: The results of this SingleSubstitution.  # noqa: E501
        :rtype: SingleSubstitutionResults
        """
        return self._results

    @results.setter
    def results(self, results):
        """Sets the results of this SingleSubstitution.


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

        self._results = results

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

        return self.__dict__ == other.__dict__

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