# 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 MetricAccessPerSubscription(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 = {
        'subscription': 'AccessMethodsSubscriptionRecord',
        'metric_usage': 'float',
        'metric_free_limit': 'float',
        'metric_total_limit': 'float'
    }

    attribute_map = {
        'subscription': 'subscription',
        'metric_usage': 'metric_usage',
        'metric_free_limit': 'metric_free_limit',
        'metric_total_limit': 'metric_total_limit'
    }

    def __init__(self, subscription=None, metric_usage=None, metric_free_limit=None, metric_total_limit=None):  # noqa: E501
        """MetricAccessPerSubscription - a model defined in Swagger"""  # noqa: E501
        self._subscription = None
        self._metric_usage = None
        self._metric_free_limit = None
        self._metric_total_limit = None
        self.discriminator = None
        self.subscription = subscription
        self.metric_usage = metric_usage
        self.metric_free_limit = metric_free_limit
        self.metric_total_limit = metric_total_limit

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


        :return: The subscription of this MetricAccessPerSubscription.  # noqa: E501
        :rtype: AccessMethodsSubscriptionRecord
        """
        return self._subscription

    @subscription.setter
    def subscription(self, subscription):
        """Sets the subscription of this MetricAccessPerSubscription.


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

        self._subscription = subscription

    @property
    def metric_usage(self):
        """Gets the metric_usage of this MetricAccessPerSubscription.  # 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. For examnple, for a gauge metric, the `metric_usage` is the current value of the gauge, while the billable usage is the accumulated tiem at each gauge level at the end of the subscription.  # noqa: E501

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

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

        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. For examnple, for a gauge metric, the `metric_usage` is the current value of the gauge, while the billable usage is the accumulated tiem at each gauge level at the end of the subscription.  # noqa: E501

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

        If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be 0 if you didn't specify a free limit for this metric or this subscription doesn't have access to this metric, and null if the free tier is unlimited.  # noqa: E501

        :return: The metric_free_limit of this MetricAccessPerSubscription.  # 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 MetricAccessPerSubscription.

        If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be 0 if you didn't specify a free limit for this metric or this subscription doesn't have access to this metric, and null if the free tier is unlimited.  # noqa: E501

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

        The total limit of the metric. Will be 0 if this subscription doesn't have access to this metric, and null if there is no limit to this metric.  # noqa: E501

        :return: The metric_total_limit of this MetricAccessPerSubscription.  # 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 MetricAccessPerSubscription.

        The total limit of the metric. Will be 0 if this subscription doesn't have access to this metric, and null if there is no limit to this metric.  # noqa: E501

        :param metric_total_limit: The metric_total_limit of this MetricAccessPerSubscription.  # 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(MetricAccessPerSubscription, 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, MetricAccessPerSubscription):
            return False

        return self.__dict__ == other.__dict__

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