# coding: utf-8

"""
    ThingsBoard REST API

    For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>.  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: info@thingsboard.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class ShareGroupRequest(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 = {
        'all_user_group': 'bool',
        'owner_id': 'EntityId',
        'is_all_user_group': 'bool',
        'user_group_id': 'EntityGroupId',
        'read_else_write': 'bool',
        'role_ids': 'list[RoleId]'
    }

    attribute_map = {
        'all_user_group': 'allUserGroup',
        'owner_id': 'ownerId',
        'is_all_user_group': 'isAllUserGroup',
        'user_group_id': 'userGroupId',
        'read_else_write': 'readElseWrite',
        'role_ids': 'roleIds'
    }

    def __init__(self, all_user_group=None, owner_id=None, is_all_user_group=None, user_group_id=None, read_else_write=None, role_ids=None):  # noqa: E501
        """ShareGroupRequest - a model defined in Swagger"""  # noqa: E501

        self._all_user_group = None
        self._owner_id = None
        self._is_all_user_group = None
        self._user_group_id = None
        self._read_else_write = None
        self._role_ids = None
        self.discriminator = None

        if all_user_group is not None:
            self.all_user_group = all_user_group
        self.owner_id = owner_id
        self.is_all_user_group = is_all_user_group
        self.user_group_id = user_group_id
        self.read_else_write = read_else_write
        self.role_ids = role_ids

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


        :return: The all_user_group of this ShareGroupRequest.  # noqa: E501
        :rtype: bool
        """
        return self._all_user_group

    @all_user_group.setter
    def all_user_group(self, all_user_group):
        """Sets the all_user_group of this ShareGroupRequest.


        :param all_user_group: The all_user_group of this ShareGroupRequest.  # noqa: E501
        :type: bool
        """

        self._all_user_group = all_user_group

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


        :return: The owner_id of this ShareGroupRequest.  # noqa: E501
        :rtype: EntityId
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this ShareGroupRequest.


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

        self._owner_id = owner_id

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


        :return: The is_all_user_group of this ShareGroupRequest.  # noqa: E501
        :rtype: bool
        """
        return self._is_all_user_group

    @is_all_user_group.setter
    def is_all_user_group(self, is_all_user_group):
        """Sets the is_all_user_group of this ShareGroupRequest.


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

        self._is_all_user_group = is_all_user_group

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


        :return: The user_group_id of this ShareGroupRequest.  # noqa: E501
        :rtype: EntityGroupId
        """
        return self._user_group_id

    @user_group_id.setter
    def user_group_id(self, user_group_id):
        """Sets the user_group_id of this ShareGroupRequest.


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

        self._user_group_id = user_group_id

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


        :return: The read_else_write of this ShareGroupRequest.  # noqa: E501
        :rtype: bool
        """
        return self._read_else_write

    @read_else_write.setter
    def read_else_write(self, read_else_write):
        """Sets the read_else_write of this ShareGroupRequest.


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

        self._read_else_write = read_else_write

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


        :return: The role_ids of this ShareGroupRequest.  # noqa: E501
        :rtype: list[RoleId]
        """
        return self._role_ids

    @role_ids.setter
    def role_ids(self, role_ids):
        """Sets the role_ids of this ShareGroupRequest.


        :param role_ids: The role_ids of this ShareGroupRequest.  # noqa: E501
        :type: list[RoleId]
        """
        if role_ids is None:
            raise ValueError("Invalid value for `role_ids`, must not be `None`")  # noqa: E501

        self._role_ids = role_ids

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

        return self.__dict__ == other.__dict__

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