# 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 InstallmentSerilizer(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 = {
        'installment_id': 'str',
        'effective_at': 'datetime',
        'status': 'str',
        'phase_id': 'str',
        'amount': 'str',
        'currency': 'str',
        'payments': 'list[EsstimationPaymentSerilizer]'
    }

    attribute_map = {
        'installment_id': 'installment_id',
        'effective_at': 'effective_at',
        'status': 'status',
        'phase_id': 'phase_id',
        'amount': 'amount',
        'currency': 'currency',
        'payments': 'payments'
    }

    def __init__(self, installment_id=None, effective_at=None, status=None, phase_id=None, amount=None, currency=None, payments=None):  # noqa: E501
        """InstallmentSerilizer - a model defined in Swagger"""  # noqa: E501
        self._installment_id = None
        self._effective_at = None
        self._status = None
        self._phase_id = None
        self._amount = None
        self._currency = None
        self._payments = None
        self.discriminator = None
        if installment_id is not None:
            self.installment_id = installment_id
        self.effective_at = effective_at
        if status is not None:
            self.status = status
        if phase_id is not None:
            self.phase_id = phase_id
        self.amount = amount
        self.currency = currency
        self.payments = payments

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


        :return: The installment_id of this InstallmentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._installment_id

    @installment_id.setter
    def installment_id(self, installment_id):
        """Sets the installment_id of this InstallmentSerilizer.


        :param installment_id: The installment_id of this InstallmentSerilizer.  # noqa: E501
        :type: str
        """

        self._installment_id = installment_id

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


        :return: The effective_at of this InstallmentSerilizer.  # noqa: E501
        :rtype: datetime
        """
        return self._effective_at

    @effective_at.setter
    def effective_at(self, effective_at):
        """Sets the effective_at of this InstallmentSerilizer.


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

        self._effective_at = effective_at

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


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

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


        :param status: The status of this InstallmentSerilizer.  # noqa: E501
        :type: str
        """

        self._status = status

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


        :return: The phase_id of this InstallmentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._phase_id

    @phase_id.setter
    def phase_id(self, phase_id):
        """Sets the phase_id of this InstallmentSerilizer.


        :param phase_id: The phase_id of this InstallmentSerilizer.  # noqa: E501
        :type: str
        """

        self._phase_id = phase_id

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


        :return: The amount of this InstallmentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this InstallmentSerilizer.


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

        self._amount = amount

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


        :return: The currency of this InstallmentSerilizer.  # noqa: E501
        :rtype: str
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this InstallmentSerilizer.


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

        self._currency = currency

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


        :return: The payments of this InstallmentSerilizer.  # noqa: E501
        :rtype: list[EsstimationPaymentSerilizer]
        """
        return self._payments

    @payments.setter
    def payments(self, payments):
        """Sets the payments of this InstallmentSerilizer.


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

        self._payments = payments

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

        return self.__dict__ == other.__dict__

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