# coding: utf-8

"""
    identity-service

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from dhicn_identity_service.configuration import Configuration


class UserInformation(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'id': 'str',
        'user_name': 'str',
        'sur_name': 'str',
        'phone_number': 'str',
        'email': 'str',
        'role_infos': 'list[RoleInfo]'
    }

    attribute_map = {
        'id': 'id',
        'user_name': 'userName',
        'sur_name': 'surName',
        'phone_number': 'phoneNumber',
        'email': 'email',
        'role_infos': 'roleInfos'
    }

    def __init__(self, id=None, user_name=None, sur_name=None, phone_number=None, email=None, role_infos=None, local_vars_configuration=None):  # noqa: E501
        """UserInformation - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._user_name = None
        self._sur_name = None
        self._phone_number = None
        self._email = None
        self._role_infos = None
        self.discriminator = None

        if id is not None:
            self.id = id
        self.user_name = user_name
        self.sur_name = sur_name
        self.phone_number = phone_number
        self.email = email
        self.role_infos = role_infos

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


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

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


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

        self._id = id

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


        :return: The user_name of this UserInformation.  # noqa: E501
        :rtype: str
        """
        return self._user_name

    @user_name.setter
    def user_name(self, user_name):
        """Sets the user_name of this UserInformation.


        :param user_name: The user_name of this UserInformation.  # noqa: E501
        :type: str
        """

        self._user_name = user_name

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


        :return: The sur_name of this UserInformation.  # noqa: E501
        :rtype: str
        """
        return self._sur_name

    @sur_name.setter
    def sur_name(self, sur_name):
        """Sets the sur_name of this UserInformation.


        :param sur_name: The sur_name of this UserInformation.  # noqa: E501
        :type: str
        """

        self._sur_name = sur_name

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


        :return: The phone_number of this UserInformation.  # noqa: E501
        :rtype: str
        """
        return self._phone_number

    @phone_number.setter
    def phone_number(self, phone_number):
        """Sets the phone_number of this UserInformation.


        :param phone_number: The phone_number of this UserInformation.  # noqa: E501
        :type: str
        """

        self._phone_number = phone_number

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


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

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


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

        self._email = email

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


        :return: The role_infos of this UserInformation.  # noqa: E501
        :rtype: list[RoleInfo]
        """
        return self._role_infos

    @role_infos.setter
    def role_infos(self, role_infos):
        """Sets the role_infos of this UserInformation.


        :param role_infos: The role_infos of this UserInformation.  # noqa: E501
        :type: list[RoleInfo]
        """

        self._role_infos = role_infos

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

        for attr, _ in six.iteritems(self.openapi_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, UserInformation):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
