# coding: utf-8

"""
    CloudCheckr API

    CloudCheckr API  # noqa: E501

    OpenAPI spec version: v1
    Contact: support@cloudcheckr.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class UserResponseModel(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',
        'customer_id': 'str',
        'roles': 'list[MappedRoleResponseModel]',
        'email': 'str',
        'saml_provider': 'UserSamlProviderResponseModel',
        'allowed_auth_types': 'list[str]',
        'created_date': 'datetime',
        'last_login_date': 'datetime',
        'is_activated': 'bool',
        'organization_note': 'str',
        'personal_note': 'str'
    }

    attribute_map = {
        'id': 'id',
        'customer_id': 'customerId',
        'roles': 'roles',
        'email': 'email',
        'saml_provider': 'samlProvider',
        'allowed_auth_types': 'allowedAuthTypes',
        'created_date': 'createdDate',
        'last_login_date': 'lastLoginDate',
        'is_activated': 'isActivated',
        'organization_note': 'organizationNote',
        'personal_note': 'personalNote'
    }

    def __init__(self, id=None, customer_id=None, roles=None, email=None, saml_provider=None, allowed_auth_types=None, created_date=None, last_login_date=None, is_activated=None, organization_note=None, personal_note=None):  # noqa: E501
        """UserResponseModel - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._customer_id = None
        self._roles = None
        self._email = None
        self._saml_provider = None
        self._allowed_auth_types = None
        self._created_date = None
        self._last_login_date = None
        self._is_activated = None
        self._organization_note = None
        self._personal_note = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if customer_id is not None:
            self.customer_id = customer_id
        if roles is not None:
            self.roles = roles
        if email is not None:
            self.email = email
        if saml_provider is not None:
            self.saml_provider = saml_provider
        if allowed_auth_types is not None:
            self.allowed_auth_types = allowed_auth_types
        if created_date is not None:
            self.created_date = created_date
        if last_login_date is not None:
            self.last_login_date = last_login_date
        if is_activated is not None:
            self.is_activated = is_activated
        if organization_note is not None:
            self.organization_note = organization_note
        if personal_note is not None:
            self.personal_note = personal_note

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

        The user's unique ID.  # noqa: E501

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

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

        The user's unique ID.  # noqa: E501

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

        self._id = id

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

        The ID of the customer that manages the user.  # noqa: E501

        :return: The customer_id of this UserResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._customer_id

    @customer_id.setter
    def customer_id(self, customer_id):
        """Sets the customer_id of this UserResponseModel.

        The ID of the customer that manages the user.  # noqa: E501

        :param customer_id: The customer_id of this UserResponseModel.  # noqa: E501
        :type: str
        """

        self._customer_id = customer_id

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

        The roles that are assigned to the user.  # noqa: E501

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

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

        The roles that are assigned to the user.  # noqa: E501

        :param roles: The roles of this UserResponseModel.  # noqa: E501
        :type: list[MappedRoleResponseModel]
        """

        self._roles = roles

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

        The user's email address. This property supports: sorting and filtering.  # noqa: E501

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

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

        The user's email address. This property supports: sorting and filtering.  # noqa: E501

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

        self._email = email

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

        The user's SAML provider.  # noqa: E501

        :return: The saml_provider of this UserResponseModel.  # noqa: E501
        :rtype: UserSamlProviderResponseModel
        """
        return self._saml_provider

    @saml_provider.setter
    def saml_provider(self, saml_provider):
        """Sets the saml_provider of this UserResponseModel.

        The user's SAML provider.  # noqa: E501

        :param saml_provider: The saml_provider of this UserResponseModel.  # noqa: E501
        :type: UserSamlProviderResponseModel
        """

        self._saml_provider = saml_provider

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

        The user's allowed authorization types.  # noqa: E501

        :return: The allowed_auth_types of this UserResponseModel.  # noqa: E501
        :rtype: list[str]
        """
        return self._allowed_auth_types

    @allowed_auth_types.setter
    def allowed_auth_types(self, allowed_auth_types):
        """Sets the allowed_auth_types of this UserResponseModel.

        The user's allowed authorization types.  # noqa: E501

        :param allowed_auth_types: The allowed_auth_types of this UserResponseModel.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["UsernamePassword", "Saml", "Ldap", "AzureAD"]  # noqa: E501
        if not set(allowed_auth_types).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `allowed_auth_types` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(allowed_auth_types) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._allowed_auth_types = allowed_auth_types

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

        The user's creation date. This property supports: sorting and filtering.  # noqa: E501

        :return: The created_date of this UserResponseModel.  # noqa: E501
        :rtype: datetime
        """
        return self._created_date

    @created_date.setter
    def created_date(self, created_date):
        """Sets the created_date of this UserResponseModel.

        The user's creation date. This property supports: sorting and filtering.  # noqa: E501

        :param created_date: The created_date of this UserResponseModel.  # noqa: E501
        :type: datetime
        """

        self._created_date = created_date

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

        The user's last login date. This property supports: sorting and filtering.  # noqa: E501

        :return: The last_login_date of this UserResponseModel.  # noqa: E501
        :rtype: datetime
        """
        return self._last_login_date

    @last_login_date.setter
    def last_login_date(self, last_login_date):
        """Sets the last_login_date of this UserResponseModel.

        The user's last login date. This property supports: sorting and filtering.  # noqa: E501

        :param last_login_date: The last_login_date of this UserResponseModel.  # noqa: E501
        :type: datetime
        """

        self._last_login_date = last_login_date

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

        The user's activation status. Some actions may be limited if the user is inactive. This property supports: filtering.  # noqa: E501

        :return: The is_activated of this UserResponseModel.  # noqa: E501
        :rtype: bool
        """
        return self._is_activated

    @is_activated.setter
    def is_activated(self, is_activated):
        """Sets the is_activated of this UserResponseModel.

        The user's activation status. Some actions may be limited if the user is inactive. This property supports: filtering.  # noqa: E501

        :param is_activated: The is_activated of this UserResponseModel.  # noqa: E501
        :type: bool
        """

        self._is_activated = is_activated

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

        The user's organizational, shared note.  # noqa: E501

        :return: The organization_note of this UserResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._organization_note

    @organization_note.setter
    def organization_note(self, organization_note):
        """Sets the organization_note of this UserResponseModel.

        The user's organizational, shared note.  # noqa: E501

        :param organization_note: The organization_note of this UserResponseModel.  # noqa: E501
        :type: str
        """

        self._organization_note = organization_note

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

        The user's personal note.  # noqa: E501

        :return: The personal_note of this UserResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._personal_note

    @personal_note.setter
    def personal_note(self, personal_note):
        """Sets the personal_note of this UserResponseModel.

        The user's personal note.  # noqa: E501

        :param personal_note: The personal_note of this UserResponseModel.  # noqa: E501
        :type: str
        """

        self._personal_note = personal_note

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

        return self.__dict__ == other.__dict__

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