# coding: utf-8

"""
    Layered Insight Assessment, Compliance, Witness & Control

    LI Assessment & Compliance performs static vulnerability analysis, license and package compliance. LI Witness provides deep insight and analytics into containerized applications. Control provides dynamic runtime security and analytics for containerized applications. You can find out more about the Layered Insight Suite at [http://layeredinsight.com](http://layeredinsight.com).

    OpenAPI spec version: 0.10
    Contact: help@layeredinsight.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class CommonUser(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 = {
        'id': 'str',
        'username': 'str',
        'password': 'str',
        'first_name': 'str',
        'last_name': 'str',
        'email': 'str',
        'company_id': 'str',
        'suspended': 'str',
        'ui_setting': 'CommonUserUISetting',
        'group_id': 'str',
        'roles': 'list[Role]'
    }

    attribute_map = {
        'id': 'ID',
        'username': 'Username',
        'password': 'Password',
        'first_name': 'FirstName',
        'last_name': 'LastName',
        'email': 'Email',
        'company_id': 'CompanyID',
        'suspended': 'Suspended',
        'ui_setting': 'UISetting',
        'group_id': 'GroupID',
        'roles': 'Roles'
    }

    def __init__(self, id=None, username=None, password=None, first_name=None, last_name=None, email=None, company_id=None, suspended=None, ui_setting=None, group_id=None, roles=None):
        """
        CommonUser - a model defined in Swagger
        """

        self._id = None
        self._username = None
        self._password = None
        self._first_name = None
        self._last_name = None
        self._email = None
        self._company_id = None
        self._suspended = None
        self._ui_setting = None
        self._group_id = None
        self._roles = None

        if id is not None:
          self.id = id
        if username is not None:
          self.username = username
        if password is not None:
          self.password = password
        if first_name is not None:
          self.first_name = first_name
        if last_name is not None:
          self.last_name = last_name
        if email is not None:
          self.email = email
        if company_id is not None:
          self.company_id = company_id
        if suspended is not None:
          self.suspended = suspended
        if ui_setting is not None:
          self.ui_setting = ui_setting
        if group_id is not None:
          self.group_id = group_id
        if roles is not None:
          self.roles = roles

    @property
    def id(self):
        """
        Gets the id of this CommonUser.
        BsonObjectID string unique to the User

        :return: The id of this CommonUser.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this CommonUser.
        BsonObjectID string unique to the User

        :param id: The id of this CommonUser.
        :type: str
        """

        self._id = id

    @property
    def username(self):
        """
        Gets the username of this CommonUser.
        Username of the User

        :return: The username of this CommonUser.
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """
        Sets the username of this CommonUser.
        Username of the User

        :param username: The username of this CommonUser.
        :type: str
        """

        self._username = username

    @property
    def password(self):
        """
        Gets the password of this CommonUser.
        Encrypted password of the User

        :return: The password of this CommonUser.
        :rtype: str
        """
        return self._password

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

        :param password: The password of this CommonUser.
        :type: str
        """

        self._password = password

    @property
    def first_name(self):
        """
        Gets the first_name of this CommonUser.
        First Name of the User

        :return: The first_name of this CommonUser.
        :rtype: str
        """
        return self._first_name

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

        :param first_name: The first_name of this CommonUser.
        :type: str
        """

        self._first_name = first_name

    @property
    def last_name(self):
        """
        Gets the last_name of this CommonUser.
        Last Name of the User

        :return: The last_name of this CommonUser.
        :rtype: str
        """
        return self._last_name

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

        :param last_name: The last_name of this CommonUser.
        :type: str
        """

        self._last_name = last_name

    @property
    def email(self):
        """
        Gets the email of this CommonUser.
        Email ID of the User

        :return: The email of this CommonUser.
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """
        Sets the email of this CommonUser.
        Email ID of the User

        :param email: The email of this CommonUser.
        :type: str
        """

        self._email = email

    @property
    def company_id(self):
        """
        Gets the company_id of this CommonUser.
        BsonObjectID string unique to the company

        :return: The company_id of this CommonUser.
        :rtype: str
        """
        return self._company_id

    @company_id.setter
    def company_id(self, company_id):
        """
        Sets the company_id of this CommonUser.
        BsonObjectID string unique to the company

        :param company_id: The company_id of this CommonUser.
        :type: str
        """

        self._company_id = company_id

    @property
    def suspended(self):
        """
        Gets the suspended of this CommonUser.
        Indicates if the User has been suspended or not

        :return: The suspended of this CommonUser.
        :rtype: str
        """
        return self._suspended

    @suspended.setter
    def suspended(self, suspended):
        """
        Sets the suspended of this CommonUser.
        Indicates if the User has been suspended or not

        :param suspended: The suspended of this CommonUser.
        :type: str
        """

        self._suspended = suspended

    @property
    def ui_setting(self):
        """
        Gets the ui_setting of this CommonUser.

        :return: The ui_setting of this CommonUser.
        :rtype: CommonUserUISetting
        """
        return self._ui_setting

    @ui_setting.setter
    def ui_setting(self, ui_setting):
        """
        Sets the ui_setting of this CommonUser.

        :param ui_setting: The ui_setting of this CommonUser.
        :type: CommonUserUISetting
        """

        self._ui_setting = ui_setting

    @property
    def group_id(self):
        """
        Gets the group_id of this CommonUser.
        BsonObjectID string of the group to which the user belongs

        :return: The group_id of this CommonUser.
        :rtype: str
        """
        return self._group_id

    @group_id.setter
    def group_id(self, group_id):
        """
        Sets the group_id of this CommonUser.
        BsonObjectID string of the group to which the user belongs

        :param group_id: The group_id of this CommonUser.
        :type: str
        """

        self._group_id = group_id

    @property
    def roles(self):
        """
        Gets the roles of this CommonUser.
        Roles assigned to the User

        :return: The roles of this CommonUser.
        :rtype: list[Role]
        """
        return self._roles

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

        :param roles: The roles of this CommonUser.
        :type: list[Role]
        """

        self._roles = roles

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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 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, CommonUser):
            return False

        return self.__dict__ == other.__dict__

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