# coding: utf-8

"""
    Vidispine API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class UserType(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    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 = {
        'user_name': 'str',
        'loc': 'str',
        'real_name': 'str',
        'access_preserved': 'bool',
        'remove': 'bool',
        'group_list': 'GroupListType',
        'disabled': 'bool',
        'alias': 'list[str]',
        'password': 'str',
        'salt': 'str',
        'id': 'str',
        'origin': 'str',
        'metadata': 'SimpleMetadataType'
    }

    attribute_map = {
        'user_name': 'userName',
        'loc': 'loc',
        'real_name': 'realName',
        'access_preserved': 'accessPreserved',
        'remove': 'remove',
        'group_list': 'groupList',
        'disabled': 'disabled',
        'alias': 'alias',
        'password': 'password',
        'salt': 'salt',
        'id': 'id',
        'origin': 'origin',
        'metadata': 'metadata'
    }

    def __init__(self, user_name=None, loc=None, real_name=None, access_preserved=None, remove=None, group_list=None, disabled=None, alias=None, password=None, salt=None, id=None, origin=None, metadata=None):  # noqa: E501
        """UserType - a model defined in OpenAPI"""  # noqa: E501

        self._user_name = None
        self._loc = None
        self._real_name = None
        self._access_preserved = None
        self._remove = None
        self._group_list = None
        self._disabled = None
        self._alias = None
        self._password = None
        self._salt = None
        self._id = None
        self._origin = None
        self._metadata = None
        self.discriminator = None

        self.user_name = user_name
        if loc is not None:
            self.loc = loc
        if real_name is not None:
            self.real_name = real_name
        if access_preserved is not None:
            self.access_preserved = access_preserved
        if remove is not None:
            self.remove = remove
        if group_list is not None:
            self.group_list = group_list
        if disabled is not None:
            self.disabled = disabled
        if alias is not None:
            self.alias = alias
        if password is not None:
            self.password = password
        if salt is not None:
            self.salt = salt
        if id is not None:
            self.id = id
        if origin is not None:
            self.origin = origin
        if metadata is not None:
            self.metadata = metadata

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


        :return: The user_name of this UserType.  # noqa: E501
        :rtype: str
        """
        return self._user_name

    @user_name.setter
    def user_name(self, user_name):
        """Sets the user_name of this UserType.


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

        self._user_name = user_name

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


        :return: The loc of this UserType.  # noqa: E501
        :rtype: str
        """
        return self._loc

    @loc.setter
    def loc(self, loc):
        """Sets the loc of this UserType.


        :param loc: The loc of this UserType.  # noqa: E501
        :type: str
        """

        self._loc = loc

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


        :return: The real_name of this UserType.  # noqa: E501
        :rtype: str
        """
        return self._real_name

    @real_name.setter
    def real_name(self, real_name):
        """Sets the real_name of this UserType.


        :param real_name: The real_name of this UserType.  # noqa: E501
        :type: str
        """

        self._real_name = real_name

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


        :return: The access_preserved of this UserType.  # noqa: E501
        :rtype: bool
        """
        return self._access_preserved

    @access_preserved.setter
    def access_preserved(self, access_preserved):
        """Sets the access_preserved of this UserType.


        :param access_preserved: The access_preserved of this UserType.  # noqa: E501
        :type: bool
        """

        self._access_preserved = access_preserved

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


        :return: The remove of this UserType.  # noqa: E501
        :rtype: bool
        """
        return self._remove

    @remove.setter
    def remove(self, remove):
        """Sets the remove of this UserType.


        :param remove: The remove of this UserType.  # noqa: E501
        :type: bool
        """

        self._remove = remove

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


        :return: The group_list of this UserType.  # noqa: E501
        :rtype: GroupListType
        """
        return self._group_list

    @group_list.setter
    def group_list(self, group_list):
        """Sets the group_list of this UserType.


        :param group_list: The group_list of this UserType.  # noqa: E501
        :type: GroupListType
        """

        self._group_list = group_list

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


        :return: The disabled of this UserType.  # noqa: E501
        :rtype: bool
        """
        return self._disabled

    @disabled.setter
    def disabled(self, disabled):
        """Sets the disabled of this UserType.


        :param disabled: The disabled of this UserType.  # noqa: E501
        :type: bool
        """

        self._disabled = disabled

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


        :return: The alias of this UserType.  # noqa: E501
        :rtype: list[str]
        """
        return self._alias

    @alias.setter
    def alias(self, alias):
        """Sets the alias of this UserType.


        :param alias: The alias of this UserType.  # noqa: E501
        :type: list[str]
        """

        self._alias = alias

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


        :return: The password of this UserType.  # noqa: E501
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """Sets the password of this UserType.


        :param password: The password of this UserType.  # noqa: E501
        :type: str
        """

        self._password = password

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


        :return: The salt of this UserType.  # noqa: E501
        :rtype: str
        """
        return self._salt

    @salt.setter
    def salt(self, salt):
        """Sets the salt of this UserType.


        :param salt: The salt of this UserType.  # noqa: E501
        :type: str
        """

        self._salt = salt

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


        :return: The id of this UserType.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this UserType.


        :param id: The id of this UserType.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The origin of this UserType.  # noqa: E501
        :rtype: str
        """
        return self._origin

    @origin.setter
    def origin(self, origin):
        """Sets the origin of this UserType.


        :param origin: The origin of this UserType.  # noqa: E501
        :type: str
        """

        self._origin = origin

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


        :return: The metadata of this UserType.  # noqa: E501
        :rtype: SimpleMetadataType
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this UserType.


        :param metadata: The metadata of this UserType.  # noqa: E501
        :type: SimpleMetadataType
        """

        self._metadata = metadata

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

        return self.__dict__ == other.__dict__

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