# coding: utf-8

"""
    Cudo Compute service

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from src.cudo_compute.configuration import Configuration


class ListUserPermissionsResponse(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 = {
        'billing_account_permissions': 'list[UserPermission]',
        'data_center_permissions': 'list[UserPermission]',
        'project_permissions': 'list[UserPermission]'
    }

    attribute_map = {
        'billing_account_permissions': 'billingAccountPermissions',
        'data_center_permissions': 'dataCenterPermissions',
        'project_permissions': 'projectPermissions'
    }

    def __init__(self, billing_account_permissions=None, data_center_permissions=None, project_permissions=None, _configuration=None):  # noqa: E501
        """ListUserPermissionsResponse - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._billing_account_permissions = None
        self._data_center_permissions = None
        self._project_permissions = None
        self.discriminator = None

        self.billing_account_permissions = billing_account_permissions
        self.data_center_permissions = data_center_permissions
        self.project_permissions = project_permissions

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


        :return: The billing_account_permissions of this ListUserPermissionsResponse.  # noqa: E501
        :rtype: list[UserPermission]
        """
        return self._billing_account_permissions

    @billing_account_permissions.setter
    def billing_account_permissions(self, billing_account_permissions):
        """Sets the billing_account_permissions of this ListUserPermissionsResponse.


        :param billing_account_permissions: The billing_account_permissions of this ListUserPermissionsResponse.  # noqa: E501
        :type: list[UserPermission]
        """
        if self._configuration.client_side_validation and billing_account_permissions is None:
            raise ValueError("Invalid value for `billing_account_permissions`, must not be `None`")  # noqa: E501

        self._billing_account_permissions = billing_account_permissions

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


        :return: The data_center_permissions of this ListUserPermissionsResponse.  # noqa: E501
        :rtype: list[UserPermission]
        """
        return self._data_center_permissions

    @data_center_permissions.setter
    def data_center_permissions(self, data_center_permissions):
        """Sets the data_center_permissions of this ListUserPermissionsResponse.


        :param data_center_permissions: The data_center_permissions of this ListUserPermissionsResponse.  # noqa: E501
        :type: list[UserPermission]
        """
        if self._configuration.client_side_validation and data_center_permissions is None:
            raise ValueError("Invalid value for `data_center_permissions`, must not be `None`")  # noqa: E501

        self._data_center_permissions = data_center_permissions

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


        :return: The project_permissions of this ListUserPermissionsResponse.  # noqa: E501
        :rtype: list[UserPermission]
        """
        return self._project_permissions

    @project_permissions.setter
    def project_permissions(self, project_permissions):
        """Sets the project_permissions of this ListUserPermissionsResponse.


        :param project_permissions: The project_permissions of this ListUserPermissionsResponse.  # noqa: E501
        :type: list[UserPermission]
        """
        if self._configuration.client_side_validation and project_permissions is None:
            raise ValueError("Invalid value for `project_permissions`, must not be `None`")  # noqa: E501

        self._project_permissions = project_permissions

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
