# coding: utf-8

"""
    Managed Ray API

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

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


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class UserInfo(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',
        'email': 'str',
        'name': 'str',
        'lastname': 'str',
        'username': 'str',
        'verified': 'bool',
        'organization_permission_level': 'OrganizationPermissionLevel',
        'organization_ids': 'list[str]',
        'organizations': 'list[Organization]',
        'has_setup_cloud': 'bool',
        'ld_hash': 'str',
        'ld_hash_fields': 'list[str]',
        'is_support_user': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'email': 'email',
        'name': 'name',
        'lastname': 'lastname',
        'username': 'username',
        'verified': 'verified',
        'organization_permission_level': 'organization_permission_level',
        'organization_ids': 'organization_ids',
        'organizations': 'organizations',
        'has_setup_cloud': 'has_setup_cloud',
        'ld_hash': 'ld_hash',
        'ld_hash_fields': 'ld_hash_fields',
        'is_support_user': 'is_support_user'
    }

    def __init__(self, id=None, email=None, name=None, lastname=None, username=None, verified=None, organization_permission_level=None, organization_ids=None, organizations=None, has_setup_cloud=None, ld_hash=None, ld_hash_fields=None, is_support_user=False, local_vars_configuration=None):  # noqa: E501
        """UserInfo - 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._email = None
        self._name = None
        self._lastname = None
        self._username = None
        self._verified = None
        self._organization_permission_level = None
        self._organization_ids = None
        self._organizations = None
        self._has_setup_cloud = None
        self._ld_hash = None
        self._ld_hash_fields = None
        self._is_support_user = None
        self.discriminator = None

        self.id = id
        self.email = email
        self.name = name
        if lastname is not None:
            self.lastname = lastname
        self.username = username
        self.verified = verified
        self.organization_permission_level = organization_permission_level
        self.organization_ids = organization_ids
        self.organizations = organizations
        if has_setup_cloud is not None:
            self.has_setup_cloud = has_setup_cloud
        self.ld_hash = ld_hash
        self.ld_hash_fields = ld_hash_fields
        if is_support_user is not None:
            self.is_support_user = is_support_user

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


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

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


        :param id: The id of this UserInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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


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

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


        :param email: The email of this UserInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and email is None:  # noqa: E501
            raise ValueError("Invalid value for `email`, must not be `None`")  # noqa: E501

        self._email = email

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


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

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


        :param name: The name of this UserInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        The user's last name.  # noqa: E501

        :return: The lastname of this UserInfo.  # noqa: E501
        :rtype: str
        """
        return self._lastname

    @lastname.setter
    def lastname(self, lastname):
        """Sets the lastname of this UserInfo.

        The user's last name.  # noqa: E501

        :param lastname: The lastname of this UserInfo.  # noqa: E501
        :type: str
        """

        self._lastname = lastname

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


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

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


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

        self._username = username

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


        :return: The verified of this UserInfo.  # noqa: E501
        :rtype: bool
        """
        return self._verified

    @verified.setter
    def verified(self, verified):
        """Sets the verified of this UserInfo.


        :param verified: The verified of this UserInfo.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and verified is None:  # noqa: E501
            raise ValueError("Invalid value for `verified`, must not be `None`")  # noqa: E501

        self._verified = verified

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

        User's permission level in the organization. This value is absent if the user does not have a permission level assigned.  # noqa: E501

        :return: The organization_permission_level of this UserInfo.  # noqa: E501
        :rtype: OrganizationPermissionLevel
        """
        return self._organization_permission_level

    @organization_permission_level.setter
    def organization_permission_level(self, organization_permission_level):
        """Sets the organization_permission_level of this UserInfo.

        User's permission level in the organization. This value is absent if the user does not have a permission level assigned.  # noqa: E501

        :param organization_permission_level: The organization_permission_level of this UserInfo.  # noqa: E501
        :type: OrganizationPermissionLevel
        """
        if self.local_vars_configuration.client_side_validation and organization_permission_level is None:  # noqa: E501
            raise ValueError("Invalid value for `organization_permission_level`, must not be `None`")  # noqa: E501

        self._organization_permission_level = organization_permission_level

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

        Deprecated: use organization -- List of organizations that the logged in user is a part of.  # noqa: E501

        :return: The organization_ids of this UserInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._organization_ids

    @organization_ids.setter
    def organization_ids(self, organization_ids):
        """Sets the organization_ids of this UserInfo.

        Deprecated: use organization -- List of organizations that the logged in user is a part of.  # noqa: E501

        :param organization_ids: The organization_ids of this UserInfo.  # noqa: E501
        :type: list[str]
        """
        if self.local_vars_configuration.client_side_validation and organization_ids is None:  # noqa: E501
            raise ValueError("Invalid value for `organization_ids`, must not be `None`")  # noqa: E501

        self._organization_ids = organization_ids

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

        List of organizations that the logged in user is a part of.  # noqa: E501

        :return: The organizations of this UserInfo.  # noqa: E501
        :rtype: list[Organization]
        """
        return self._organizations

    @organizations.setter
    def organizations(self, organizations):
        """Sets the organizations of this UserInfo.

        List of organizations that the logged in user is a part of.  # noqa: E501

        :param organizations: The organizations of this UserInfo.  # noqa: E501
        :type: list[Organization]
        """
        if self.local_vars_configuration.client_side_validation and organizations is None:  # noqa: E501
            raise ValueError("Invalid value for `organizations`, must not be `None`")  # noqa: E501

        self._organizations = organizations

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

        True if the user has clouds setup in their organization.  # noqa: E501

        :return: The has_setup_cloud of this UserInfo.  # noqa: E501
        :rtype: bool
        """
        return self._has_setup_cloud

    @has_setup_cloud.setter
    def has_setup_cloud(self, has_setup_cloud):
        """Sets the has_setup_cloud of this UserInfo.

        True if the user has clouds setup in their organization.  # noqa: E501

        :param has_setup_cloud: The has_setup_cloud of this UserInfo.  # noqa: E501
        :type: bool
        """

        self._has_setup_cloud = has_setup_cloud

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

        Server generated secure hash of the user info that should be sent to LaunchDarkly along with the user data.  # noqa: E501

        :return: The ld_hash of this UserInfo.  # noqa: E501
        :rtype: str
        """
        return self._ld_hash

    @ld_hash.setter
    def ld_hash(self, ld_hash):
        """Sets the ld_hash of this UserInfo.

        Server generated secure hash of the user info that should be sent to LaunchDarkly along with the user data.  # noqa: E501

        :param ld_hash: The ld_hash of this UserInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and ld_hash is None:  # noqa: E501
            raise ValueError("Invalid value for `ld_hash`, must not be `None`")  # noqa: E501

        self._ld_hash = ld_hash

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

        List of fields in the userInfo used to generate the secure hash. Clients should send those fields to LaunchDarkly as the user data. These fields should be used in addition to the \"key\" field which is based off the user's id.  # noqa: E501

        :return: The ld_hash_fields of this UserInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._ld_hash_fields

    @ld_hash_fields.setter
    def ld_hash_fields(self, ld_hash_fields):
        """Sets the ld_hash_fields of this UserInfo.

        List of fields in the userInfo used to generate the secure hash. Clients should send those fields to LaunchDarkly as the user data. These fields should be used in addition to the \"key\" field which is based off the user's id.  # noqa: E501

        :param ld_hash_fields: The ld_hash_fields of this UserInfo.  # noqa: E501
        :type: list[str]
        """
        if self.local_vars_configuration.client_side_validation and ld_hash_fields is None:  # noqa: E501
            raise ValueError("Invalid value for `ld_hash_fields`, must not be `None`")  # noqa: E501

        self._ld_hash_fields = ld_hash_fields

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


        :return: The is_support_user of this UserInfo.  # noqa: E501
        :rtype: bool
        """
        return self._is_support_user

    @is_support_user.setter
    def is_support_user(self, is_support_user):
        """Sets the is_support_user of this UserInfo.


        :param is_support_user: The is_support_user of this UserInfo.  # noqa: E501
        :type: bool
        """

        self._is_support_user = is_support_user

    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, UserInfo):
            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, UserInfo):
            return True

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