# coding: utf-8

"""
    RegObs API

      ## Introduction    RegObs is a tool for collecting observations and events   related to natural hazards. It is currently used by the   Norwegian flood, landslide and avalanche warning service in   Norway, but the data is openly available for anyone through this API.    Regobs has been developed by the Norwegian Water resources and   Energy Directorate (NVE), in collaboration with the Norwegian   Meteorological Institute (MET) and the Norwegian Public Roads   Administration (NPRA).    You can check out our representation of the data at [regobs.no](http://regobs.no).    ## Authentication    Some endpoints require an api key.  You can get an API key by sending an email to   [raek@nve.no](mailto:raek@nve.no?subject=RegObs%20API%20Key).  To use the api key with the swagger ui, fill in the api\\_key input above.   It should then be included with every request in the   `regObs_apptoken` header.    ## Getting started    Get the last 10 observations using python:    ```python  import requests  r = requests.post('https://api.regobs.no/v4/Search',       data={'NumberOfRecords': 10},      headers={'Content-Type': 'application/json'}  )  data = r.json()  print(len(data))  # 10  ```      # noqa: E501

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

import pprint
import re  # noqa: F401

import six


class WeatherViewModel(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 = {
        'precipitation_tid': 'int',
        'precipitation_name': 'str',
        'air_temperature': 'float',
        'wind_speed': 'float',
        'wind_direction': 'int',
        'wind_direction_name': 'str',
        'cloud_cover': 'int',
        'comment': 'str'
    }

    attribute_map = {
        'precipitation_tid': 'PrecipitationTID',
        'precipitation_name': 'PrecipitationName',
        'air_temperature': 'AirTemperature',
        'wind_speed': 'WindSpeed',
        'wind_direction': 'WindDirection',
        'wind_direction_name': 'WindDirectionName',
        'cloud_cover': 'CloudCover',
        'comment': 'Comment'
    }

    def __init__(self, precipitation_tid=None, precipitation_name=None, air_temperature=None, wind_speed=None, wind_direction=None, wind_direction_name=None, cloud_cover=None, comment=None):  # noqa: E501
        """WeatherViewModel - a model defined in Swagger"""  # noqa: E501
        self._precipitation_tid = None
        self._precipitation_name = None
        self._air_temperature = None
        self._wind_speed = None
        self._wind_direction = None
        self._wind_direction_name = None
        self._cloud_cover = None
        self._comment = None
        self.discriminator = None
        if precipitation_tid is not None:
            self.precipitation_tid = precipitation_tid
        if precipitation_name is not None:
            self.precipitation_name = precipitation_name
        if air_temperature is not None:
            self.air_temperature = air_temperature
        if wind_speed is not None:
            self.wind_speed = wind_speed
        if wind_direction is not None:
            self.wind_direction = wind_direction
        if wind_direction_name is not None:
            self.wind_direction_name = wind_direction_name
        if cloud_cover is not None:
            self.cloud_cover = cloud_cover
        if comment is not None:
            self.comment = comment

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


        :return: The precipitation_tid of this WeatherViewModel.  # noqa: E501
        :rtype: int
        """
        return self._precipitation_tid

    @precipitation_tid.setter
    def precipitation_tid(self, precipitation_tid):
        """Sets the precipitation_tid of this WeatherViewModel.


        :param precipitation_tid: The precipitation_tid of this WeatherViewModel.  # noqa: E501
        :type: int
        """

        self._precipitation_tid = precipitation_tid

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


        :return: The precipitation_name of this WeatherViewModel.  # noqa: E501
        :rtype: str
        """
        return self._precipitation_name

    @precipitation_name.setter
    def precipitation_name(self, precipitation_name):
        """Sets the precipitation_name of this WeatherViewModel.


        :param precipitation_name: The precipitation_name of this WeatherViewModel.  # noqa: E501
        :type: str
        """

        self._precipitation_name = precipitation_name

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


        :return: The air_temperature of this WeatherViewModel.  # noqa: E501
        :rtype: float
        """
        return self._air_temperature

    @air_temperature.setter
    def air_temperature(self, air_temperature):
        """Sets the air_temperature of this WeatherViewModel.


        :param air_temperature: The air_temperature of this WeatherViewModel.  # noqa: E501
        :type: float
        """

        self._air_temperature = air_temperature

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


        :return: The wind_speed of this WeatherViewModel.  # noqa: E501
        :rtype: float
        """
        return self._wind_speed

    @wind_speed.setter
    def wind_speed(self, wind_speed):
        """Sets the wind_speed of this WeatherViewModel.


        :param wind_speed: The wind_speed of this WeatherViewModel.  # noqa: E501
        :type: float
        """

        self._wind_speed = wind_speed

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


        :return: The wind_direction of this WeatherViewModel.  # noqa: E501
        :rtype: int
        """
        return self._wind_direction

    @wind_direction.setter
    def wind_direction(self, wind_direction):
        """Sets the wind_direction of this WeatherViewModel.


        :param wind_direction: The wind_direction of this WeatherViewModel.  # noqa: E501
        :type: int
        """

        self._wind_direction = wind_direction

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


        :return: The wind_direction_name of this WeatherViewModel.  # noqa: E501
        :rtype: str
        """
        return self._wind_direction_name

    @wind_direction_name.setter
    def wind_direction_name(self, wind_direction_name):
        """Sets the wind_direction_name of this WeatherViewModel.


        :param wind_direction_name: The wind_direction_name of this WeatherViewModel.  # noqa: E501
        :type: str
        """

        self._wind_direction_name = wind_direction_name

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


        :return: The cloud_cover of this WeatherViewModel.  # noqa: E501
        :rtype: int
        """
        return self._cloud_cover

    @cloud_cover.setter
    def cloud_cover(self, cloud_cover):
        """Sets the cloud_cover of this WeatherViewModel.


        :param cloud_cover: The cloud_cover of this WeatherViewModel.  # noqa: E501
        :type: int
        """

        self._cloud_cover = cloud_cover

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


        :return: The comment of this WeatherViewModel.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this WeatherViewModel.


        :param comment: The comment of this WeatherViewModel.  # noqa: E501
        :type: str
        """

        self._comment = comment

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

        return self.__dict__ == other.__dict__

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