# 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 Readings(Model):
    """Readings.

    :param channel_id: The Id of the Channel
    :type channel_id: int
    :param rule: 1 = odometer, 2 = trip (to calculate delta)
    :type rule: int
    :param unit: The unit of the reading
    :type unit: ~energycap.sdk.models.UnitChild
    :param readings:
    :type readings: list[~energycap.sdk.models.ReadingsObservation]
    """

    _attribute_map = {
        'channel_id': {'key': 'channelId', 'type': 'int'},
        'rule': {'key': 'rule', 'type': 'int'},
        'unit': {'key': 'unit', 'type': 'UnitChild'},
        'readings': {'key': 'readings', 'type': '[ReadingsObservation]'},
    }

    def __init__(self, channel_id=None, rule=None, unit=None, readings=None):
        super(Readings, self).__init__()
        self.channel_id = channel_id
        self.rule = rule
        self.unit = unit
        self.readings = readings
