# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Reading(Model):
    """Reading.

    All required parameters must be populated in order to send to Azure.

    :param time: Required. The date and time of the reading <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Required</span>
    :type time: datetime
    :param value: Required. The reading's value <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Required</span>
    :type value: float
    :param estimated: Indicates if the reading is estimated <span
     class='property-internal'>Required (defined)</span>
    :type estimated: bool
    :param note: A note pertaining to the reading <span
     class='property-internal'>Required (defined)</span>
    :type note: str
    """

    _validation = {
        'time': {'required': True},
        'value': {'required': True},
    }

    _attribute_map = {
        'time': {'key': 'time', 'type': 'iso-8601'},
        'value': {'key': 'value', 'type': 'float'},
        'estimated': {'key': 'estimated', 'type': 'bool'},
        'note': {'key': 'note', 'type': 'str'},
    }

    def __init__(self, **kwargs):
        super(Reading, self).__init__(**kwargs)
        self.time = kwargs.get('time', None)
        self.value = kwargs.get('value', None)
        self.estimated = kwargs.get('estimated', None)
        self.note = kwargs.get('note', None)
