# 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 UserView(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 = {
        "id": "str",
        "first_name": "str",
        "last_name": "str",
        "email": "str",
        "role": "str",
        "default_worker_tag": "str",
        "can_schedule_jobs": "bool",
        "can_prioritize_jobs": "bool",
        "can_assign_jobs": "bool",
        "can_create_collections": "bool",
        "is_api_enabled": "bool",
        "default_credential_id": "str",
        "is_account_locked": "bool",
        "is_active": "bool",
        "last_login_date_time": "datetime",
        "is_validated": "bool",
        "shared_credential_ids": "list[str]",
        "data_connection_ids": "list[str]",
        "time_zone": "str",
        "language": "str",
        "can_create_and_update_dcm": "bool",
        "can_share_for_execution_dcm": "bool",
        "can_share_for_collaboration_dcm": "bool",
        "can_manage_generic_vaults_dcm": "bool",
    }

    attribute_map = {
        "id": "id",
        "first_name": "firstName",
        "last_name": "lastName",
        "email": "email",
        "role": "role",
        "default_worker_tag": "defaultWorkerTag",
        "can_schedule_jobs": "canScheduleJobs",
        "can_prioritize_jobs": "canPrioritizeJobs",
        "can_assign_jobs": "canAssignJobs",
        "can_create_collections": "canCreateCollections",
        "is_api_enabled": "isApiEnabled",
        "default_credential_id": "defaultCredentialId",
        "is_account_locked": "isAccountLocked",
        "is_active": "isActive",
        "last_login_date_time": "lastLoginDateTime",
        "is_validated": "isValidated",
        "shared_credential_ids": "sharedCredentialIds",
        "data_connection_ids": "dataConnectionIds",
        "time_zone": "timeZone",
        "language": "language",
        "can_create_and_update_dcm": "canCreateAndUpdateDcm",
        "can_share_for_execution_dcm": "canShareForExecutionDcm",
        "can_share_for_collaboration_dcm": "canShareForCollaborationDcm",
        "can_manage_generic_vaults_dcm": "canManageGenericVaultsDcm",
    }

    def __init__(
        self,
        id=None,
        first_name=None,
        last_name=None,
        email=None,
        role=None,
        default_worker_tag=None,
        can_schedule_jobs=None,
        can_prioritize_jobs=None,
        can_assign_jobs=None,
        can_create_collections=None,
        is_api_enabled=None,
        default_credential_id=None,
        is_account_locked=None,
        is_active=None,
        last_login_date_time=None,
        is_validated=None,
        shared_credential_ids=None,
        data_connection_ids=None,
        time_zone=None,
        language=None,
        can_create_and_update_dcm=None,
        can_share_for_execution_dcm=None,
        can_share_for_collaboration_dcm=None,
        can_manage_generic_vaults_dcm=None,
        _configuration=None,
    ):  # noqa: E501
        """UserView - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._first_name = None
        self._last_name = None
        self._email = None
        self._role = None
        self._default_worker_tag = None
        self._can_schedule_jobs = None
        self._can_prioritize_jobs = None
        self._can_assign_jobs = None
        self._can_create_collections = None
        self._is_api_enabled = None
        self._default_credential_id = None
        self._is_account_locked = None
        self._is_active = None
        self._last_login_date_time = None
        self._is_validated = None
        self._shared_credential_ids = None
        self._data_connection_ids = None
        self._time_zone = None
        self._language = None
        self._can_create_and_update_dcm = None
        self._can_share_for_execution_dcm = None
        self._can_share_for_collaboration_dcm = None
        self._can_manage_generic_vaults_dcm = None
        self.discriminator = None

        self.id = id
        self.first_name = first_name
        self.last_name = last_name
        self.email = email
        self.role = role
        self.default_worker_tag = default_worker_tag
        self.can_schedule_jobs = can_schedule_jobs
        self.can_prioritize_jobs = can_prioritize_jobs
        self.can_assign_jobs = can_assign_jobs
        self.can_create_collections = can_create_collections
        self.is_api_enabled = is_api_enabled
        if default_credential_id is not None:
            self.default_credential_id = default_credential_id
        self.is_account_locked = is_account_locked
        self.is_active = is_active
        if last_login_date_time is not None:
            self.last_login_date_time = last_login_date_time
        self.is_validated = is_validated
        if shared_credential_ids is not None:
            self.shared_credential_ids = shared_credential_ids
        if data_connection_ids is not None:
            self.data_connection_ids = data_connection_ids
        if time_zone is not None:
            self.time_zone = time_zone
        if language is not None:
            self.language = language
        self.can_create_and_update_dcm = can_create_and_update_dcm
        self.can_share_for_execution_dcm = can_share_for_execution_dcm
        self.can_share_for_collaboration_dcm = can_share_for_collaboration_dcm
        self.can_manage_generic_vaults_dcm = can_manage_generic_vaults_dcm

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


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

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


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

        self._id = id

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


        :return: The first_name of this UserView.  # noqa: E501
        :rtype: str
        """
        return self._first_name

    @first_name.setter
    def first_name(self, first_name):
        """Sets the first_name of this UserView.


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

        self._first_name = first_name

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


        :return: The last_name of this UserView.  # noqa: E501
        :rtype: str
        """
        return self._last_name

    @last_name.setter
    def last_name(self, last_name):
        """Sets the last_name of this UserView.


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

        self._last_name = last_name

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


        :return: The email of this UserView.  # noqa: E501
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """Sets the email of this UserView.


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

        self._email = email

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


        :return: The role of this UserView.  # noqa: E501
        :rtype: str
        """
        return self._role

    @role.setter
    def role(self, role):
        """Sets the role of this UserView.


        :param role: The role of this UserView.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and role is None:
            raise ValueError("Invalid value for `role`, must not be `None`")  # noqa: E501
        allowed_values = ["NoAccess", "Viewer", "Member", "Artisan", "Curator", "Evaluated"]  # noqa: E501
        if self._configuration.client_side_validation and role not in allowed_values:
            raise ValueError(
                "Invalid value for `role` ({0}), must be one of {1}".format(role, allowed_values)  # noqa: E501
            )

        self._role = role

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


        :return: The default_worker_tag of this UserView.  # noqa: E501
        :rtype: str
        """
        return self._default_worker_tag

    @default_worker_tag.setter
    def default_worker_tag(self, default_worker_tag):
        """Sets the default_worker_tag of this UserView.


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

        self._default_worker_tag = default_worker_tag

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


        :return: The can_schedule_jobs of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._can_schedule_jobs

    @can_schedule_jobs.setter
    def can_schedule_jobs(self, can_schedule_jobs):
        """Sets the can_schedule_jobs of this UserView.


        :param can_schedule_jobs: The can_schedule_jobs of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_schedule_jobs is None:
            raise ValueError("Invalid value for `can_schedule_jobs`, must not be `None`")  # noqa: E501

        self._can_schedule_jobs = can_schedule_jobs

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


        :return: The can_prioritize_jobs of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._can_prioritize_jobs

    @can_prioritize_jobs.setter
    def can_prioritize_jobs(self, can_prioritize_jobs):
        """Sets the can_prioritize_jobs of this UserView.


        :param can_prioritize_jobs: The can_prioritize_jobs of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_prioritize_jobs is None:
            raise ValueError("Invalid value for `can_prioritize_jobs`, must not be `None`")  # noqa: E501

        self._can_prioritize_jobs = can_prioritize_jobs

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


        :return: The can_assign_jobs of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._can_assign_jobs

    @can_assign_jobs.setter
    def can_assign_jobs(self, can_assign_jobs):
        """Sets the can_assign_jobs of this UserView.


        :param can_assign_jobs: The can_assign_jobs of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_assign_jobs is None:
            raise ValueError("Invalid value for `can_assign_jobs`, must not be `None`")  # noqa: E501

        self._can_assign_jobs = can_assign_jobs

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


        :return: The can_create_collections of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._can_create_collections

    @can_create_collections.setter
    def can_create_collections(self, can_create_collections):
        """Sets the can_create_collections of this UserView.


        :param can_create_collections: The can_create_collections of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_create_collections is None:
            raise ValueError("Invalid value for `can_create_collections`, must not be `None`")  # noqa: E501

        self._can_create_collections = can_create_collections

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


        :return: The is_api_enabled of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._is_api_enabled

    @is_api_enabled.setter
    def is_api_enabled(self, is_api_enabled):
        """Sets the is_api_enabled of this UserView.


        :param is_api_enabled: The is_api_enabled of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and is_api_enabled is None:
            raise ValueError("Invalid value for `is_api_enabled`, must not be `None`")  # noqa: E501

        self._is_api_enabled = is_api_enabled

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


        :return: The default_credential_id of this UserView.  # noqa: E501
        :rtype: str
        """
        return self._default_credential_id

    @default_credential_id.setter
    def default_credential_id(self, default_credential_id):
        """Sets the default_credential_id of this UserView.


        :param default_credential_id: The default_credential_id of this UserView.  # noqa: E501
        :type: str
        """

        self._default_credential_id = default_credential_id

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


        :return: The is_account_locked of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._is_account_locked

    @is_account_locked.setter
    def is_account_locked(self, is_account_locked):
        """Sets the is_account_locked of this UserView.


        :param is_account_locked: The is_account_locked of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and is_account_locked is None:
            raise ValueError("Invalid value for `is_account_locked`, must not be `None`")  # noqa: E501

        self._is_account_locked = is_account_locked

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


        :return: The is_active of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._is_active

    @is_active.setter
    def is_active(self, is_active):
        """Sets the is_active of this UserView.


        :param is_active: The is_active of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and is_active is None:
            raise ValueError("Invalid value for `is_active`, must not be `None`")  # noqa: E501

        self._is_active = is_active

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


        :return: The last_login_date_time of this UserView.  # noqa: E501
        :rtype: datetime
        """
        return self._last_login_date_time

    @last_login_date_time.setter
    def last_login_date_time(self, last_login_date_time):
        """Sets the last_login_date_time of this UserView.


        :param last_login_date_time: The last_login_date_time of this UserView.  # noqa: E501
        :type: datetime
        """

        self._last_login_date_time = last_login_date_time

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


        :return: The is_validated of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._is_validated

    @is_validated.setter
    def is_validated(self, is_validated):
        """Sets the is_validated of this UserView.


        :param is_validated: The is_validated of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and is_validated is None:
            raise ValueError("Invalid value for `is_validated`, must not be `None`")  # noqa: E501

        self._is_validated = is_validated

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


        :return: The shared_credential_ids of this UserView.  # noqa: E501
        :rtype: list[str]
        """
        return self._shared_credential_ids

    @shared_credential_ids.setter
    def shared_credential_ids(self, shared_credential_ids):
        """Sets the shared_credential_ids of this UserView.


        :param shared_credential_ids: The shared_credential_ids of this UserView.  # noqa: E501
        :type: list[str]
        """

        self._shared_credential_ids = shared_credential_ids

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


        :return: The data_connection_ids of this UserView.  # noqa: E501
        :rtype: list[str]
        """
        return self._data_connection_ids

    @data_connection_ids.setter
    def data_connection_ids(self, data_connection_ids):
        """Sets the data_connection_ids of this UserView.


        :param data_connection_ids: The data_connection_ids of this UserView.  # noqa: E501
        :type: list[str]
        """

        self._data_connection_ids = data_connection_ids

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


        :return: The time_zone of this UserView.  # noqa: E501
        :rtype: str
        """
        return self._time_zone

    @time_zone.setter
    def time_zone(self, time_zone):
        """Sets the time_zone of this UserView.


        :param time_zone: The time_zone of this UserView.  # noqa: E501
        :type: str
        """

        self._time_zone = time_zone

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


        :return: The language of this UserView.  # noqa: E501
        :rtype: str
        """
        return self._language

    @language.setter
    def language(self, language):
        """Sets the language of this UserView.


        :param language: The language of this UserView.  # noqa: E501
        :type: str
        """

        self._language = language

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


        :return: The can_create_and_update_dcm of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._can_create_and_update_dcm

    @can_create_and_update_dcm.setter
    def can_create_and_update_dcm(self, can_create_and_update_dcm):
        """Sets the can_create_and_update_dcm of this UserView.


        :param can_create_and_update_dcm: The can_create_and_update_dcm of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_create_and_update_dcm is None:
            raise ValueError("Invalid value for `can_create_and_update_dcm`, must not be `None`")  # noqa: E501

        self._can_create_and_update_dcm = can_create_and_update_dcm

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


        :return: The can_share_for_execution_dcm of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._can_share_for_execution_dcm

    @can_share_for_execution_dcm.setter
    def can_share_for_execution_dcm(self, can_share_for_execution_dcm):
        """Sets the can_share_for_execution_dcm of this UserView.


        :param can_share_for_execution_dcm: The can_share_for_execution_dcm of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_share_for_execution_dcm is None:
            raise ValueError("Invalid value for `can_share_for_execution_dcm`, must not be `None`")  # noqa: E501

        self._can_share_for_execution_dcm = can_share_for_execution_dcm

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


        :return: The can_share_for_collaboration_dcm of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._can_share_for_collaboration_dcm

    @can_share_for_collaboration_dcm.setter
    def can_share_for_collaboration_dcm(self, can_share_for_collaboration_dcm):
        """Sets the can_share_for_collaboration_dcm of this UserView.


        :param can_share_for_collaboration_dcm: The can_share_for_collaboration_dcm of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_share_for_collaboration_dcm is None:
            raise ValueError("Invalid value for `can_share_for_collaboration_dcm`, must not be `None`")  # noqa: E501

        self._can_share_for_collaboration_dcm = can_share_for_collaboration_dcm

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


        :return: The can_manage_generic_vaults_dcm of this UserView.  # noqa: E501
        :rtype: bool
        """
        return self._can_manage_generic_vaults_dcm

    @can_manage_generic_vaults_dcm.setter
    def can_manage_generic_vaults_dcm(self, can_manage_generic_vaults_dcm):
        """Sets the can_manage_generic_vaults_dcm of this UserView.


        :param can_manage_generic_vaults_dcm: The can_manage_generic_vaults_dcm of this UserView.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_manage_generic_vaults_dcm is None:
            raise ValueError("Invalid value for `can_manage_generic_vaults_dcm`, must not be `None`")  # noqa: E501

        self._can_manage_generic_vaults_dcm = can_manage_generic_vaults_dcm

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

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