# coding: utf-8

"""
Alteryx Server API V3

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

OpenAPI spec version: 3

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

from src.server_client.configuration import Configuration


class CollectionsPermissionsViewContract(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 = {
        "is_admin": "bool",
        "can_add_assets": "bool",
        "can_remove_assets": "bool",
        "can_update_assets": "bool",
        "can_add_users": "bool",
        "can_remove_users": "bool",
    }

    attribute_map = {
        "is_admin": "isAdmin",
        "can_add_assets": "canAddAssets",
        "can_remove_assets": "canRemoveAssets",
        "can_update_assets": "canUpdateAssets",
        "can_add_users": "canAddUsers",
        "can_remove_users": "canRemoveUsers",
    }

    def __init__(
        self,
        is_admin=None,
        can_add_assets=None,
        can_remove_assets=None,
        can_update_assets=None,
        can_add_users=None,
        can_remove_users=None,
        _configuration=None,
    ):  # noqa: E501
        """CollectionsPermissionsViewContract - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._is_admin = None
        self._can_add_assets = None
        self._can_remove_assets = None
        self._can_update_assets = None
        self._can_add_users = None
        self._can_remove_users = None
        self.discriminator = None

        if is_admin is not None:
            self.is_admin = is_admin
        if can_add_assets is not None:
            self.can_add_assets = can_add_assets
        if can_remove_assets is not None:
            self.can_remove_assets = can_remove_assets
        if can_update_assets is not None:
            self.can_update_assets = can_update_assets
        if can_add_users is not None:
            self.can_add_users = can_add_users
        if can_remove_users is not None:
            self.can_remove_users = can_remove_users

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


        :return: The is_admin of this CollectionsPermissionsViewContract.  # noqa: E501
        :rtype: bool
        """
        return self._is_admin

    @is_admin.setter
    def is_admin(self, is_admin):
        """Sets the is_admin of this CollectionsPermissionsViewContract.


        :param is_admin: The is_admin of this CollectionsPermissionsViewContract.  # noqa: E501
        :type: bool
        """

        self._is_admin = is_admin

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


        :return: The can_add_assets of this CollectionsPermissionsViewContract.  # noqa: E501
        :rtype: bool
        """
        return self._can_add_assets

    @can_add_assets.setter
    def can_add_assets(self, can_add_assets):
        """Sets the can_add_assets of this CollectionsPermissionsViewContract.


        :param can_add_assets: The can_add_assets of this CollectionsPermissionsViewContract.  # noqa: E501
        :type: bool
        """

        self._can_add_assets = can_add_assets

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


        :return: The can_remove_assets of this CollectionsPermissionsViewContract.  # noqa: E501
        :rtype: bool
        """
        return self._can_remove_assets

    @can_remove_assets.setter
    def can_remove_assets(self, can_remove_assets):
        """Sets the can_remove_assets of this CollectionsPermissionsViewContract.


        :param can_remove_assets: The can_remove_assets of this CollectionsPermissionsViewContract.  # noqa: E501
        :type: bool
        """

        self._can_remove_assets = can_remove_assets

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


        :return: The can_update_assets of this CollectionsPermissionsViewContract.  # noqa: E501
        :rtype: bool
        """
        return self._can_update_assets

    @can_update_assets.setter
    def can_update_assets(self, can_update_assets):
        """Sets the can_update_assets of this CollectionsPermissionsViewContract.


        :param can_update_assets: The can_update_assets of this CollectionsPermissionsViewContract.  # noqa: E501
        :type: bool
        """

        self._can_update_assets = can_update_assets

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


        :return: The can_add_users of this CollectionsPermissionsViewContract.  # noqa: E501
        :rtype: bool
        """
        return self._can_add_users

    @can_add_users.setter
    def can_add_users(self, can_add_users):
        """Sets the can_add_users of this CollectionsPermissionsViewContract.


        :param can_add_users: The can_add_users of this CollectionsPermissionsViewContract.  # noqa: E501
        :type: bool
        """

        self._can_add_users = can_add_users

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


        :return: The can_remove_users of this CollectionsPermissionsViewContract.  # noqa: E501
        :rtype: bool
        """
        return self._can_remove_users

    @can_remove_users.setter
    def can_remove_users(self, can_remove_users):
        """Sets the can_remove_users of this CollectionsPermissionsViewContract.


        :param can_remove_users: The can_remove_users of this CollectionsPermissionsViewContract.  # noqa: E501
        :type: bool
        """

        self._can_remove_users = can_remove_users

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

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