# 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 FeatureAccessResponse(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',
        'feature': 'Feature',
        'access_per_subscription': 'list[FeatureAccessPerSubscription]'
    }

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

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

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


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

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


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

        Whether or not the customer has access to this feature. The default behavior for this is whether any of the customer's plans have access to this feature. If you have specified subscription filters, then this will be whether any of the customer's plans that match the subscription filters have access to this feature. 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 FeatureAccessResponse.  # noqa: E501
        :rtype: bool
        """
        return self._access

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

        Whether or not the customer has access to this feature. The default behavior for this is whether any of the customer's plans have access to this feature. If you have specified subscription filters, then this will be whether any of the customer's plans that match the subscription filters have access to this feature. 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 FeatureAccessResponse.  # 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 feature(self):
        """Gets the feature of this FeatureAccessResponse.  # noqa: E501


        :return: The feature of this FeatureAccessResponse.  # noqa: E501
        :rtype: Feature
        """
        return self._feature

    @feature.setter
    def feature(self, feature):
        """Sets the feature of this FeatureAccessResponse.


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

        self._feature = feature

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


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

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


        :param access_per_subscription: The access_per_subscription of this FeatureAccessResponse.  # noqa: E501
        :type: list[FeatureAccessPerSubscription]
        """
        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(FeatureAccessResponse, 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, FeatureAccessResponse):
            return False

        return self.__dict__ == other.__dict__

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