# 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 MarketingDealer(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',
        'type': 'DealerType',
        'sub_type': 'DealerSubType',
        'name': 'str',
        'phone_number': 'str',
        'email': 'str'
    }

    attribute_map = {
        'id': 'id',
        'organization_id': 'organizationId',
        'type': 'type',
        'sub_type': 'subType',
        'name': 'name',
        'phone_number': 'phoneNumber',
        'email': 'email'
    }

    def __init__(self, id=None, organization_id=None, type=None, sub_type=None, name=None, phone_number=None, email=None):
        """
        MarketingDealer - a model defined in Swagger
        """

        self._id = None
        self._organization_id = None
        self._type = None
        self._sub_type = None
        self._name = None
        self._phone_number = None
        self._email = None

        if id is not None:
          self.id = id
        if organization_id is not None:
          self.organization_id = organization_id
        if type is not None:
          self.type = type
        if sub_type is not None:
          self.sub_type = sub_type
        if name is not None:
          self.name = name
        if phone_number is not None:
          self.phone_number = phone_number
        if email is not None:
          self.email = email

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

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

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

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

        self._id = id

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

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

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

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

        self._organization_id = organization_id

    @property
    def type(self):
        """
        Gets the type of this MarketingDealer.

        :return: The type of this MarketingDealer.
        :rtype: DealerType
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this MarketingDealer.

        :param type: The type of this MarketingDealer.
        :type: DealerType
        """

        self._type = type

    @property
    def sub_type(self):
        """
        Gets the sub_type of this MarketingDealer.

        :return: The sub_type of this MarketingDealer.
        :rtype: DealerSubType
        """
        return self._sub_type

    @sub_type.setter
    def sub_type(self, sub_type):
        """
        Sets the sub_type of this MarketingDealer.

        :param sub_type: The sub_type of this MarketingDealer.
        :type: DealerSubType
        """

        self._sub_type = sub_type

    @property
    def name(self):
        """
        Gets the name of this MarketingDealer.

        :return: The name of this MarketingDealer.
        :rtype: str
        """
        return self._name

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

        :param name: The name of this MarketingDealer.
        :type: str
        """
        if name is not None and len(name) > 300:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `300`")
        if name is not None and len(name) < 1:
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")

        self._name = name

    @property
    def phone_number(self):
        """
        Gets the phone_number of this MarketingDealer.

        :return: The phone_number of this MarketingDealer.
        :rtype: str
        """
        return self._phone_number

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

        :param phone_number: The phone_number of this MarketingDealer.
        :type: str
        """

        self._phone_number = phone_number

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

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

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

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

        self._email = email

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

        return self.__dict__ == other.__dict__

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