# coding: utf-8

"""
    teralytic

    The Teralytic API allows clients to manage their organization, view their fields and and probes, and query sensor readings and analytics.  For sandbox testing you may use the api key: `swagger.teralytic.io`   # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from teralytic.models.reading_data import ReadingData  # noqa: F401,E501


class SensorData(ReadingData):
    """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 = {
        'depth': 'int',
        'depth_units': 'str',
        'terascore': 'float',
        'nitrogen': 'float',
        'nitrogen_ppm': 'float',
        'phosphorus': 'float',
        'phosphorus_ppm': 'float',
        'potassium': 'float',
        'potassium_ppm': 'float',
        'ec': 'float',
        'o2': 'float',
        'p_h': 'float',
        'co2': 'float',
        'awc': 'float',
        'soil_moisture': 'float',
        'soil_temperature': 'float',
        'soil_texture': 'str',
        'extended_attributes': 'dict(str, object)'
    }

    attribute_map = {
        'depth': 'depth',
        'depth_units': 'depth_units',
        'terascore': 'terascore',
        'nitrogen': 'nitrogen',
        'nitrogen_ppm': 'nitrogen_ppm',
        'phosphorus': 'phosphorus',
        'phosphorus_ppm': 'phosphorus_ppm',
        'potassium': 'potassium',
        'potassium_ppm': 'potassium_ppm',
        'ec': 'ec',
        'o2': 'o2',
        'p_h': 'pH',
        'co2': 'co2',
        'awc': 'awc',
        'soil_moisture': 'soil_moisture',
        'soil_temperature': 'soil_temperature',
        'soil_texture': 'soil_texture',
        'extended_attributes': 'extended_attributes'
    }

    def __init__(self, depth=None, depth_units=None, terascore=None, nitrogen=None, nitrogen_ppm=None, phosphorus=None, phosphorus_ppm=None, potassium=None, potassium_ppm=None, ec=None, o2=None, p_h=None, co2=None, awc=None, soil_moisture=None, soil_temperature=None, soil_texture=None, extended_attributes=None):  # noqa: E501
        """SensorData - a model defined in Swagger"""  # noqa: E501

        self._depth = None
        self._depth_units = None
        self._terascore = None
        self._nitrogen = None
        self._nitrogen_ppm = None
        self._phosphorus = None
        self._phosphorus_ppm = None
        self._potassium = None
        self._potassium_ppm = None
        self._ec = None
        self._o2 = None
        self._p_h = None
        self._co2 = None
        self._awc = None
        self._soil_moisture = None
        self._soil_temperature = None
        self._soil_texture = None
        self._extended_attributes = None
        self.discriminator = None

        if depth is not None:
            self.depth = depth
        if depth_units is not None:
            self.depth_units = depth_units
        if terascore is not None:
            self.terascore = terascore
        if nitrogen is not None:
            self.nitrogen = nitrogen
        if nitrogen_ppm is not None:
            self.nitrogen_ppm = nitrogen_ppm
        if phosphorus is not None:
            self.phosphorus = phosphorus
        if phosphorus_ppm is not None:
            self.phosphorus_ppm = phosphorus_ppm
        if potassium is not None:
            self.potassium = potassium
        if potassium_ppm is not None:
            self.potassium_ppm = potassium_ppm
        if ec is not None:
            self.ec = ec
        if o2 is not None:
            self.o2 = o2
        if p_h is not None:
            self.p_h = p_h
        if co2 is not None:
            self.co2 = co2
        if awc is not None:
            self.awc = awc
        if soil_moisture is not None:
            self.soil_moisture = soil_moisture
        if soil_temperature is not None:
            self.soil_temperature = soil_temperature
        if soil_texture is not None:
            self.soil_texture = soil_texture
        if extended_attributes is not None:
            self.extended_attributes = extended_attributes

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

        The depth value  # noqa: E501

        :return: The depth of this SensorData.  # noqa: E501
        :rtype: int
        """
        return self._depth

    @depth.setter
    def depth(self, depth):
        """Sets the depth of this SensorData.

        The depth value  # noqa: E501

        :param depth: The depth of this SensorData.  # noqa: E501
        :type: int
        """

        self._depth = depth

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

        The depth units (i.e. in, cm)  # noqa: E501

        :return: The depth_units of this SensorData.  # noqa: E501
        :rtype: str
        """
        return self._depth_units

    @depth_units.setter
    def depth_units(self, depth_units):
        """Sets the depth_units of this SensorData.

        The depth units (i.e. in, cm)  # noqa: E501

        :param depth_units: The depth_units of this SensorData.  # noqa: E501
        :type: str
        """

        self._depth_units = depth_units

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

        TeraScore  # noqa: E501

        :return: The terascore of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._terascore

    @terascore.setter
    def terascore(self, terascore):
        """Sets the terascore of this SensorData.

        TeraScore  # noqa: E501

        :param terascore: The terascore of this SensorData.  # noqa: E501
        :type: float
        """

        self._terascore = terascore

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

        Nitrogen  # noqa: E501

        :return: The nitrogen of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._nitrogen

    @nitrogen.setter
    def nitrogen(self, nitrogen):
        """Sets the nitrogen of this SensorData.

        Nitrogen  # noqa: E501

        :param nitrogen: The nitrogen of this SensorData.  # noqa: E501
        :type: float
        """

        self._nitrogen = nitrogen

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

        Nitrogen ppm  # noqa: E501

        :return: The nitrogen_ppm of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._nitrogen_ppm

    @nitrogen_ppm.setter
    def nitrogen_ppm(self, nitrogen_ppm):
        """Sets the nitrogen_ppm of this SensorData.

        Nitrogen ppm  # noqa: E501

        :param nitrogen_ppm: The nitrogen_ppm of this SensorData.  # noqa: E501
        :type: float
        """

        self._nitrogen_ppm = nitrogen_ppm

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

        Phosphorus  # noqa: E501

        :return: The phosphorus of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._phosphorus

    @phosphorus.setter
    def phosphorus(self, phosphorus):
        """Sets the phosphorus of this SensorData.

        Phosphorus  # noqa: E501

        :param phosphorus: The phosphorus of this SensorData.  # noqa: E501
        :type: float
        """

        self._phosphorus = phosphorus

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

        Phosphorus ppm  # noqa: E501

        :return: The phosphorus_ppm of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._phosphorus_ppm

    @phosphorus_ppm.setter
    def phosphorus_ppm(self, phosphorus_ppm):
        """Sets the phosphorus_ppm of this SensorData.

        Phosphorus ppm  # noqa: E501

        :param phosphorus_ppm: The phosphorus_ppm of this SensorData.  # noqa: E501
        :type: float
        """

        self._phosphorus_ppm = phosphorus_ppm

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

        Potassium  # noqa: E501

        :return: The potassium of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._potassium

    @potassium.setter
    def potassium(self, potassium):
        """Sets the potassium of this SensorData.

        Potassium  # noqa: E501

        :param potassium: The potassium of this SensorData.  # noqa: E501
        :type: float
        """

        self._potassium = potassium

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

        Potassium ppm  # noqa: E501

        :return: The potassium_ppm of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._potassium_ppm

    @potassium_ppm.setter
    def potassium_ppm(self, potassium_ppm):
        """Sets the potassium_ppm of this SensorData.

        Potassium ppm  # noqa: E501

        :param potassium_ppm: The potassium_ppm of this SensorData.  # noqa: E501
        :type: float
        """

        self._potassium_ppm = potassium_ppm

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

        Electrical Conductivity  # noqa: E501

        :return: The ec of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._ec

    @ec.setter
    def ec(self, ec):
        """Sets the ec of this SensorData.

        Electrical Conductivity  # noqa: E501

        :param ec: The ec of this SensorData.  # noqa: E501
        :type: float
        """

        self._ec = ec

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

        Dioxygen  # noqa: E501

        :return: The o2 of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._o2

    @o2.setter
    def o2(self, o2):
        """Sets the o2 of this SensorData.

        Dioxygen  # noqa: E501

        :param o2: The o2 of this SensorData.  # noqa: E501
        :type: float
        """

        self._o2 = o2

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

        pH Scale  # noqa: E501

        :return: The p_h of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._p_h

    @p_h.setter
    def p_h(self, p_h):
        """Sets the p_h of this SensorData.

        pH Scale  # noqa: E501

        :param p_h: The p_h of this SensorData.  # noqa: E501
        :type: float
        """

        self._p_h = p_h

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

        Carbon Dioxide  # noqa: E501

        :return: The co2 of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._co2

    @co2.setter
    def co2(self, co2):
        """Sets the co2 of this SensorData.

        Carbon Dioxide  # noqa: E501

        :param co2: The co2 of this SensorData.  # noqa: E501
        :type: float
        """

        self._co2 = co2

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


        :return: The awc of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._awc

    @awc.setter
    def awc(self, awc):
        """Sets the awc of this SensorData.


        :param awc: The awc of this SensorData.  # noqa: E501
        :type: float
        """

        self._awc = awc

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

        Soil Moisture  # noqa: E501

        :return: The soil_moisture of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._soil_moisture

    @soil_moisture.setter
    def soil_moisture(self, soil_moisture):
        """Sets the soil_moisture of this SensorData.

        Soil Moisture  # noqa: E501

        :param soil_moisture: The soil_moisture of this SensorData.  # noqa: E501
        :type: float
        """

        self._soil_moisture = soil_moisture

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

        Soil Temperature  # noqa: E501

        :return: The soil_temperature of this SensorData.  # noqa: E501
        :rtype: float
        """
        return self._soil_temperature

    @soil_temperature.setter
    def soil_temperature(self, soil_temperature):
        """Sets the soil_temperature of this SensorData.

        Soil Temperature  # noqa: E501

        :param soil_temperature: The soil_temperature of this SensorData.  # noqa: E501
        :type: float
        """

        self._soil_temperature = soil_temperature

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

        Soil texture type. Data are collected from government data sources (USDA's SSURGO database for fields in the United States)  # noqa: E501

        :return: The soil_texture of this SensorData.  # noqa: E501
        :rtype: str
        """
        return self._soil_texture

    @soil_texture.setter
    def soil_texture(self, soil_texture):
        """Sets the soil_texture of this SensorData.

        Soil texture type. Data are collected from government data sources (USDA's SSURGO database for fields in the United States)  # noqa: E501

        :param soil_texture: The soil_texture of this SensorData.  # noqa: E501
        :type: str
        """

        self._soil_texture = soil_texture

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

        Additional properties  # noqa: E501

        :return: The extended_attributes of this SensorData.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._extended_attributes

    @extended_attributes.setter
    def extended_attributes(self, extended_attributes):
        """Sets the extended_attributes of this SensorData.

        Additional properties  # noqa: E501

        :param extended_attributes: The extended_attributes of this SensorData.  # noqa: E501
        :type: dict(str, object)
        """

        self._extended_attributes = extended_attributes

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

        return self.__dict__ == other.__dict__

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