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

    :param name: The rate name
    :type name: str
    :param rate_id: The rate identifier
    :type rate_id: int
    :param global_use_unit: The use unit of measure
    :type global_use_unit: ~energycap.sdk.models.UnitChild
    :param cost_unit: The cost unit of measure
    :type cost_unit: ~energycap.sdk.models.UnitChild
    :param updated: The date and time the data was updated
    :type updated: datetime
    :param results: An array of yearly data
    :type results:
     list[~energycap.sdk.models.RateDigestActualYearlyResponseResults]
    :param commodities: An array of yearly data per commodity
    :type commodities:
     list[~energycap.sdk.models.RateDigestActualYearlyResponseCommodityData]
    """

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'rate_id': {'key': 'rateId', 'type': 'int'},
        'global_use_unit': {'key': 'globalUseUnit', 'type': 'UnitChild'},
        'cost_unit': {'key': 'costUnit', 'type': 'UnitChild'},
        'updated': {'key': 'updated', 'type': 'iso-8601'},
        'results': {'key': 'results', 'type': '[RateDigestActualYearlyResponseResults]'},
        'commodities': {'key': 'commodities', 'type': '[RateDigestActualYearlyResponseCommodityData]'},
    }

    def __init__(self, name=None, rate_id=None, global_use_unit=None, cost_unit=None, updated=None, results=None, commodities=None):
        super(RateDigestActualYearlyResponse, self).__init__()
        self.name = name
        self.rate_id = rate_id
        self.global_use_unit = global_use_unit
        self.cost_unit = cost_unit
        self.updated = updated
        self.results = results
        self.commodities = commodities
