# coding: utf-8

"""
    Cherwell REST API

    Unofficial Python Cherwell REST API library.  # noqa: E501

    The version of the OpenAPI document: 9.3.2
    Contact: See AUTHORS.
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from pycherwell.configuration import Configuration


class UserV2(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 = {
        'account_locked': 'bool',
        'create_date_time': 'datetime',
        'display_name': 'str',
        'fields': 'list[FieldTemplateItem]',
        'last_password_reset_date': 'datetime',
        'last_reset_date_time': 'datetime',
        'ldap_required': 'bool',
        'password_never_expires': 'bool',
        'public_id': 'str',
        'record_id': 'str',
        'security_group_id': 'str',
        'short_display_name': 'str',
        'user_cannot_change_password': 'bool',
        'user_must_reset_password_at_next_login': 'bool',
        'error_code': 'str',
        'error_message': 'str',
        'has_error': 'bool'
    }

    attribute_map = {
        'account_locked': 'accountLocked',
        'create_date_time': 'createDateTime',
        'display_name': 'displayName',
        'fields': 'fields',
        'last_password_reset_date': 'lastPasswordResetDate',
        'last_reset_date_time': 'lastResetDateTime',
        'ldap_required': 'ldapRequired',
        'password_never_expires': 'passwordNeverExpires',
        'public_id': 'publicId',
        'record_id': 'recordId',
        'security_group_id': 'securityGroupId',
        'short_display_name': 'shortDisplayName',
        'user_cannot_change_password': 'userCannotChangePassword',
        'user_must_reset_password_at_next_login': 'userMustResetPasswordAtNextLogin',
        'error_code': 'errorCode',
        'error_message': 'errorMessage',
        'has_error': 'hasError'
    }

    def __init__(self, account_locked=None, create_date_time=None, display_name=None, fields=None, last_password_reset_date=None, last_reset_date_time=None, ldap_required=None, password_never_expires=None, public_id=None, record_id=None, security_group_id=None, short_display_name=None, user_cannot_change_password=None, user_must_reset_password_at_next_login=None, error_code=None, error_message=None, has_error=None, local_vars_configuration=None):  # noqa: E501
        """UserV2 - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._account_locked = None
        self._create_date_time = None
        self._display_name = None
        self._fields = None
        self._last_password_reset_date = None
        self._last_reset_date_time = None
        self._ldap_required = None
        self._password_never_expires = None
        self._public_id = None
        self._record_id = None
        self._security_group_id = None
        self._short_display_name = None
        self._user_cannot_change_password = None
        self._user_must_reset_password_at_next_login = None
        self._error_code = None
        self._error_message = None
        self._has_error = None
        self.discriminator = None

        if account_locked is not None:
            self.account_locked = account_locked
        if create_date_time is not None:
            self.create_date_time = create_date_time
        if display_name is not None:
            self.display_name = display_name
        if fields is not None:
            self.fields = fields
        if last_password_reset_date is not None:
            self.last_password_reset_date = last_password_reset_date
        if last_reset_date_time is not None:
            self.last_reset_date_time = last_reset_date_time
        if ldap_required is not None:
            self.ldap_required = ldap_required
        if password_never_expires is not None:
            self.password_never_expires = password_never_expires
        if public_id is not None:
            self.public_id = public_id
        if record_id is not None:
            self.record_id = record_id
        if security_group_id is not None:
            self.security_group_id = security_group_id
        if short_display_name is not None:
            self.short_display_name = short_display_name
        if user_cannot_change_password is not None:
            self.user_cannot_change_password = user_cannot_change_password
        if user_must_reset_password_at_next_login is not None:
            self.user_must_reset_password_at_next_login = user_must_reset_password_at_next_login
        if error_code is not None:
            self.error_code = error_code
        if error_message is not None:
            self.error_message = error_message
        if has_error is not None:
            self.has_error = has_error

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


        :return: The account_locked of this UserV2.  # noqa: E501
        :rtype: bool
        """
        return self._account_locked

    @account_locked.setter
    def account_locked(self, account_locked):
        """Sets the account_locked of this UserV2.


        :param account_locked: The account_locked of this UserV2.  # noqa: E501
        :type: bool
        """

        self._account_locked = account_locked

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


        :return: The create_date_time of this UserV2.  # noqa: E501
        :rtype: datetime
        """
        return self._create_date_time

    @create_date_time.setter
    def create_date_time(self, create_date_time):
        """Sets the create_date_time of this UserV2.


        :param create_date_time: The create_date_time of this UserV2.  # noqa: E501
        :type: datetime
        """

        self._create_date_time = create_date_time

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


        :return: The display_name of this UserV2.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this UserV2.


        :param display_name: The display_name of this UserV2.  # noqa: E501
        :type: str
        """

        self._display_name = display_name

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


        :return: The fields of this UserV2.  # noqa: E501
        :rtype: list[FieldTemplateItem]
        """
        return self._fields

    @fields.setter
    def fields(self, fields):
        """Sets the fields of this UserV2.


        :param fields: The fields of this UserV2.  # noqa: E501
        :type: list[FieldTemplateItem]
        """

        self._fields = fields

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


        :return: The last_password_reset_date of this UserV2.  # noqa: E501
        :rtype: datetime
        """
        return self._last_password_reset_date

    @last_password_reset_date.setter
    def last_password_reset_date(self, last_password_reset_date):
        """Sets the last_password_reset_date of this UserV2.


        :param last_password_reset_date: The last_password_reset_date of this UserV2.  # noqa: E501
        :type: datetime
        """

        self._last_password_reset_date = last_password_reset_date

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


        :return: The last_reset_date_time of this UserV2.  # noqa: E501
        :rtype: datetime
        """
        return self._last_reset_date_time

    @last_reset_date_time.setter
    def last_reset_date_time(self, last_reset_date_time):
        """Sets the last_reset_date_time of this UserV2.


        :param last_reset_date_time: The last_reset_date_time of this UserV2.  # noqa: E501
        :type: datetime
        """

        self._last_reset_date_time = last_reset_date_time

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


        :return: The ldap_required of this UserV2.  # noqa: E501
        :rtype: bool
        """
        return self._ldap_required

    @ldap_required.setter
    def ldap_required(self, ldap_required):
        """Sets the ldap_required of this UserV2.


        :param ldap_required: The ldap_required of this UserV2.  # noqa: E501
        :type: bool
        """

        self._ldap_required = ldap_required

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


        :return: The password_never_expires of this UserV2.  # noqa: E501
        :rtype: bool
        """
        return self._password_never_expires

    @password_never_expires.setter
    def password_never_expires(self, password_never_expires):
        """Sets the password_never_expires of this UserV2.


        :param password_never_expires: The password_never_expires of this UserV2.  # noqa: E501
        :type: bool
        """

        self._password_never_expires = password_never_expires

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


        :return: The public_id of this UserV2.  # noqa: E501
        :rtype: str
        """
        return self._public_id

    @public_id.setter
    def public_id(self, public_id):
        """Sets the public_id of this UserV2.


        :param public_id: The public_id of this UserV2.  # noqa: E501
        :type: str
        """

        self._public_id = public_id

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


        :return: The record_id of this UserV2.  # noqa: E501
        :rtype: str
        """
        return self._record_id

    @record_id.setter
    def record_id(self, record_id):
        """Sets the record_id of this UserV2.


        :param record_id: The record_id of this UserV2.  # noqa: E501
        :type: str
        """

        self._record_id = record_id

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


        :return: The security_group_id of this UserV2.  # noqa: E501
        :rtype: str
        """
        return self._security_group_id

    @security_group_id.setter
    def security_group_id(self, security_group_id):
        """Sets the security_group_id of this UserV2.


        :param security_group_id: The security_group_id of this UserV2.  # noqa: E501
        :type: str
        """

        self._security_group_id = security_group_id

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


        :return: The short_display_name of this UserV2.  # noqa: E501
        :rtype: str
        """
        return self._short_display_name

    @short_display_name.setter
    def short_display_name(self, short_display_name):
        """Sets the short_display_name of this UserV2.


        :param short_display_name: The short_display_name of this UserV2.  # noqa: E501
        :type: str
        """

        self._short_display_name = short_display_name

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


        :return: The user_cannot_change_password of this UserV2.  # noqa: E501
        :rtype: bool
        """
        return self._user_cannot_change_password

    @user_cannot_change_password.setter
    def user_cannot_change_password(self, user_cannot_change_password):
        """Sets the user_cannot_change_password of this UserV2.


        :param user_cannot_change_password: The user_cannot_change_password of this UserV2.  # noqa: E501
        :type: bool
        """

        self._user_cannot_change_password = user_cannot_change_password

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


        :return: The user_must_reset_password_at_next_login of this UserV2.  # noqa: E501
        :rtype: bool
        """
        return self._user_must_reset_password_at_next_login

    @user_must_reset_password_at_next_login.setter
    def user_must_reset_password_at_next_login(self, user_must_reset_password_at_next_login):
        """Sets the user_must_reset_password_at_next_login of this UserV2.


        :param user_must_reset_password_at_next_login: The user_must_reset_password_at_next_login of this UserV2.  # noqa: E501
        :type: bool
        """

        self._user_must_reset_password_at_next_login = user_must_reset_password_at_next_login

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


        :return: The error_code of this UserV2.  # noqa: E501
        :rtype: str
        """
        return self._error_code

    @error_code.setter
    def error_code(self, error_code):
        """Sets the error_code of this UserV2.


        :param error_code: The error_code of this UserV2.  # noqa: E501
        :type: str
        """

        self._error_code = error_code

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


        :return: The error_message of this UserV2.  # noqa: E501
        :rtype: str
        """
        return self._error_message

    @error_message.setter
    def error_message(self, error_message):
        """Sets the error_message of this UserV2.


        :param error_message: The error_message of this UserV2.  # noqa: E501
        :type: str
        """

        self._error_message = error_message

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


        :return: The has_error of this UserV2.  # noqa: E501
        :rtype: bool
        """
        return self._has_error

    @has_error.setter
    def has_error(self, has_error):
        """Sets the has_error of this UserV2.


        :param has_error: The has_error of this UserV2.  # noqa: E501
        :type: bool
        """

        self._has_error = has_error

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

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