# coding: utf-8

"""
    ExaVault API

    See our API reference documentation at https://www.exavault.com/developer/api-docs/  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: support@exavault.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class UpdateUserRequestBody(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 = {
        'username': 'str',
        'nickname': 'str',
        'home_resource': 'str',
        'email': 'str',
        'password': 'str',
        'role': 'str',
        'permissions': 'UsersPermissions',
        'time_zone': 'str',
        'expiration': 'str',
        'locked': 'bool',
        'onboarding': 'bool',
        'current_user_password': 'str'
    }

    attribute_map = {
        'username': 'username',
        'nickname': 'nickname',
        'home_resource': 'homeResource',
        'email': 'email',
        'password': 'password',
        'role': 'role',
        'permissions': 'permissions',
        'time_zone': 'timeZone',
        'expiration': 'expiration',
        'locked': 'locked',
        'onboarding': 'onboarding',
        'current_user_password': 'currentUserPassword'
    }

    def __init__(self, username=None, nickname=None, home_resource=None, email=None, password=None, role=None, permissions=None, time_zone=None, expiration=None, locked=None, onboarding=None, current_user_password=None):  # noqa: E501
        """UpdateUserRequestBody - a model defined in Swagger"""  # noqa: E501
        self._username = None
        self._nickname = None
        self._home_resource = None
        self._email = None
        self._password = None
        self._role = None
        self._permissions = None
        self._time_zone = None
        self._expiration = None
        self._locked = None
        self._onboarding = None
        self._current_user_password = None
        self.discriminator = None
        if username is not None:
            self.username = username
        if nickname is not None:
            self.nickname = nickname
        if home_resource is not None:
            self.home_resource = home_resource
        if email is not None:
            self.email = email
        if password is not None:
            self.password = password
        if role is not None:
            self.role = role
        if permissions is not None:
            self.permissions = permissions
        if time_zone is not None:
            self.time_zone = time_zone
        if expiration is not None:
            self.expiration = expiration
        if locked is not None:
            self.locked = locked
        if onboarding is not None:
            self.onboarding = onboarding
        if current_user_password is not None:
            self.current_user_password = current_user_password

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

        New username for the user. This should follow standard username conventions - spaces are not allowed, etc. We do allow email addresses as usernames.  **Note** Usernames must be unique across all ExaVault accounts.  # noqa: E501

        :return: The username of this UpdateUserRequestBody.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this UpdateUserRequestBody.

        New username for the user. This should follow standard username conventions - spaces are not allowed, etc. We do allow email addresses as usernames.  **Note** Usernames must be unique across all ExaVault accounts.  # noqa: E501

        :param username: The username of this UpdateUserRequestBody.  # noqa: E501
        :type: str
        """

        self._username = username

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

        An optional nickname (e.g. 'David from Sales').  # noqa: E501

        :return: The nickname of this UpdateUserRequestBody.  # noqa: E501
        :rtype: str
        """
        return self._nickname

    @nickname.setter
    def nickname(self, nickname):
        """Sets the nickname of this UpdateUserRequestBody.

        An optional nickname (e.g. 'David from Sales').  # noqa: E501

        :param nickname: The nickname of this UpdateUserRequestBody.  # noqa: E501
        :type: str
        """

        self._nickname = nickname

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

        Resource identifier for the user's home folder. See details on [how to specify resources](#section/Identifying-Resources) above.  The user will be locked to this directory and unable to move 'up' in the account. If the folder does not exist in the account, it will be created when the user logs in.  This setting is ignored for users with the `role` **admin**.  # noqa: E501

        :return: The home_resource of this UpdateUserRequestBody.  # noqa: E501
        :rtype: str
        """
        return self._home_resource

    @home_resource.setter
    def home_resource(self, home_resource):
        """Sets the home_resource of this UpdateUserRequestBody.

        Resource identifier for the user's home folder. See details on [how to specify resources](#section/Identifying-Resources) above.  The user will be locked to this directory and unable to move 'up' in the account. If the folder does not exist in the account, it will be created when the user logs in.  This setting is ignored for users with the `role` **admin**.  # noqa: E501

        :param home_resource: The home_resource of this UpdateUserRequestBody.  # noqa: E501
        :type: str
        """

        self._home_resource = home_resource

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

        Email address for the user  # noqa: E501

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

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

        Email address for the user  # noqa: E501

        :param email: The email of this UpdateUserRequestBody.  # noqa: E501
        :type: str
        """

        self._email = email

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

        New password for the user  # noqa: E501

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

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

        New password for the user  # noqa: E501

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

        self._password = password

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

        The type of user (**admin** or **user**). Note that admin users cannot have a `homeResource` other than '/', and will have full permissions, but you must provide at least \"download,upload,list,delete\" in the `permissions` parameter.  # noqa: E501

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

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

        The type of user (**admin** or **user**). Note that admin users cannot have a `homeResource` other than '/', and will have full permissions, but you must provide at least \"download,upload,list,delete\" in the `permissions` parameter.  # noqa: E501

        :param role: The role of this UpdateUserRequestBody.  # noqa: E501
        :type: str
        """
        allowed_values = ["user", "admin"]  # noqa: E501
        if role not in allowed_values:
            raise ValueError(
                "Invalid value for `role` ({0}), must be one of {1}"  # noqa: E501
                .format(role, allowed_values)
            )

        self._role = role

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


        :return: The permissions of this UpdateUserRequestBody.  # noqa: E501
        :rtype: UsersPermissions
        """
        return self._permissions

    @permissions.setter
    def permissions(self, permissions):
        """Sets the permissions of this UpdateUserRequestBody.


        :param permissions: The permissions of this UpdateUserRequestBody.  # noqa: E501
        :type: UsersPermissions
        """

        self._permissions = permissions

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

        Time zone, used for accurate time display within the application. See <a href='https://php.net/manual/en/timezones.php' target='blank'>this page</a> for allowed values.   # noqa: E501

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

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

        Time zone, used for accurate time display within the application. See <a href='https://php.net/manual/en/timezones.php' target='blank'>this page</a> for allowed values.   # noqa: E501

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

        self._time_zone = time_zone

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

        Optional timestamp when the user should expire.  # noqa: E501

        :return: The expiration of this UpdateUserRequestBody.  # noqa: E501
        :rtype: str
        """
        return self._expiration

    @expiration.setter
    def expiration(self, expiration):
        """Sets the expiration of this UpdateUserRequestBody.

        Optional timestamp when the user should expire.  # noqa: E501

        :param expiration: The expiration of this UpdateUserRequestBody.  # noqa: E501
        :type: str
        """

        self._expiration = expiration

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

        If true, the user will be prevented from logging in  # noqa: E501

        :return: The locked of this UpdateUserRequestBody.  # noqa: E501
        :rtype: bool
        """
        return self._locked

    @locked.setter
    def locked(self, locked):
        """Sets the locked of this UpdateUserRequestBody.

        If true, the user will be prevented from logging in  # noqa: E501

        :param locked: The locked of this UpdateUserRequestBody.  # noqa: E501
        :type: bool
        """

        self._locked = locked

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

        Set this to **true** to enable extra help popups in the web file manager for this user.  # noqa: E501

        :return: The onboarding of this UpdateUserRequestBody.  # noqa: E501
        :rtype: bool
        """
        return self._onboarding

    @onboarding.setter
    def onboarding(self, onboarding):
        """Sets the onboarding of this UpdateUserRequestBody.

        Set this to **true** to enable extra help popups in the web file manager for this user.  # noqa: E501

        :param onboarding: The onboarding of this UpdateUserRequestBody.  # noqa: E501
        :type: bool
        """

        self._onboarding = onboarding

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

        The password of the currently authenticated user. Required when updating any user’s email, username or password.  # noqa: E501

        :return: The current_user_password of this UpdateUserRequestBody.  # noqa: E501
        :rtype: str
        """
        return self._current_user_password

    @current_user_password.setter
    def current_user_password(self, current_user_password):
        """Sets the current_user_password of this UpdateUserRequestBody.

        The password of the currently authenticated user. Required when updating any user’s email, username or password.  # noqa: E501

        :param current_user_password: The current_user_password of this UpdateUserRequestBody.  # noqa: E501
        :type: str
        """

        self._current_user_password = current_user_password

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

        return self.__dict__ == other.__dict__

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