# coding: utf-8

"""
    Tator REST API

    Interface to the Tator backend.  # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class GroupUpdateSpec(object):
    """
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'add_members': 'list[int]',
        'name': 'str',
        'remove_members': 'list[int]'
    }

    attribute_map = {
        'add_members': 'add_members',
        'name': 'name',
        'remove_members': 'remove_members'
    }

    def __init__(self, add_members=None, name=None, remove_members=None, local_vars_configuration=None):  # noqa: E501
        """GroupUpdateSpec - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._add_members = None
        self._name = None
        self._remove_members = None
        self.discriminator = None

        if add_members is not None:
            self.add_members = add_members
        if name is not None:
            self.name = name
        if remove_members is not None:
            self.remove_members = remove_members

    @property
    def add_members(self):
        """
        List of members to add to the group (user pk)

        :return: The add_members of this GroupUpdateSpec. 
        :rtype: list[int]
        """
        return self._add_members

    @add_members.setter
    def add_members(self, add_members):
        """
        List of members to add to the group (user pk)

        :param add_members: The add_members of this GroupUpdateSpec.
        :type: list[int]
        """

        self._add_members = add_members

    @property
    def name(self):
        """
        Group Name

        :return: The name of this GroupUpdateSpec. 
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Group Name

        :param name: The name of this GroupUpdateSpec.
        :type: str
        """

        self._name = name

    @property
    def remove_members(self):
        """
        List of members to add to the group (user pk)

        :return: The remove_members of this GroupUpdateSpec. 
        :rtype: list[int]
        """
        return self._remove_members

    @remove_members.setter
    def remove_members(self, remove_members):
        """
        List of members to add to the group (user pk)

        :param remove_members: The remove_members of this GroupUpdateSpec.
        :type: list[int]
        """

        self._remove_members = remove_members

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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