# coding: utf-8

"""
    Kill Bill

    Kill Bill is an open-source billing and payments platform  # noqa: E501

    OpenAPI spec version: 0.22.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Tier(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 = {
        'limits': 'list[Limit]',
        'fixed_price': 'list[Price]',
        'recurring_price': 'list[Price]',
        'blocks': 'list[TieredBlock]'
    }

    attribute_map = {
        'limits': 'limits',
        'fixed_price': 'fixedPrice',
        'recurring_price': 'recurringPrice',
        'blocks': 'blocks'
    }

    def __init__(self, limits=None, fixed_price=None, recurring_price=None, blocks=None):  # noqa: E501
        """Tier - a model defined in Swagger"""  # noqa: E501
        self._limits = None
        self._fixed_price = None
        self._recurring_price = None
        self._blocks = None
        self.discriminator = None
        if limits is not None:
            self.limits = limits
        if fixed_price is not None:
            self.fixed_price = fixed_price
        if recurring_price is not None:
            self.recurring_price = recurring_price
        if blocks is not None:
            self.blocks = blocks

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


        :return: The limits of this Tier.  # noqa: E501
        :rtype: list[Limit]
        """
        return self._limits

    @limits.setter
    def limits(self, limits):
        """Sets the limits of this Tier.


        :param limits: The limits of this Tier.  # noqa: E501
        :type: list[Limit]
        """

        self._limits = limits

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


        :return: The fixed_price of this Tier.  # noqa: E501
        :rtype: list[Price]
        """
        return self._fixed_price

    @fixed_price.setter
    def fixed_price(self, fixed_price):
        """Sets the fixed_price of this Tier.


        :param fixed_price: The fixed_price of this Tier.  # noqa: E501
        :type: list[Price]
        """

        self._fixed_price = fixed_price

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


        :return: The recurring_price of this Tier.  # noqa: E501
        :rtype: list[Price]
        """
        return self._recurring_price

    @recurring_price.setter
    def recurring_price(self, recurring_price):
        """Sets the recurring_price of this Tier.


        :param recurring_price: The recurring_price of this Tier.  # noqa: E501
        :type: list[Price]
        """

        self._recurring_price = recurring_price

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


        :return: The blocks of this Tier.  # noqa: E501
        :rtype: list[TieredBlock]
        """
        return self._blocks

    @blocks.setter
    def blocks(self, blocks):
        """Sets the blocks of this Tier.


        :param blocks: The blocks of this Tier.  # noqa: E501
        :type: list[TieredBlock]
        """

        self._blocks = blocks

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

        return self.__dict__ == other.__dict__

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