# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class UsersPermissions(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 = {
        'search': 'bool',
        'view_profile': 'bool',
        'map': 'bool',
        'contacts': 'bool'
    }

    attribute_map = {
        'search': 'search',
        'view_profile': 'viewProfile',
        'map': 'map',
        'contacts': 'contacts'
    }

    def __init__(self, search=None, view_profile=None, map=None, contacts=None, _configuration=None):  # noqa: E501
        """UsersPermissions - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._search = None
        self._view_profile = None
        self._map = None
        self._contacts = None
        self.discriminator = None

        if search is not None:
            self.search = search
        if view_profile is not None:
            self.view_profile = view_profile
        if map is not None:
            self.map = map
        if contacts is not None:
            self.contacts = contacts

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

        Permission to search other users  # noqa: E501

        :return: The search of this UsersPermissions.  # noqa: E501
        :rtype: bool
        """
        return self._search

    @search.setter
    def search(self, search):
        """Sets the search of this UsersPermissions.

        Permission to search other users  # noqa: E501

        :param search: The search of this UsersPermissions.  # noqa: E501
        :type: bool
        """

        self._search = search

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

        General permission to view the profile of other users. A fine-grained permission over specific groups can be configured. When attempting to view the profile of a user without permission, only very basic information is returned instead.   # noqa: E501

        :return: The view_profile of this UsersPermissions.  # noqa: E501
        :rtype: bool
        """
        return self._view_profile

    @view_profile.setter
    def view_profile(self, view_profile):
        """Sets the view_profile of this UsersPermissions.

        General permission to view the profile of other users. A fine-grained permission over specific groups can be configured. When attempting to view the profile of a user without permission, only very basic information is returned instead.   # noqa: E501

        :param view_profile: The view_profile of this UsersPermissions.  # noqa: E501
        :type: bool
        """

        self._view_profile = view_profile

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

        Permission to view the user map directory  # noqa: E501

        :return: The map of this UsersPermissions.  # noqa: E501
        :rtype: bool
        """
        return self._map

    @map.setter
    def map(self, map):
        """Sets the map of this UsersPermissions.

        Permission to view the user map directory  # noqa: E501

        :param map: The map of this UsersPermissions.  # noqa: E501
        :type: bool
        """

        self._map = map

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

        (Deprecated) Permission to own a contact list. Only returned if there is an authenticated user.   # noqa: E501

        :return: The contacts of this UsersPermissions.  # noqa: E501
        :rtype: bool
        """
        return self._contacts

    @contacts.setter
    def contacts(self, contacts):
        """Sets the contacts of this UsersPermissions.

        (Deprecated) Permission to own a contact list. Only returned if there is an authenticated user.   # noqa: E501

        :param contacts: The contacts of this UsersPermissions.  # noqa: E501
        :type: bool
        """

        self._contacts = contacts

    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(UsersPermissions, 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, UsersPermissions):
            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, UsersPermissions):
            return True

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