# 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 UsagePrice(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 = {
        'usage_name': 'str',
        'usage_type': 'str',
        'billing_mode': 'str',
        'tier_block_policy': 'str',
        'tier_prices': 'list[TierPrice]'
    }

    attribute_map = {
        'usage_name': 'usageName',
        'usage_type': 'usageType',
        'billing_mode': 'billingMode',
        'tier_block_policy': 'tierBlockPolicy',
        'tier_prices': 'tierPrices'
    }

    def __init__(self, usage_name=None, usage_type=None, billing_mode=None, tier_block_policy=None, tier_prices=None):  # noqa: E501
        """UsagePrice - a model defined in Swagger"""  # noqa: E501
        self._usage_name = None
        self._usage_type = None
        self._billing_mode = None
        self._tier_block_policy = None
        self._tier_prices = None
        self.discriminator = None
        if usage_name is not None:
            self.usage_name = usage_name
        if usage_type is not None:
            self.usage_type = usage_type
        if billing_mode is not None:
            self.billing_mode = billing_mode
        if tier_block_policy is not None:
            self.tier_block_policy = tier_block_policy
        if tier_prices is not None:
            self.tier_prices = tier_prices

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


        :return: The usage_name of this UsagePrice.  # noqa: E501
        :rtype: str
        """
        return self._usage_name

    @usage_name.setter
    def usage_name(self, usage_name):
        """Sets the usage_name of this UsagePrice.


        :param usage_name: The usage_name of this UsagePrice.  # noqa: E501
        :type: str
        """

        self._usage_name = usage_name

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


        :return: The usage_type of this UsagePrice.  # noqa: E501
        :rtype: str
        """
        return self._usage_type

    @usage_type.setter
    def usage_type(self, usage_type):
        """Sets the usage_type of this UsagePrice.


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

        self._usage_type = usage_type

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


        :return: The billing_mode of this UsagePrice.  # noqa: E501
        :rtype: str
        """
        return self._billing_mode

    @billing_mode.setter
    def billing_mode(self, billing_mode):
        """Sets the billing_mode of this UsagePrice.


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

        self._billing_mode = billing_mode

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


        :return: The tier_block_policy of this UsagePrice.  # noqa: E501
        :rtype: str
        """
        return self._tier_block_policy

    @tier_block_policy.setter
    def tier_block_policy(self, tier_block_policy):
        """Sets the tier_block_policy of this UsagePrice.


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

        self._tier_block_policy = tier_block_policy

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


        :return: The tier_prices of this UsagePrice.  # noqa: E501
        :rtype: list[TierPrice]
        """
        return self._tier_prices

    @tier_prices.setter
    def tier_prices(self, tier_prices):
        """Sets the tier_prices of this UsagePrice.


        :param tier_prices: The tier_prices of this UsagePrice.  # noqa: E501
        :type: list[TierPrice]
        """

        self._tier_prices = tier_prices

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

        return self.__dict__ == other.__dict__

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