# coding: utf-8

"""
    Memsource REST API

    Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis-qa-with-the-memsource-api-team/).    If you have any questions, please contact [Memsource Support](<mailto:support@memsource.com>).  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from memsource_cli.models.email import Email  # noqa: F401,E501
from memsource_cli.models.name import Name  # noqa: F401,E501
from memsource_cli.models.scim_meta import ScimMeta  # noqa: F401,E501


class ScimUserCoreDto(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',
        'user_name': 'str',
        'name': 'Name',
        'active': 'bool',
        'emails': 'list[Email]',
        'meta': 'ScimMeta'
    }

    attribute_map = {
        'id': 'id',
        'user_name': 'userName',
        'name': 'name',
        'active': 'active',
        'emails': 'emails',
        'meta': 'meta'
    }

    def __init__(self, id=None, user_name=None, name=None, active=None, emails=None, meta=None):  # noqa: E501
        """ScimUserCoreDto - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._user_name = None
        self._name = None
        self._active = None
        self._emails = None
        self._meta = None
        self.discriminator = None

        if id is not None:
            self.id = id
        self.user_name = user_name
        self.name = name
        if active is not None:
            self.active = active
        self.emails = emails
        if meta is not None:
            self.meta = meta

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


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

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


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

        self._id = id

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


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

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


        :param user_name: The user_name of this ScimUserCoreDto.  # noqa: E501
        :type: str
        """
        if user_name is None:
            raise ValueError("Invalid value for `user_name`, must not be `None`")  # noqa: E501

        self._user_name = user_name

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


        :return: The name of this ScimUserCoreDto.  # noqa: E501
        :rtype: Name
        """
        return self._name

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


        :param name: The name of this ScimUserCoreDto.  # noqa: E501
        :type: Name
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        Default: true  # noqa: E501

        :return: The active of this ScimUserCoreDto.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this ScimUserCoreDto.

        Default: true  # noqa: E501

        :param active: The active of this ScimUserCoreDto.  # noqa: E501
        :type: bool
        """

        self._active = active

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


        :return: The emails of this ScimUserCoreDto.  # noqa: E501
        :rtype: list[Email]
        """
        return self._emails

    @emails.setter
    def emails(self, emails):
        """Sets the emails of this ScimUserCoreDto.


        :param emails: The emails of this ScimUserCoreDto.  # noqa: E501
        :type: list[Email]
        """
        if emails is None:
            raise ValueError("Invalid value for `emails`, must not be `None`")  # noqa: E501

        self._emails = emails

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


        :return: The meta of this ScimUserCoreDto.  # noqa: E501
        :rtype: ScimMeta
        """
        return self._meta

    @meta.setter
    def meta(self, meta):
        """Sets the meta of this ScimUserCoreDto.


        :param meta: The meta of this ScimUserCoreDto.  # noqa: E501
        :type: ScimMeta
        """

        self._meta = meta

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

        return self.__dict__ == other.__dict__

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