# 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 UserSaveRequest(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',
        'bus_ob_id': 'str',
        'bus_ob_public_id': 'str',
        'bus_ob_rec_id': 'str',
        'display_name': 'str',
        'error': 'str',
        'error_code': 'str',
        'has_error': 'bool',
        'ldap_required': 'bool',
        'login_id': 'str',
        'next_password_reset_date': 'datetime',
        'password': 'str',
        'password_never_expires': 'bool',
        'security_group_id': 'str',
        'user_cannot_change_password': 'bool',
        'user_info_fields': 'list[FieldTemplateItem]',
        'user_must_change_password_at_next_login': 'bool',
        'windows_user_id': 'str'
    }

    attribute_map = {
        'account_locked': 'accountLocked',
        'bus_ob_id': 'busObId',
        'bus_ob_public_id': 'busObPublicId',
        'bus_ob_rec_id': 'busObRecId',
        'display_name': 'displayName',
        'error': 'error',
        'error_code': 'errorCode',
        'has_error': 'hasError',
        'ldap_required': 'ldapRequired',
        'login_id': 'loginId',
        'next_password_reset_date': 'nextPasswordResetDate',
        'password': 'password',
        'password_never_expires': 'passwordNeverExpires',
        'security_group_id': 'securityGroupId',
        'user_cannot_change_password': 'userCannotChangePassword',
        'user_info_fields': 'userInfoFields',
        'user_must_change_password_at_next_login': 'userMustChangePasswordAtNextLogin',
        'windows_user_id': 'windowsUserId'
    }

    def __init__(self, account_locked=None, bus_ob_id=None, bus_ob_public_id=None, bus_ob_rec_id=None, display_name=None, error=None, error_code=None, has_error=None, ldap_required=None, login_id=None, next_password_reset_date=None, password=None, password_never_expires=None, security_group_id=None, user_cannot_change_password=None, user_info_fields=None, user_must_change_password_at_next_login=None, windows_user_id=None, local_vars_configuration=None):  # noqa: E501
        """UserSaveRequest - 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._bus_ob_id = None
        self._bus_ob_public_id = None
        self._bus_ob_rec_id = None
        self._display_name = None
        self._error = None
        self._error_code = None
        self._has_error = None
        self._ldap_required = None
        self._login_id = None
        self._next_password_reset_date = None
        self._password = None
        self._password_never_expires = None
        self._security_group_id = None
        self._user_cannot_change_password = None
        self._user_info_fields = None
        self._user_must_change_password_at_next_login = None
        self._windows_user_id = None
        self.discriminator = None

        if account_locked is not None:
            self.account_locked = account_locked
        if bus_ob_id is not None:
            self.bus_ob_id = bus_ob_id
        if bus_ob_public_id is not None:
            self.bus_ob_public_id = bus_ob_public_id
        if bus_ob_rec_id is not None:
            self.bus_ob_rec_id = bus_ob_rec_id
        if display_name is not None:
            self.display_name = display_name
        if error is not None:
            self.error = error
        if error_code is not None:
            self.error_code = error_code
        if has_error is not None:
            self.has_error = has_error
        if ldap_required is not None:
            self.ldap_required = ldap_required
        if login_id is not None:
            self.login_id = login_id
        if next_password_reset_date is not None:
            self.next_password_reset_date = next_password_reset_date
        if password is not None:
            self.password = password
        if password_never_expires is not None:
            self.password_never_expires = password_never_expires
        if security_group_id is not None:
            self.security_group_id = security_group_id
        if user_cannot_change_password is not None:
            self.user_cannot_change_password = user_cannot_change_password
        if user_info_fields is not None:
            self.user_info_fields = user_info_fields
        if user_must_change_password_at_next_login is not None:
            self.user_must_change_password_at_next_login = user_must_change_password_at_next_login
        if windows_user_id is not None:
            self.windows_user_id = windows_user_id

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


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

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


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

        self._account_locked = account_locked

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


        :return: The bus_ob_id of this UserSaveRequest.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_id

    @bus_ob_id.setter
    def bus_ob_id(self, bus_ob_id):
        """Sets the bus_ob_id of this UserSaveRequest.


        :param bus_ob_id: The bus_ob_id of this UserSaveRequest.  # noqa: E501
        :type: str
        """

        self._bus_ob_id = bus_ob_id

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


        :return: The bus_ob_public_id of this UserSaveRequest.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_public_id

    @bus_ob_public_id.setter
    def bus_ob_public_id(self, bus_ob_public_id):
        """Sets the bus_ob_public_id of this UserSaveRequest.


        :param bus_ob_public_id: The bus_ob_public_id of this UserSaveRequest.  # noqa: E501
        :type: str
        """

        self._bus_ob_public_id = bus_ob_public_id

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


        :return: The bus_ob_rec_id of this UserSaveRequest.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_rec_id

    @bus_ob_rec_id.setter
    def bus_ob_rec_id(self, bus_ob_rec_id):
        """Sets the bus_ob_rec_id of this UserSaveRequest.


        :param bus_ob_rec_id: The bus_ob_rec_id of this UserSaveRequest.  # noqa: E501
        :type: str
        """

        self._bus_ob_rec_id = bus_ob_rec_id

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


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

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


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

        self._display_name = display_name

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


        :return: The error of this UserSaveRequest.  # noqa: E501
        :rtype: str
        """
        return self._error

    @error.setter
    def error(self, error):
        """Sets the error of this UserSaveRequest.


        :param error: The error of this UserSaveRequest.  # noqa: E501
        :type: str
        """

        self._error = error

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


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

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


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

        self._error_code = error_code

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


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

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


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

        self._has_error = has_error

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


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

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


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

        self._ldap_required = ldap_required

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


        :return: The login_id of this UserSaveRequest.  # noqa: E501
        :rtype: str
        """
        return self._login_id

    @login_id.setter
    def login_id(self, login_id):
        """Sets the login_id of this UserSaveRequest.


        :param login_id: The login_id of this UserSaveRequest.  # noqa: E501
        :type: str
        """

        self._login_id = login_id

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


        :return: The next_password_reset_date of this UserSaveRequest.  # noqa: E501
        :rtype: datetime
        """
        return self._next_password_reset_date

    @next_password_reset_date.setter
    def next_password_reset_date(self, next_password_reset_date):
        """Sets the next_password_reset_date of this UserSaveRequest.


        :param next_password_reset_date: The next_password_reset_date of this UserSaveRequest.  # noqa: E501
        :type: datetime
        """

        self._next_password_reset_date = next_password_reset_date

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


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

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


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

        self._password = password

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


        :return: The password_never_expires of this UserSaveRequest.  # 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 UserSaveRequest.


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

        self._password_never_expires = password_never_expires

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


        :return: The security_group_id of this UserSaveRequest.  # 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 UserSaveRequest.


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

        self._security_group_id = security_group_id

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


        :return: The user_cannot_change_password of this UserSaveRequest.  # 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 UserSaveRequest.


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

        self._user_cannot_change_password = user_cannot_change_password

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


        :return: The user_info_fields of this UserSaveRequest.  # noqa: E501
        :rtype: list[FieldTemplateItem]
        """
        return self._user_info_fields

    @user_info_fields.setter
    def user_info_fields(self, user_info_fields):
        """Sets the user_info_fields of this UserSaveRequest.


        :param user_info_fields: The user_info_fields of this UserSaveRequest.  # noqa: E501
        :type: list[FieldTemplateItem]
        """

        self._user_info_fields = user_info_fields

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


        :return: The user_must_change_password_at_next_login of this UserSaveRequest.  # noqa: E501
        :rtype: bool
        """
        return self._user_must_change_password_at_next_login

    @user_must_change_password_at_next_login.setter
    def user_must_change_password_at_next_login(self, user_must_change_password_at_next_login):
        """Sets the user_must_change_password_at_next_login of this UserSaveRequest.


        :param user_must_change_password_at_next_login: The user_must_change_password_at_next_login of this UserSaveRequest.  # noqa: E501
        :type: bool
        """

        self._user_must_change_password_at_next_login = user_must_change_password_at_next_login

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


        :return: The windows_user_id of this UserSaveRequest.  # noqa: E501
        :rtype: str
        """
        return self._windows_user_id

    @windows_user_id.setter
    def windows_user_id(self, windows_user_id):
        """Sets the windows_user_id of this UserSaveRequest.


        :param windows_user_id: The windows_user_id of this UserSaveRequest.  # noqa: E501
        :type: str
        """

        self._windows_user_id = windows_user_id

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

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