# 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 MetricAccessResponse(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 = {
        'customer': 'LightweightCustomer',
        'access': 'bool',
        'metric': 'LightweightMetric',
        'access_per_subscription': 'list[MetricAccessPerSubscription]'
    }

    attribute_map = {
        'customer': 'customer',
        'access': 'access',
        'metric': 'metric',
        'access_per_subscription': 'access_per_subscription'
    }

    def __init__(self, customer=None, access=None, metric=None, access_per_subscription=None):  # noqa: E501
        """MetricAccessResponse - a model defined in Swagger"""  # noqa: E501
        self._customer = None
        self._access = None
        self._metric = None
        self._access_per_subscription = None
        self.discriminator = None
        self.customer = customer
        self.access = access
        self.metric = metric
        self.access_per_subscription = access_per_subscription

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


        :return: The customer of this MetricAccessResponse.  # noqa: E501
        :rtype: LightweightCustomer
        """
        return self._customer

    @customer.setter
    def customer(self, customer):
        """Sets the customer of this MetricAccessResponse.


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

        self._customer = customer

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

        Whether or not the customer has access to this metric. The default behavior for this is whether all of the customer's plans (that have access to the metric) are below the total limit of the metric. If you have specified subscription filters, then this will be whether all of the customer's plans that match the subscription filters are below the total limit of the metric. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend.  # noqa: E501

        :return: The access of this MetricAccessResponse.  # noqa: E501
        :rtype: bool
        """
        return self._access

    @access.setter
    def access(self, access):
        """Sets the access of this MetricAccessResponse.

        Whether or not the customer has access to this metric. The default behavior for this is whether all of the customer's plans (that have access to the metric) are below the total limit of the metric. If you have specified subscription filters, then this will be whether all of the customer's plans that match the subscription filters are below the total limit of the metric. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend.  # noqa: E501

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

        self._access = access

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


        :return: The metric of this MetricAccessResponse.  # noqa: E501
        :rtype: LightweightMetric
        """
        return self._metric

    @metric.setter
    def metric(self, metric):
        """Sets the metric of this MetricAccessResponse.


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

        self._metric = metric

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


        :return: The access_per_subscription of this MetricAccessResponse.  # noqa: E501
        :rtype: list[MetricAccessPerSubscription]
        """
        return self._access_per_subscription

    @access_per_subscription.setter
    def access_per_subscription(self, access_per_subscription):
        """Sets the access_per_subscription of this MetricAccessResponse.


        :param access_per_subscription: The access_per_subscription of this MetricAccessResponse.  # noqa: E501
        :type: list[MetricAccessPerSubscription]
        """
        if access_per_subscription is None:
            raise ValueError("Invalid value for `access_per_subscription`, must not be `None`")  # noqa: E501

        self._access_per_subscription = access_per_subscription

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

        return self.__dict__ == other.__dict__

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