# coding: utf-8

"""
    Hopsworks api

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

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

import pprint
import re  # noqa: F401

import six
from swagger_client.models.address import Address  # noqa: F401,E501
from swagger_client.models.bbc_group import BbcGroup  # noqa: F401,E501
from swagger_client.models.jupyter_settings import JupyterSettings  # noqa: F401,E501
from swagger_client.models.organization import Organization  # noqa: F401,E501
from swagger_client.models.tensor_board import TensorBoard  # noqa: F401,E501


class Users(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 = {
        'uid': 'int',
        'username': 'str',
        'password': 'str',
        'email': 'str',
        'fname': 'str',
        'lname': 'str',
        'activated': 'datetime',
        'title': 'str',
        'orcid': 'str',
        'false_login': 'int',
        'status': 'str',
        'isonline': 'int',
        'secret': 'str',
        'validation_key': 'str',
        'validation_key_updated': 'datetime',
        'validation_key_type': 'str',
        'security_question': 'str',
        'security_answer': 'str',
        'mode': 'str',
        'password_changed': 'datetime',
        'notes': 'str',
        'mobile': 'str',
        'max_num_projects': 'int',
        'num_created_projects': 'int',
        'num_active_projects': 'int',
        'two_factor': 'bool',
        'salt': 'str',
        'tours_state': 'int',
        'bbc_group_collection': 'list[BbcGroup]',
        'address': 'Address',
        'organization': 'Organization',
        'jupyter_settings_collection': 'list[JupyterSettings]',
        'tensor_board_collection': 'list[TensorBoard]',
        'group_name': 'str',
        'group_names': 'list[BbcGroup]',
        'status_name': 'str'
    }

    attribute_map = {
        'uid': 'uid',
        'username': 'username',
        'password': 'password',
        'email': 'email',
        'fname': 'fname',
        'lname': 'lname',
        'activated': 'activated',
        'title': 'title',
        'orcid': 'orcid',
        'false_login': 'falseLogin',
        'status': 'status',
        'isonline': 'isonline',
        'secret': 'secret',
        'validation_key': 'validationKey',
        'validation_key_updated': 'validationKeyUpdated',
        'validation_key_type': 'validationKeyType',
        'security_question': 'securityQuestion',
        'security_answer': 'securityAnswer',
        'mode': 'mode',
        'password_changed': 'passwordChanged',
        'notes': 'notes',
        'mobile': 'mobile',
        'max_num_projects': 'maxNumProjects',
        'num_created_projects': 'numCreatedProjects',
        'num_active_projects': 'numActiveProjects',
        'two_factor': 'twoFactor',
        'salt': 'salt',
        'tours_state': 'toursState',
        'bbc_group_collection': 'bbcGroupCollection',
        'address': 'address',
        'organization': 'organization',
        'jupyter_settings_collection': 'jupyterSettingsCollection',
        'tensor_board_collection': 'tensorBoardCollection',
        'group_name': 'groupName',
        'group_names': 'groupNames',
        'status_name': 'statusName'
    }

    def __init__(self, uid=None, username=None, password=None, email=None, fname=None, lname=None, activated=None, title=None, orcid=None, false_login=None, status=None, isonline=None, secret=None, validation_key=None, validation_key_updated=None, validation_key_type=None, security_question=None, security_answer=None, mode=None, password_changed=None, notes=None, mobile=None, max_num_projects=None, num_created_projects=None, num_active_projects=None, two_factor=None, salt=None, tours_state=None, bbc_group_collection=None, address=None, organization=None, jupyter_settings_collection=None, tensor_board_collection=None, group_name=None, group_names=None, status_name=None):  # noqa: E501
        """Users - a model defined in Swagger"""  # noqa: E501
        self._uid = None
        self._username = None
        self._password = None
        self._email = None
        self._fname = None
        self._lname = None
        self._activated = None
        self._title = None
        self._orcid = None
        self._false_login = None
        self._status = None
        self._isonline = None
        self._secret = None
        self._validation_key = None
        self._validation_key_updated = None
        self._validation_key_type = None
        self._security_question = None
        self._security_answer = None
        self._mode = None
        self._password_changed = None
        self._notes = None
        self._mobile = None
        self._max_num_projects = None
        self._num_created_projects = None
        self._num_active_projects = None
        self._two_factor = None
        self._salt = None
        self._tours_state = None
        self._bbc_group_collection = None
        self._address = None
        self._organization = None
        self._jupyter_settings_collection = None
        self._tensor_board_collection = None
        self._group_name = None
        self._group_names = None
        self._status_name = None
        self.discriminator = None
        if uid is not None:
            self.uid = uid
        self.username = username
        self.password = password
        if email is not None:
            self.email = email
        if fname is not None:
            self.fname = fname
        if lname is not None:
            self.lname = lname
        self.activated = activated
        if title is not None:
            self.title = title
        if orcid is not None:
            self.orcid = orcid
        self.false_login = false_login
        self.status = status
        self.isonline = isonline
        if secret is not None:
            self.secret = secret
        if validation_key is not None:
            self.validation_key = validation_key
        if validation_key_updated is not None:
            self.validation_key_updated = validation_key_updated
        if validation_key_type is not None:
            self.validation_key_type = validation_key_type
        if security_question is not None:
            self.security_question = security_question
        if security_answer is not None:
            self.security_answer = security_answer
        self.mode = mode
        self.password_changed = password_changed
        if notes is not None:
            self.notes = notes
        if mobile is not None:
            self.mobile = mobile
        if max_num_projects is not None:
            self.max_num_projects = max_num_projects
        self.num_created_projects = num_created_projects
        self.num_active_projects = num_active_projects
        self.two_factor = two_factor
        self.salt = salt
        self.tours_state = tours_state
        if bbc_group_collection is not None:
            self.bbc_group_collection = bbc_group_collection
        if address is not None:
            self.address = address
        if organization is not None:
            self.organization = organization
        if jupyter_settings_collection is not None:
            self.jupyter_settings_collection = jupyter_settings_collection
        if tensor_board_collection is not None:
            self.tensor_board_collection = tensor_board_collection
        if group_name is not None:
            self.group_name = group_name
        if group_names is not None:
            self.group_names = group_names
        if status_name is not None:
            self.status_name = status_name

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


        :return: The uid of this Users.  # noqa: E501
        :rtype: int
        """
        return self._uid

    @uid.setter
    def uid(self, uid):
        """Sets the uid of this Users.


        :param uid: The uid of this Users.  # noqa: E501
        :type: int
        """

        self._uid = uid

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


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

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


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

        self._username = username

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


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

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


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

        self._password = password

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


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

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


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

        self._email = email

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


        :return: The fname of this Users.  # noqa: E501
        :rtype: str
        """
        return self._fname

    @fname.setter
    def fname(self, fname):
        """Sets the fname of this Users.


        :param fname: The fname of this Users.  # noqa: E501
        :type: str
        """

        self._fname = fname

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


        :return: The lname of this Users.  # noqa: E501
        :rtype: str
        """
        return self._lname

    @lname.setter
    def lname(self, lname):
        """Sets the lname of this Users.


        :param lname: The lname of this Users.  # noqa: E501
        :type: str
        """

        self._lname = lname

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


        :return: The activated of this Users.  # noqa: E501
        :rtype: datetime
        """
        return self._activated

    @activated.setter
    def activated(self, activated):
        """Sets the activated of this Users.


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

        self._activated = activated

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


        :return: The title of this Users.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this Users.


        :param title: The title of this Users.  # noqa: E501
        :type: str
        """

        self._title = title

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


        :return: The orcid of this Users.  # noqa: E501
        :rtype: str
        """
        return self._orcid

    @orcid.setter
    def orcid(self, orcid):
        """Sets the orcid of this Users.


        :param orcid: The orcid of this Users.  # noqa: E501
        :type: str
        """

        self._orcid = orcid

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


        :return: The false_login of this Users.  # noqa: E501
        :rtype: int
        """
        return self._false_login

    @false_login.setter
    def false_login(self, false_login):
        """Sets the false_login of this Users.


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

        self._false_login = false_login

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


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

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


        :param status: The status of this Users.  # noqa: E501
        :type: str
        """
        if status is None:
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501
        allowed_values = ["NEW_MOBILE_ACCOUNT", "VERIFIED_ACCOUNT", "ACTIVATED_ACCOUNT", "DEACTIVATED_ACCOUNT", "BLOCKED_ACCOUNT", "LOST_MOBILE", "SPAM_ACCOUNT", "TEMP_PASSWORD"]  # 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 isonline(self):
        """Gets the isonline of this Users.  # noqa: E501


        :return: The isonline of this Users.  # noqa: E501
        :rtype: int
        """
        return self._isonline

    @isonline.setter
    def isonline(self, isonline):
        """Sets the isonline of this Users.


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

        self._isonline = isonline

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


        :return: The secret of this Users.  # noqa: E501
        :rtype: str
        """
        return self._secret

    @secret.setter
    def secret(self, secret):
        """Sets the secret of this Users.


        :param secret: The secret of this Users.  # noqa: E501
        :type: str
        """

        self._secret = secret

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


        :return: The validation_key of this Users.  # noqa: E501
        :rtype: str
        """
        return self._validation_key

    @validation_key.setter
    def validation_key(self, validation_key):
        """Sets the validation_key of this Users.


        :param validation_key: The validation_key of this Users.  # noqa: E501
        :type: str
        """

        self._validation_key = validation_key

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


        :return: The validation_key_updated of this Users.  # noqa: E501
        :rtype: datetime
        """
        return self._validation_key_updated

    @validation_key_updated.setter
    def validation_key_updated(self, validation_key_updated):
        """Sets the validation_key_updated of this Users.


        :param validation_key_updated: The validation_key_updated of this Users.  # noqa: E501
        :type: datetime
        """

        self._validation_key_updated = validation_key_updated

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


        :return: The validation_key_type of this Users.  # noqa: E501
        :rtype: str
        """
        return self._validation_key_type

    @validation_key_type.setter
    def validation_key_type(self, validation_key_type):
        """Sets the validation_key_type of this Users.


        :param validation_key_type: The validation_key_type of this Users.  # noqa: E501
        :type: str
        """
        allowed_values = ["EMAIL", "PASSWORD", "PASSWORD_RESET", "QR_RESET"]  # noqa: E501
        if validation_key_type not in allowed_values:
            raise ValueError(
                "Invalid value for `validation_key_type` ({0}), must be one of {1}"  # noqa: E501
                .format(validation_key_type, allowed_values)
            )

        self._validation_key_type = validation_key_type

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


        :return: The security_question of this Users.  # noqa: E501
        :rtype: str
        """
        return self._security_question

    @security_question.setter
    def security_question(self, security_question):
        """Sets the security_question of this Users.


        :param security_question: The security_question of this Users.  # noqa: E501
        :type: str
        """
        allowed_values = ["MAIDEN_NAME", "PET", "LOVE", "NICK_NAME", "CHILDHOOD_FRIEND", "STREET", "SIBLING_MAIDEN_NAME", "SCHOOL", "COUSIN_MAIDEN_NAME", "STUFFED_ANIMAL", "SIBLING_LIVE", "FIRST_JOB_TOWN"]  # noqa: E501
        if security_question not in allowed_values:
            raise ValueError(
                "Invalid value for `security_question` ({0}), must be one of {1}"  # noqa: E501
                .format(security_question, allowed_values)
            )

        self._security_question = security_question

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


        :return: The security_answer of this Users.  # noqa: E501
        :rtype: str
        """
        return self._security_answer

    @security_answer.setter
    def security_answer(self, security_answer):
        """Sets the security_answer of this Users.


        :param security_answer: The security_answer of this Users.  # noqa: E501
        :type: str
        """

        self._security_answer = security_answer

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


        :return: The mode of this Users.  # noqa: E501
        :rtype: str
        """
        return self._mode

    @mode.setter
    def mode(self, mode):
        """Sets the mode of this Users.


        :param mode: The mode of this Users.  # noqa: E501
        :type: str
        """
        if mode is None:
            raise ValueError("Invalid value for `mode`, must not be `None`")  # noqa: E501
        allowed_values = ["M_ACCOUNT_TYPE", "REMOTE_ACCOUNT_TYPE"]  # noqa: E501
        if mode not in allowed_values:
            raise ValueError(
                "Invalid value for `mode` ({0}), must be one of {1}"  # noqa: E501
                .format(mode, allowed_values)
            )

        self._mode = mode

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


        :return: The password_changed of this Users.  # noqa: E501
        :rtype: datetime
        """
        return self._password_changed

    @password_changed.setter
    def password_changed(self, password_changed):
        """Sets the password_changed of this Users.


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

        self._password_changed = password_changed

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


        :return: The notes of this Users.  # noqa: E501
        :rtype: str
        """
        return self._notes

    @notes.setter
    def notes(self, notes):
        """Sets the notes of this Users.


        :param notes: The notes of this Users.  # noqa: E501
        :type: str
        """

        self._notes = notes

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


        :return: The mobile of this Users.  # noqa: E501
        :rtype: str
        """
        return self._mobile

    @mobile.setter
    def mobile(self, mobile):
        """Sets the mobile of this Users.


        :param mobile: The mobile of this Users.  # noqa: E501
        :type: str
        """

        self._mobile = mobile

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


        :return: The max_num_projects of this Users.  # noqa: E501
        :rtype: int
        """
        return self._max_num_projects

    @max_num_projects.setter
    def max_num_projects(self, max_num_projects):
        """Sets the max_num_projects of this Users.


        :param max_num_projects: The max_num_projects of this Users.  # noqa: E501
        :type: int
        """

        self._max_num_projects = max_num_projects

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


        :return: The num_created_projects of this Users.  # noqa: E501
        :rtype: int
        """
        return self._num_created_projects

    @num_created_projects.setter
    def num_created_projects(self, num_created_projects):
        """Sets the num_created_projects of this Users.


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

        self._num_created_projects = num_created_projects

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


        :return: The num_active_projects of this Users.  # noqa: E501
        :rtype: int
        """
        return self._num_active_projects

    @num_active_projects.setter
    def num_active_projects(self, num_active_projects):
        """Sets the num_active_projects of this Users.


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

        self._num_active_projects = num_active_projects

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


        :return: The two_factor of this Users.  # noqa: E501
        :rtype: bool
        """
        return self._two_factor

    @two_factor.setter
    def two_factor(self, two_factor):
        """Sets the two_factor of this Users.


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

        self._two_factor = two_factor

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


        :return: The salt of this Users.  # noqa: E501
        :rtype: str
        """
        return self._salt

    @salt.setter
    def salt(self, salt):
        """Sets the salt of this Users.


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

        self._salt = salt

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


        :return: The tours_state of this Users.  # noqa: E501
        :rtype: int
        """
        return self._tours_state

    @tours_state.setter
    def tours_state(self, tours_state):
        """Sets the tours_state of this Users.


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

        self._tours_state = tours_state

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


        :return: The bbc_group_collection of this Users.  # noqa: E501
        :rtype: list[BbcGroup]
        """
        return self._bbc_group_collection

    @bbc_group_collection.setter
    def bbc_group_collection(self, bbc_group_collection):
        """Sets the bbc_group_collection of this Users.


        :param bbc_group_collection: The bbc_group_collection of this Users.  # noqa: E501
        :type: list[BbcGroup]
        """

        self._bbc_group_collection = bbc_group_collection

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


        :return: The address of this Users.  # noqa: E501
        :rtype: Address
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this Users.


        :param address: The address of this Users.  # noqa: E501
        :type: Address
        """

        self._address = address

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


        :return: The organization of this Users.  # noqa: E501
        :rtype: Organization
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """Sets the organization of this Users.


        :param organization: The organization of this Users.  # noqa: E501
        :type: Organization
        """

        self._organization = organization

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


        :return: The jupyter_settings_collection of this Users.  # noqa: E501
        :rtype: list[JupyterSettings]
        """
        return self._jupyter_settings_collection

    @jupyter_settings_collection.setter
    def jupyter_settings_collection(self, jupyter_settings_collection):
        """Sets the jupyter_settings_collection of this Users.


        :param jupyter_settings_collection: The jupyter_settings_collection of this Users.  # noqa: E501
        :type: list[JupyterSettings]
        """

        self._jupyter_settings_collection = jupyter_settings_collection

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


        :return: The tensor_board_collection of this Users.  # noqa: E501
        :rtype: list[TensorBoard]
        """
        return self._tensor_board_collection

    @tensor_board_collection.setter
    def tensor_board_collection(self, tensor_board_collection):
        """Sets the tensor_board_collection of this Users.


        :param tensor_board_collection: The tensor_board_collection of this Users.  # noqa: E501
        :type: list[TensorBoard]
        """

        self._tensor_board_collection = tensor_board_collection

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


        :return: The group_name of this Users.  # noqa: E501
        :rtype: str
        """
        return self._group_name

    @group_name.setter
    def group_name(self, group_name):
        """Sets the group_name of this Users.


        :param group_name: The group_name of this Users.  # noqa: E501
        :type: str
        """

        self._group_name = group_name

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


        :return: The group_names of this Users.  # noqa: E501
        :rtype: list[BbcGroup]
        """
        return self._group_names

    @group_names.setter
    def group_names(self, group_names):
        """Sets the group_names of this Users.


        :param group_names: The group_names of this Users.  # noqa: E501
        :type: list[BbcGroup]
        """

        self._group_names = group_names

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


        :return: The status_name of this Users.  # noqa: E501
        :rtype: str
        """
        return self._status_name

    @status_name.setter
    def status_name(self, status_name):
        """Sets the status_name of this Users.


        :param status_name: The status_name of this Users.  # noqa: E501
        :type: str
        """

        self._status_name = status_name

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

        return self.__dict__ == other.__dict__

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