# coding: utf-8

"""
    PirlPay API

    The PirlPay API for automated payment processing  # noqa: E501

    OpenAPI spec version: v1
    Contact: support@pirl.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class BillingPlan(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 = {
        'id': 'str',
        'name': 'str',
        'description': 'str',
        'frequency': 'int',
        'activated': 'bool',
        'price': 'float',
        'currency': 'str'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'description': 'description',
        'frequency': 'frequency',
        'activated': 'activated',
        'price': 'price',
        'currency': 'currency'
    }

    def __init__(self, id=None, name=None, description=None, frequency=None, activated=None, price=None, currency=None):  # noqa: E501
        """BillingPlan - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._description = None
        self._frequency = None
        self._activated = None
        self._price = None
        self._currency = None
        self.discriminator = None
        if id is not None:
            self.id = id
        self.name = name
        self.description = description
        if frequency is not None:
            self.frequency = frequency
        if activated is not None:
            self.activated = activated
        self.price = price
        if currency is not None:
            self.currency = currency

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


        :return: The id of this BillingPlan.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this BillingPlan.


        :param id: The id of this BillingPlan.  # noqa: E501
        :type: str
        """

        self._id = id

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


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

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


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


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

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


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

        self._description = description

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

        1 DAY -- 2 WEEK -- 3 MONTH - 4 YEAR  # noqa: E501

        :return: The frequency of this BillingPlan.  # noqa: E501
        :rtype: int
        """
        return self._frequency

    @frequency.setter
    def frequency(self, frequency):
        """Sets the frequency of this BillingPlan.

        1 DAY -- 2 WEEK -- 3 MONTH - 4 YEAR  # noqa: E501

        :param frequency: The frequency of this BillingPlan.  # noqa: E501
        :type: int
        """

        self._frequency = frequency

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


        :return: The activated of this BillingPlan.  # noqa: E501
        :rtype: bool
        """
        return self._activated

    @activated.setter
    def activated(self, activated):
        """Sets the activated of this BillingPlan.


        :param activated: The activated of this BillingPlan.  # noqa: E501
        :type: bool
        """

        self._activated = activated

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


        :return: The price of this BillingPlan.  # noqa: E501
        :rtype: float
        """
        return self._price

    @price.setter
    def price(self, price):
        """Sets the price of this BillingPlan.


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

        self._price = price

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

        0 USD -- 1 EUR -- 2 MUR  # noqa: E501

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

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

        0 USD -- 1 EUR -- 2 MUR  # noqa: E501

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

        self._currency = currency

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

        return self.__dict__ == other.__dict__

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