# 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 Body(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 = {
        'raw_address': 'str',
        'surface': 'float',
        'room_count': 'int',
        'price': 'float',
        'furnished': 'bool',
        'construction_period': 'Range'
    }

    attribute_map = {
        'raw_address': 'rawAddress',
        'surface': 'surface',
        'room_count': 'roomCount',
        'price': 'price',
        'furnished': 'furnished',
        'construction_period': 'constructionPeriod'
    }

    def __init__(self, raw_address=None, surface=None, room_count=None, price=None, furnished=None, construction_period=None):
        """
        Body - a model defined in Swagger
        """

        self._raw_address = None
        self._surface = None
        self._room_count = None
        self._price = None
        self._furnished = None
        self._construction_period = None

        self.raw_address = raw_address
        self.surface = surface
        self.room_count = room_count
        self.price = price
        if furnished is not None:
          self.furnished = furnished
        if construction_period is not None:
          self.construction_period = construction_period

    @property
    def raw_address(self):
        """
        Gets the raw_address of this Body.

        :return: The raw_address of this Body.
        :rtype: str
        """
        return self._raw_address

    @raw_address.setter
    def raw_address(self, raw_address):
        """
        Sets the raw_address of this Body.

        :param raw_address: The raw_address of this Body.
        :type: str
        """
        if raw_address is None:
            raise ValueError("Invalid value for `raw_address`, must not be `None`")

        self._raw_address = raw_address

    @property
    def surface(self):
        """
        Gets the surface of this Body.

        :return: The surface of this Body.
        :rtype: float
        """
        return self._surface

    @surface.setter
    def surface(self, surface):
        """
        Sets the surface of this Body.

        :param surface: The surface of this Body.
        :type: float
        """
        if surface is None:
            raise ValueError("Invalid value for `surface`, must not be `None`")

        self._surface = surface

    @property
    def room_count(self):
        """
        Gets the room_count of this Body.

        :return: The room_count of this Body.
        :rtype: int
        """
        return self._room_count

    @room_count.setter
    def room_count(self, room_count):
        """
        Sets the room_count of this Body.

        :param room_count: The room_count of this Body.
        :type: int
        """
        if room_count is None:
            raise ValueError("Invalid value for `room_count`, must not be `None`")

        self._room_count = room_count

    @property
    def price(self):
        """
        Gets the price of this Body.

        :return: The price of this Body.
        :rtype: float
        """
        return self._price

    @price.setter
    def price(self, price):
        """
        Sets the price of this Body.

        :param price: The price of this Body.
        :type: float
        """
        if price is None:
            raise ValueError("Invalid value for `price`, must not be `None`")

        self._price = price

    @property
    def furnished(self):
        """
        Gets the furnished of this Body.

        :return: The furnished of this Body.
        :rtype: bool
        """
        return self._furnished

    @furnished.setter
    def furnished(self, furnished):
        """
        Sets the furnished of this Body.

        :param furnished: The furnished of this Body.
        :type: bool
        """

        self._furnished = furnished

    @property
    def construction_period(self):
        """
        Gets the construction_period of this Body.

        :return: The construction_period of this Body.
        :rtype: Range
        """
        return self._construction_period

    @construction_period.setter
    def construction_period(self, construction_period):
        """
        Sets the construction_period of this Body.

        :param construction_period: The construction_period of this Body.
        :type: Range
        """

        self._construction_period = construction_period

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

        return self.__dict__ == other.__dict__

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