# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class EdgeRegistryAccessCheckResponse(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 = {
        'user': 'EdgeRegistryUserChild',
        'repository': 'EdgeRegistryRepositoryChild',
        'prefixes': 'list[EdgeRegistryPrefixChild]',
        'has_global_rw': 'bool'
    }

    attribute_map = {
        'user': 'User',
        'repository': 'Repository',
        'prefixes': 'Prefixes',
        'has_global_rw': 'HasGlobalRW'
    }

    def __init__(self, user=None, repository=None, prefixes=None, has_global_rw=None):  # noqa: E501
        """EdgeRegistryAccessCheckResponse - a model defined in Swagger"""  # noqa: E501
        self._user = None
        self._repository = None
        self._prefixes = None
        self._has_global_rw = None
        self.discriminator = None
        self.user = user
        if repository is not None:
            self.repository = repository
        if prefixes is not None:
            self.prefixes = prefixes
        self.has_global_rw = has_global_rw

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


        :return: The user of this EdgeRegistryAccessCheckResponse.  # noqa: E501
        :rtype: EdgeRegistryUserChild
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this EdgeRegistryAccessCheckResponse.


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

        self._user = user

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


        :return: The repository of this EdgeRegistryAccessCheckResponse.  # noqa: E501
        :rtype: EdgeRegistryRepositoryChild
        """
        return self._repository

    @repository.setter
    def repository(self, repository):
        """Sets the repository of this EdgeRegistryAccessCheckResponse.


        :param repository: The repository of this EdgeRegistryAccessCheckResponse.  # noqa: E501
        :type: EdgeRegistryRepositoryChild
        """

        self._repository = repository

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


        :return: The prefixes of this EdgeRegistryAccessCheckResponse.  # noqa: E501
        :rtype: list[EdgeRegistryPrefixChild]
        """
        return self._prefixes

    @prefixes.setter
    def prefixes(self, prefixes):
        """Sets the prefixes of this EdgeRegistryAccessCheckResponse.


        :param prefixes: The prefixes of this EdgeRegistryAccessCheckResponse.  # noqa: E501
        :type: list[EdgeRegistryPrefixChild]
        """

        self._prefixes = prefixes

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


        :return: The has_global_rw of this EdgeRegistryAccessCheckResponse.  # noqa: E501
        :rtype: bool
        """
        return self._has_global_rw

    @has_global_rw.setter
    def has_global_rw(self, has_global_rw):
        """Sets the has_global_rw of this EdgeRegistryAccessCheckResponse.


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

        self._has_global_rw = has_global_rw

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

        return self.__dict__ == other.__dict__

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