# coding: utf-8

"""
    Abstract API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from enigma.swagger_client.models.apiusers_profile import ApiusersProfile  # noqa: F401,E501


class User(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 = {
        'apikey': 'str',
        'first_name': 'str',
        'id': 'str',
        'is_admin': 'bool',
        'last_name': 'str',
        'password': 'str',
        'password_old': 'str',
        'password_token': 'str',
        'profile': 'ApiusersProfile',
        'roles': 'list[str]',
        'status': 'str',
        'user_email': 'str'
    }

    attribute_map = {
        'apikey': 'apikey',
        'first_name': 'first_name',
        'id': 'id',
        'is_admin': 'is_admin',
        'last_name': 'last_name',
        'password': 'password',
        'password_old': 'password_old',
        'password_token': 'password_token',
        'profile': 'profile',
        'roles': 'roles',
        'status': 'status',
        'user_email': 'user_email'
    }

    def __init__(self, apikey=None, first_name=None, id=None, is_admin=None, last_name=None, password=None, password_old=None, password_token=None, profile=None, roles=None, status=None, user_email=None):  # noqa: E501
        """User - a model defined in Swagger"""  # noqa: E501

        self._apikey = None
        self._first_name = None
        self._id = None
        self._is_admin = None
        self._last_name = None
        self._password = None
        self._password_old = None
        self._password_token = None
        self._profile = None
        self._roles = None
        self._status = None
        self._user_email = None
        self.discriminator = None

        if apikey is not None:
            self.apikey = apikey
        if first_name is not None:
            self.first_name = first_name
        if id is not None:
            self.id = id
        if is_admin is not None:
            self.is_admin = is_admin
        self.last_name = last_name
        if password is not None:
            self.password = password
        if password_old is not None:
            self.password_old = password_old
        if password_token is not None:
            self.password_token = password_token
        if profile is not None:
            self.profile = profile
        if roles is not None:
            self.roles = roles
        if status is not None:
            self.status = status
        if user_email is not None:
            self.user_email = user_email

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


        :return: The apikey of this User.  # noqa: E501
        :rtype: str
        """
        return self._apikey

    @apikey.setter
    def apikey(self, apikey):
        """Sets the apikey of this User.


        :param apikey: The apikey of this User.  # noqa: E501
        :type: str
        """

        self._apikey = apikey

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


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

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


        :param first_name: The first_name of this User.  # noqa: E501
        :type: str
        """

        self._first_name = first_name

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


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

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


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

        self._id = id

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


        :return: The is_admin of this User.  # noqa: E501
        :rtype: bool
        """
        return self._is_admin

    @is_admin.setter
    def is_admin(self, is_admin):
        """Sets the is_admin of this User.


        :param is_admin: The is_admin of this User.  # noqa: E501
        :type: bool
        """

        self._is_admin = is_admin

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


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

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


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

        self._last_name = last_name

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


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

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


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

        self._password = password

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


        :return: The password_old of this User.  # noqa: E501
        :rtype: str
        """
        return self._password_old

    @password_old.setter
    def password_old(self, password_old):
        """Sets the password_old of this User.


        :param password_old: The password_old of this User.  # noqa: E501
        :type: str
        """

        self._password_old = password_old

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


        :return: The password_token of this User.  # noqa: E501
        :rtype: str
        """
        return self._password_token

    @password_token.setter
    def password_token(self, password_token):
        """Sets the password_token of this User.


        :param password_token: The password_token of this User.  # noqa: E501
        :type: str
        """

        self._password_token = password_token

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


        :return: The profile of this User.  # noqa: E501
        :rtype: ApiusersProfile
        """
        return self._profile

    @profile.setter
    def profile(self, profile):
        """Sets the profile of this User.


        :param profile: The profile of this User.  # noqa: E501
        :type: ApiusersProfile
        """

        self._profile = profile

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


        :return: The roles of this User.  # noqa: E501
        :rtype: list[str]
        """
        return self._roles

    @roles.setter
    def roles(self, roles):
        """Sets the roles of this User.


        :param roles: The roles of this User.  # noqa: E501
        :type: list[str]
        """

        self._roles = roles

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


        :return: The status of this User.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this User.


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

        self._status = status

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


        :return: The user_email of this User.  # noqa: E501
        :rtype: str
        """
        return self._user_email

    @user_email.setter
    def user_email(self, user_email):
        """Sets the user_email of this User.


        :param user_email: The user_email of this User.  # noqa: E501
        :type: str
        """

        self._user_email = user_email

    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

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

        return self.__dict__ == other.__dict__

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