# coding: utf-8

"""
    Spotii Billing API

    API for Billing  # noqa: E501

    OpenAPI spec version: v1.0
    Contact: hello@nuclearo.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class EsstimationPaymentSerilizer(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 = {
        'payment_id': 'str',
        'name': 'str',
        'description': 'str',
        'unit': 'str',
        'value': 'str',
        'calculated': 'CalculatedPaymentsSerilizer'
    }

    attribute_map = {
        'payment_id': 'payment_id',
        'name': 'name',
        'description': 'description',
        'unit': 'unit',
        'value': 'value',
        'calculated': 'calculated'
    }

    def __init__(self, payment_id=None, name=None, description=None, unit=None, value=None, calculated=None):  # noqa: E501
        """EsstimationPaymentSerilizer - a model defined in Swagger"""  # noqa: E501
        self._payment_id = None
        self._name = None
        self._description = None
        self._unit = None
        self._value = None
        self._calculated = None
        self.discriminator = None
        if payment_id is not None:
            self.payment_id = payment_id
        self.name = name
        if description is not None:
            self.description = description
        self.unit = unit
        self.value = value
        self.calculated = calculated

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


        :return: The payment_id of this EsstimationPaymentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._payment_id

    @payment_id.setter
    def payment_id(self, payment_id):
        """Sets the payment_id of this EsstimationPaymentSerilizer.


        :param payment_id: The payment_id of this EsstimationPaymentSerilizer.  # noqa: E501
        :type: str
        """

        self._payment_id = payment_id

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


        :return: The name of this EsstimationPaymentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this EsstimationPaymentSerilizer.


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

        self._name = name

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


        :return: The description of this EsstimationPaymentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this EsstimationPaymentSerilizer.


        :param description: The description of this EsstimationPaymentSerilizer.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The unit of this EsstimationPaymentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this EsstimationPaymentSerilizer.


        :param unit: The unit of this EsstimationPaymentSerilizer.  # noqa: E501
        :type: str
        """
        if unit is None:
            raise ValueError("Invalid value for `unit`, must not be `None`")  # noqa: E501
        allowed_values = ["FIXED", "PERCENTAGE"]  # noqa: E501
        if unit not in allowed_values:
            raise ValueError(
                "Invalid value for `unit` ({0}), must be one of {1}"  # noqa: E501
                .format(unit, allowed_values)
            )

        self._unit = unit

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


        :return: The value of this EsstimationPaymentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this EsstimationPaymentSerilizer.


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

        self._value = value

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


        :return: The calculated of this EsstimationPaymentSerilizer.  # noqa: E501
        :rtype: CalculatedPaymentsSerilizer
        """
        return self._calculated

    @calculated.setter
    def calculated(self, calculated):
        """Sets the calculated of this EsstimationPaymentSerilizer.


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

        self._calculated = calculated

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

        return self.__dict__ == other.__dict__

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