# coding: utf-8

"""
    Yanport API

    ## À propos Voici quelques ressources qui vous aideront à explorer notre API, si vous avez des problèmes ou des demandes, veuillez contacter le [support](mailto:support@yanport.com). ## REST API Nos services webs utilisent le protocle **HTTPS** sur le port 443, tout accès en HTTP sur le port 80 est bloqué par notre pare-feu. Les échanges de données sont réalisés en **JSON**. ## Authentification Avant de commencer à explorer notre API, vous devez nous [contacter](https://www.yanport.com/contact) afin d'obtenir un [JSON Web Token](https://jwt.io) (**JWT**) qui vous permettra de vous identifier à chaque requêtes. ### JWT (header) La méthode privilégiée pour s'authentifier est de passer à chaque requêtes le token dans le header `Authorization: Bearer {{ JWT }}` en remplaçant `{{ JWT }}` par votre token. ### JWT (query param) Il est aussi possible de passer le token directement en query param de la requête `https://api.yanport.com/?token={{ JWT }}`. (_privilégié le passage par header en production._) ## Pour démarrer Lorsque vous disposez de votre token d'authentification, vous pouvez commencer à explorer notre API grâce au boutton  `Try it out` sur chacun de nos webs services. Mais au préalable, vous devez vous authentifier en cliquant sur le boutton `Authorize `, en remplissant l'input `api_key` avec `Bearer {{ JWT }}`.  **Exemple** `Bearer eyUEkiLCJh...CHCUiBfD63oxoo=` ## Limitation Toutes les requêtes à notre API sont loggées, c'est pourquoi vous devez respecter nos [CGU](https://dev.yanport.com/cgu) afin d'éviter tout usage abusif de notre API. 

    OpenAPI spec version: 1.0
    Contact: dev@yanport.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class User(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': 'int',
        'organization_id': 'int',
        'title': 'str',
        'username': 'str',
        'first_name': 'str',
        'last_name': 'str',
        'email': 'str',
        'mobile_phone_number': 'str',
        'office_phone_nuber': 'str',
        'avatar_url': 'str',
        'agencies': 'list[int]',
        'mandatary_network_id': 'int',
        'capsule_id': 'str',
        'creation_date': 'datetime',
        'active': 'bool',
        'admin': 'bool',
        'first_connection': 'bool',
        'user_preference': 'UserUserPreference',
        'hosts': 'list[str]'
    }

    attribute_map = {
        'id': 'id',
        'organization_id': 'organizationId',
        'title': 'title',
        'username': 'username',
        'first_name': 'firstName',
        'last_name': 'lastName',
        'email': 'email',
        'mobile_phone_number': 'mobilePhoneNumber',
        'office_phone_nuber': 'officePhoneNuber',
        'avatar_url': 'avatarUrl',
        'agencies': 'agencies',
        'mandatary_network_id': 'mandataryNetworkId',
        'capsule_id': 'capsuleId',
        'creation_date': 'creationDate',
        'active': 'active',
        'admin': 'admin',
        'first_connection': 'firstConnection',
        'user_preference': 'userPreference',
        'hosts': 'hosts'
    }

    def __init__(self, id=None, organization_id=None, title=None, username=None, first_name=None, last_name=None, email=None, mobile_phone_number=None, office_phone_nuber=None, avatar_url=None, agencies=None, mandatary_network_id=None, capsule_id=None, creation_date=None, active=None, admin=None, first_connection=None, user_preference=None, hosts=None):
        """
        User - a model defined in Swagger
        """

        self._id = None
        self._organization_id = None
        self._title = None
        self._username = None
        self._first_name = None
        self._last_name = None
        self._email = None
        self._mobile_phone_number = None
        self._office_phone_nuber = None
        self._avatar_url = None
        self._agencies = None
        self._mandatary_network_id = None
        self._capsule_id = None
        self._creation_date = None
        self._active = None
        self._admin = None
        self._first_connection = None
        self._user_preference = None
        self._hosts = None

        if id is not None:
          self.id = id
        if organization_id is not None:
          self.organization_id = organization_id
        if title is not None:
          self.title = title
        if username is not None:
          self.username = username
        if first_name is not None:
          self.first_name = first_name
        if last_name is not None:
          self.last_name = last_name
        if email is not None:
          self.email = email
        if mobile_phone_number is not None:
          self.mobile_phone_number = mobile_phone_number
        if office_phone_nuber is not None:
          self.office_phone_nuber = office_phone_nuber
        if avatar_url is not None:
          self.avatar_url = avatar_url
        if agencies is not None:
          self.agencies = agencies
        if mandatary_network_id is not None:
          self.mandatary_network_id = mandatary_network_id
        if capsule_id is not None:
          self.capsule_id = capsule_id
        if creation_date is not None:
          self.creation_date = creation_date
        if active is not None:
          self.active = active
        if admin is not None:
          self.admin = admin
        if first_connection is not None:
          self.first_connection = first_connection
        if user_preference is not None:
          self.user_preference = user_preference
        if hosts is not None:
          self.hosts = hosts

    @property
    def id(self):
        """
        Gets the id of this User.

        :return: The id of this User.
        :rtype: int
        """
        return self._id

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

        :param id: The id of this User.
        :type: int
        """

        self._id = id

    @property
    def organization_id(self):
        """
        Gets the organization_id of this User.

        :return: The organization_id of this User.
        :rtype: int
        """
        return self._organization_id

    @organization_id.setter
    def organization_id(self, organization_id):
        """
        Sets the organization_id of this User.

        :param organization_id: The organization_id of this User.
        :type: int
        """

        self._organization_id = organization_id

    @property
    def title(self):
        """
        Gets the title of this User.

        :return: The title of this User.
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """
        Sets the title of this User.

        :param title: The title of this User.
        :type: str
        """
        allowed_values = ["MR", "MRS"]
        if title not in allowed_values:
            raise ValueError(
                "Invalid value for `title` ({0}), must be one of {1}"
                .format(title, allowed_values)
            )

        self._title = title

    @property
    def username(self):
        """
        Gets the username of this User.

        :return: The username of this User.
        :rtype: str
        """
        return self._username

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

        :param username: The username of this User.
        :type: str
        """

        self._username = username

    @property
    def first_name(self):
        """
        Gets the first_name of this User.

        :return: The first_name of this User.
        :rtype: str
        """
        return self._first_name

    @first_name.setter
    def first_name(self, first_name):
        """
        Sets the first_name of this User.

        :param first_name: The first_name of this User.
        :type: str
        """

        self._first_name = first_name

    @property
    def last_name(self):
        """
        Gets the last_name of this User.

        :return: The last_name of this User.
        :rtype: str
        """
        return self._last_name

    @last_name.setter
    def last_name(self, last_name):
        """
        Sets the last_name of this User.

        :param last_name: The last_name of this User.
        :type: str
        """

        self._last_name = last_name

    @property
    def email(self):
        """
        Gets the email of this User.

        :return: The email of this User.
        :rtype: str
        """
        return self._email

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

        :param email: The email of this User.
        :type: str
        """

        self._email = email

    @property
    def mobile_phone_number(self):
        """
        Gets the mobile_phone_number of this User.

        :return: The mobile_phone_number of this User.
        :rtype: str
        """
        return self._mobile_phone_number

    @mobile_phone_number.setter
    def mobile_phone_number(self, mobile_phone_number):
        """
        Sets the mobile_phone_number of this User.

        :param mobile_phone_number: The mobile_phone_number of this User.
        :type: str
        """

        self._mobile_phone_number = mobile_phone_number

    @property
    def office_phone_nuber(self):
        """
        Gets the office_phone_nuber of this User.

        :return: The office_phone_nuber of this User.
        :rtype: str
        """
        return self._office_phone_nuber

    @office_phone_nuber.setter
    def office_phone_nuber(self, office_phone_nuber):
        """
        Sets the office_phone_nuber of this User.

        :param office_phone_nuber: The office_phone_nuber of this User.
        :type: str
        """

        self._office_phone_nuber = office_phone_nuber

    @property
    def avatar_url(self):
        """
        Gets the avatar_url of this User.

        :return: The avatar_url of this User.
        :rtype: str
        """
        return self._avatar_url

    @avatar_url.setter
    def avatar_url(self, avatar_url):
        """
        Sets the avatar_url of this User.

        :param avatar_url: The avatar_url of this User.
        :type: str
        """

        self._avatar_url = avatar_url

    @property
    def agencies(self):
        """
        Gets the agencies of this User.

        :return: The agencies of this User.
        :rtype: list[int]
        """
        return self._agencies

    @agencies.setter
    def agencies(self, agencies):
        """
        Sets the agencies of this User.

        :param agencies: The agencies of this User.
        :type: list[int]
        """

        self._agencies = agencies

    @property
    def mandatary_network_id(self):
        """
        Gets the mandatary_network_id of this User.

        :return: The mandatary_network_id of this User.
        :rtype: int
        """
        return self._mandatary_network_id

    @mandatary_network_id.setter
    def mandatary_network_id(self, mandatary_network_id):
        """
        Sets the mandatary_network_id of this User.

        :param mandatary_network_id: The mandatary_network_id of this User.
        :type: int
        """

        self._mandatary_network_id = mandatary_network_id

    @property
    def capsule_id(self):
        """
        Gets the capsule_id of this User.

        :return: The capsule_id of this User.
        :rtype: str
        """
        return self._capsule_id

    @capsule_id.setter
    def capsule_id(self, capsule_id):
        """
        Sets the capsule_id of this User.

        :param capsule_id: The capsule_id of this User.
        :type: str
        """

        self._capsule_id = capsule_id

    @property
    def creation_date(self):
        """
        Gets the creation_date of this User.

        :return: The creation_date of this User.
        :rtype: datetime
        """
        return self._creation_date

    @creation_date.setter
    def creation_date(self, creation_date):
        """
        Sets the creation_date of this User.

        :param creation_date: The creation_date of this User.
        :type: datetime
        """

        self._creation_date = creation_date

    @property
    def active(self):
        """
        Gets the active of this User.

        :return: The active of this User.
        :rtype: bool
        """
        return self._active

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

        :param active: The active of this User.
        :type: bool
        """

        self._active = active

    @property
    def admin(self):
        """
        Gets the admin of this User.

        :return: The admin of this User.
        :rtype: bool
        """
        return self._admin

    @admin.setter
    def admin(self, admin):
        """
        Sets the admin of this User.

        :param admin: The admin of this User.
        :type: bool
        """

        self._admin = admin

    @property
    def first_connection(self):
        """
        Gets the first_connection of this User.

        :return: The first_connection of this User.
        :rtype: bool
        """
        return self._first_connection

    @first_connection.setter
    def first_connection(self, first_connection):
        """
        Sets the first_connection of this User.

        :param first_connection: The first_connection of this User.
        :type: bool
        """

        self._first_connection = first_connection

    @property
    def user_preference(self):
        """
        Gets the user_preference of this User.

        :return: The user_preference of this User.
        :rtype: UserUserPreference
        """
        return self._user_preference

    @user_preference.setter
    def user_preference(self, user_preference):
        """
        Sets the user_preference of this User.

        :param user_preference: The user_preference of this User.
        :type: UserUserPreference
        """

        self._user_preference = user_preference

    @property
    def hosts(self):
        """
        Gets the hosts of this User.

        :return: The hosts of this User.
        :rtype: list[str]
        """
        return self._hosts

    @hosts.setter
    def hosts(self, hosts):
        """
        Sets the hosts of this User.

        :param hosts: The hosts of this User.
        :type: list[str]
        """

        self._hosts = hosts

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

        for attr, _ in 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 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, User):
            return False

        return self.__dict__ == other.__dict__

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