# coding: utf-8

"""
    XMS API

    XMS is the controller of distributed storage system  # noqa: E501

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


import pprint
import re  # noqa: F401
import six

# from xms_client.models.identity_platform_nestview import IdentityPlatformNestview  # noqa: F401,E501
# from xms_client.models.user import User  # noqa: F401,E501


class UserRecord(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 = {
        'create': 'datetime',
        'email': 'str',
        'enabled': 'bool',
        'external_id': 'str',
        'id': 'int',
        'identity_platform': 'IdentityPlatformNestview',
        'name': 'str',
        'roles': 'list[str]'
    }

    attribute_map = {
        'create': 'create',
        'email': 'email',
        'enabled': 'enabled',
        'external_id': 'external_id',
        'id': 'id',
        'identity_platform': 'identity_platform',
        'name': 'name',
        'roles': 'roles'
    }

    def __init__(self, create=None, email=None, enabled=None, external_id=None, id=None, identity_platform=None, name=None, roles=None):  # noqa: E501
        """UserRecord - a model defined in Swagger"""  # noqa: E501

        self._create = None
        self._email = None
        self._enabled = None
        self._external_id = None
        self._id = None
        self._identity_platform = None
        self._name = None
        self._roles = None
        self.discriminator = None

        if create is not None:
            self.create = create
        if email is not None:
            self.email = email
        if enabled is not None:
            self.enabled = enabled
        if external_id is not None:
            self.external_id = external_id
        if id is not None:
            self.id = id
        if identity_platform is not None:
            self.identity_platform = identity_platform
        if name is not None:
            self.name = name
        if roles is not None:
            self.roles = roles

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

        time of creating user  # noqa: E501

        :return: The create of this UserRecord.  # noqa: E501
        :rtype: datetime
        """
        return self._create

    @create.setter
    def create(self, create):
        """Sets the create of this UserRecord.

        time of creating user  # noqa: E501

        :param create: The create of this UserRecord.  # noqa: E501
        :type: datetime
        """

        self._create = create

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

        email of user  # noqa: E501

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

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

        email of user  # noqa: E501

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

        self._email = email

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

        enable the user or not  # noqa: E501

        :return: The enabled of this UserRecord.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this UserRecord.

        enable the user or not  # noqa: E501

        :param enabled: The enabled of this UserRecord.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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

        external id of user  # noqa: E501

        :return: The external_id of this UserRecord.  # noqa: E501
        :rtype: str
        """
        return self._external_id

    @external_id.setter
    def external_id(self, external_id):
        """Sets the external_id of this UserRecord.

        external id of user  # noqa: E501

        :param external_id: The external_id of this UserRecord.  # noqa: E501
        :type: str
        """

        self._external_id = external_id

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

        id of user  # noqa: E501

        :return: The id of this UserRecord.  # noqa: E501
        :rtype: int
        """
        return self._id

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

        id of user  # noqa: E501

        :param id: The id of this UserRecord.  # noqa: E501
        :type: int
        """

        self._id = id

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

        identity platform of user  # noqa: E501

        :return: The identity_platform of this UserRecord.  # noqa: E501
        :rtype: IdentityPlatformNestview
        """
        return self._identity_platform

    @identity_platform.setter
    def identity_platform(self, identity_platform):
        """Sets the identity_platform of this UserRecord.

        identity platform of user  # noqa: E501

        :param identity_platform: The identity_platform of this UserRecord.  # noqa: E501
        :type: IdentityPlatformNestview
        """

        self._identity_platform = identity_platform

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

        name of user  # noqa: E501

        :return: The name of this UserRecord.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this UserRecord.

        name of user  # noqa: E501

        :param name: The name of this UserRecord.  # noqa: E501
        :type: str
        """

        self._name = name

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

        roles of user  # noqa: E501

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

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

        roles of user  # noqa: E501

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

        self._roles = roles

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

        return self.__dict__ == other.__dict__

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