# 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 DCMESharingForCollaborationView(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 = {
        "borrowed_credentials": "list[str]",
        "shared_credentials": "list[str]",
        "users": "list[DCMEUserView]",
        "user_groups": "list[DCMEUserGroupView]",
    }

    attribute_map = {
        "borrowed_credentials": "borrowedCredentials",
        "shared_credentials": "sharedCredentials",
        "users": "users",
        "user_groups": "userGroups",
    }

    def __init__(
        self, borrowed_credentials=None, shared_credentials=None, users=None, user_groups=None, _configuration=None
    ):  # noqa: E501
        """DCMESharingForCollaborationView - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._borrowed_credentials = None
        self._shared_credentials = None
        self._users = None
        self._user_groups = None
        self.discriminator = None

        self.borrowed_credentials = borrowed_credentials
        self.shared_credentials = shared_credentials
        self.users = users
        self.user_groups = user_groups

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


        :return: The borrowed_credentials of this DCMESharingForCollaborationView.  # noqa: E501
        :rtype: list[str]
        """
        return self._borrowed_credentials

    @borrowed_credentials.setter
    def borrowed_credentials(self, borrowed_credentials):
        """Sets the borrowed_credentials of this DCMESharingForCollaborationView.


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

        self._borrowed_credentials = borrowed_credentials

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


        :return: The shared_credentials of this DCMESharingForCollaborationView.  # noqa: E501
        :rtype: list[str]
        """
        return self._shared_credentials

    @shared_credentials.setter
    def shared_credentials(self, shared_credentials):
        """Sets the shared_credentials of this DCMESharingForCollaborationView.


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

        self._shared_credentials = shared_credentials

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


        :return: The users of this DCMESharingForCollaborationView.  # noqa: E501
        :rtype: list[DCMEUserView]
        """
        return self._users

    @users.setter
    def users(self, users):
        """Sets the users of this DCMESharingForCollaborationView.


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

        self._users = users

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


        :return: The user_groups of this DCMESharingForCollaborationView.  # noqa: E501
        :rtype: list[DCMEUserGroupView]
        """
        return self._user_groups

    @user_groups.setter
    def user_groups(self, user_groups):
        """Sets the user_groups of this DCMESharingForCollaborationView.


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

        self._user_groups = user_groups

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

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