# 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 ComponentUsage(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 = {
        'event_name': 'str',
        'metric_name': 'str',
        'metric_id': 'str',
        'metric_usage': 'float',
        'metric_free_limit': 'float',
        'metric_total_limit': 'float'
    }

    attribute_map = {
        'event_name': 'event_name',
        'metric_name': 'metric_name',
        'metric_id': 'metric_id',
        'metric_usage': 'metric_usage',
        'metric_free_limit': 'metric_free_limit',
        'metric_total_limit': 'metric_total_limit'
    }

    def __init__(self, event_name=None, metric_name=None, metric_id=None, metric_usage=None, metric_free_limit=None, metric_total_limit=None):  # noqa: E501
        """ComponentUsage - a model defined in Swagger"""  # noqa: E501
        self._event_name = None
        self._metric_name = None
        self._metric_id = None
        self._metric_usage = None
        self._metric_free_limit = None
        self._metric_total_limit = None
        self.discriminator = None
        self.event_name = event_name
        self.metric_name = metric_name
        self.metric_id = metric_id
        self.metric_usage = metric_usage
        self.metric_free_limit = metric_free_limit
        self.metric_total_limit = metric_total_limit

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

        The name of the event you are checking access for.  # noqa: E501

        :return: The event_name of this ComponentUsage.  # noqa: E501
        :rtype: str
        """
        return self._event_name

    @event_name.setter
    def event_name(self, event_name):
        """Sets the event_name of this ComponentUsage.

        The name of the event you are checking access for.  # noqa: E501

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

        self._event_name = event_name

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

        The name of the metric.  # noqa: E501

        :return: The metric_name of this ComponentUsage.  # noqa: E501
        :rtype: str
        """
        return self._metric_name

    @metric_name.setter
    def metric_name(self, metric_name):
        """Sets the metric_name of this ComponentUsage.

        The name of the metric.  # noqa: E501

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

        self._metric_name = metric_name

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

        The metric_id of the metric. This metric_id can be found in the Lotus frontend if you haven't seen it before.  # noqa: E501

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

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

        The metric_id of the metric. This metric_id can be found in the Lotus frontend if you haven't seen it before.  # noqa: E501

        :param metric_id: The metric_id of this ComponentUsage.  # 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 metric_usage(self):
        """Gets the metric_usage of this ComponentUsage.  # noqa: E501

        The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric.  # noqa: E501

        :return: The metric_usage of this ComponentUsage.  # noqa: E501
        :rtype: float
        """
        return self._metric_usage

    @metric_usage.setter
    def metric_usage(self, metric_usage):
        """Sets the metric_usage of this ComponentUsage.

        The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric.  # noqa: E501

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

        self._metric_usage = metric_usage

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

        If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be null if you did not specify a free tier for this metric.  # noqa: E501

        :return: The metric_free_limit of this ComponentUsage.  # noqa: E501
        :rtype: float
        """
        return self._metric_free_limit

    @metric_free_limit.setter
    def metric_free_limit(self, metric_free_limit):
        """Sets the metric_free_limit of this ComponentUsage.

        If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be null if you did not specify a free tier for this metric.  # noqa: E501

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

        self._metric_free_limit = metric_free_limit

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

        The total limit of the metric. Will be null if you did not specify a limit for this metric.  # noqa: E501

        :return: The metric_total_limit of this ComponentUsage.  # noqa: E501
        :rtype: float
        """
        return self._metric_total_limit

    @metric_total_limit.setter
    def metric_total_limit(self, metric_total_limit):
        """Sets the metric_total_limit of this ComponentUsage.

        The total limit of the metric. Will be null if you did not specify a limit for this metric.  # noqa: E501

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

        self._metric_total_limit = metric_total_limit

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

        return self.__dict__ == other.__dict__

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