# coding: utf-8

"""
    Lotus API

    Lotus is an open-core pricing and billing engine. We enable API companies to automate and optimize their custom usage-based pricing for any metric.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class PlanComponentCreateRequest(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 = {
        'metric_id': 'str',
        'tiers': 'list[PriceTierCreateRequest]',
        'invoicing_interval_unit': 'str',
        'invoicing_interval_count': 'int',
        'reset_interval_unit': 'str',
        'reset_interval_count': 'int',
        'prepaid_charge': 'AllOfPlanComponentCreateRequestPrepaidCharge',
        'bulk_pricing_enabled': 'bool'
    }

    attribute_map = {
        'metric_id': 'metric_id',
        'tiers': 'tiers',
        'invoicing_interval_unit': 'invoicing_interval_unit',
        'invoicing_interval_count': 'invoicing_interval_count',
        'reset_interval_unit': 'reset_interval_unit',
        'reset_interval_count': 'reset_interval_count',
        'prepaid_charge': 'prepaid_charge',
        'bulk_pricing_enabled': 'bulk_pricing_enabled'
    }

    def __init__(self, metric_id=None, tiers=None, invoicing_interval_unit=None, invoicing_interval_count=None, reset_interval_unit=None, reset_interval_count=None, prepaid_charge=None, bulk_pricing_enabled=False):  # noqa: E501
        """PlanComponentCreateRequest - a model defined in Swagger"""  # noqa: E501
        self._metric_id = None
        self._tiers = None
        self._invoicing_interval_unit = None
        self._invoicing_interval_count = None
        self._reset_interval_unit = None
        self._reset_interval_count = None
        self._prepaid_charge = None
        self._bulk_pricing_enabled = None
        self.discriminator = None
        self.metric_id = metric_id
        if tiers is not None:
            self.tiers = tiers
        if invoicing_interval_unit is not None:
            self.invoicing_interval_unit = invoicing_interval_unit
        if invoicing_interval_count is not None:
            self.invoicing_interval_count = invoicing_interval_count
        if reset_interval_unit is not None:
            self.reset_interval_unit = reset_interval_unit
        if reset_interval_count is not None:
            self.reset_interval_count = reset_interval_count
        if prepaid_charge is not None:
            self.prepaid_charge = prepaid_charge
        if bulk_pricing_enabled is not None:
            self.bulk_pricing_enabled = bulk_pricing_enabled

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


        :return: The metric_id of this PlanComponentCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._metric_id

    @metric_id.setter
    def metric_id(self, metric_id):
        """Sets the metric_id of this PlanComponentCreateRequest.


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

        self._metric_id = metric_id

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


        :return: The tiers of this PlanComponentCreateRequest.  # noqa: E501
        :rtype: list[PriceTierCreateRequest]
        """
        return self._tiers

    @tiers.setter
    def tiers(self, tiers):
        """Sets the tiers of this PlanComponentCreateRequest.


        :param tiers: The tiers of this PlanComponentCreateRequest.  # noqa: E501
        :type: list[PriceTierCreateRequest]
        """

        self._tiers = tiers

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

        * `day` - day * `week` - week * `month` - month * `year` - year  # noqa: E501

        :return: The invoicing_interval_unit of this PlanComponentCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._invoicing_interval_unit

    @invoicing_interval_unit.setter
    def invoicing_interval_unit(self, invoicing_interval_unit):
        """Sets the invoicing_interval_unit of this PlanComponentCreateRequest.

        * `day` - day * `week` - week * `month` - month * `year` - year  # noqa: E501

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

        self._invoicing_interval_unit = invoicing_interval_unit

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


        :return: The invoicing_interval_count of this PlanComponentCreateRequest.  # noqa: E501
        :rtype: int
        """
        return self._invoicing_interval_count

    @invoicing_interval_count.setter
    def invoicing_interval_count(self, invoicing_interval_count):
        """Sets the invoicing_interval_count of this PlanComponentCreateRequest.


        :param invoicing_interval_count: The invoicing_interval_count of this PlanComponentCreateRequest.  # noqa: E501
        :type: int
        """

        self._invoicing_interval_count = invoicing_interval_count

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

        * `day` - day * `week` - week * `month` - month * `year` - year  # noqa: E501

        :return: The reset_interval_unit of this PlanComponentCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._reset_interval_unit

    @reset_interval_unit.setter
    def reset_interval_unit(self, reset_interval_unit):
        """Sets the reset_interval_unit of this PlanComponentCreateRequest.

        * `day` - day * `week` - week * `month` - month * `year` - year  # noqa: E501

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

        self._reset_interval_unit = reset_interval_unit

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


        :return: The reset_interval_count of this PlanComponentCreateRequest.  # noqa: E501
        :rtype: int
        """
        return self._reset_interval_count

    @reset_interval_count.setter
    def reset_interval_count(self, reset_interval_count):
        """Sets the reset_interval_count of this PlanComponentCreateRequest.


        :param reset_interval_count: The reset_interval_count of this PlanComponentCreateRequest.  # noqa: E501
        :type: int
        """

        self._reset_interval_count = reset_interval_count

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


        :return: The prepaid_charge of this PlanComponentCreateRequest.  # noqa: E501
        :rtype: AllOfPlanComponentCreateRequestPrepaidCharge
        """
        return self._prepaid_charge

    @prepaid_charge.setter
    def prepaid_charge(self, prepaid_charge):
        """Sets the prepaid_charge of this PlanComponentCreateRequest.


        :param prepaid_charge: The prepaid_charge of this PlanComponentCreateRequest.  # noqa: E501
        :type: AllOfPlanComponentCreateRequestPrepaidCharge
        """

        self._prepaid_charge = prepaid_charge

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


        :return: The bulk_pricing_enabled of this PlanComponentCreateRequest.  # noqa: E501
        :rtype: bool
        """
        return self._bulk_pricing_enabled

    @bulk_pricing_enabled.setter
    def bulk_pricing_enabled(self, bulk_pricing_enabled):
        """Sets the bulk_pricing_enabled of this PlanComponentCreateRequest.


        :param bulk_pricing_enabled: The bulk_pricing_enabled of this PlanComponentCreateRequest.  # noqa: E501
        :type: bool
        """

        self._bulk_pricing_enabled = bulk_pricing_enabled

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

        return self.__dict__ == other.__dict__

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