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

    :param version_id: ID of the rate schedule version
    :type version_id: int
    :param begin_date: Begin date for the version
    :type begin_date: datetime
    :param end_date: End date for the version
    :type end_date: datetime
    :param created_date: Created date
    :type created_date: datetime
    :param modified_date: Last modified date
    :type modified_date: datetime
    :param note: Note
    :type note: str
    :param created_by:
    :type created_by: ~energycap.sdk.models.UserChild
    :param modified_by:
    :type modified_by: ~energycap.sdk.models.UserChild
    :param use_unit_cost: Unit cost for the use
    :type use_unit_cost: float
    :param use_unit:
    :type use_unit: ~energycap.sdk.models.UnitChild
    :param demand_unit_cost: Unit cost for the demand
    :type demand_unit_cost: float
    :param demand_unit:
    :type demand_unit: ~energycap.sdk.models.UnitChild
    :param cost_unit:
    :type cost_unit: ~energycap.sdk.models.UnitChild
    :param account_line_items: Cost bodylines for the account
    :type account_line_items:
     list[~energycap.sdk.models.GenericBodylineResponse]
    :param meter_line_items: Cost bodylines for the meter
    :type meter_line_items:
     list[~energycap.sdk.models.GenericBodylineResponse]
    :param udfs: List of user defined/custom fields and values for this
     version
    :type udfs: list[~energycap.sdk.models.UDFFieldChild]
    """

    _attribute_map = {
        'version_id': {'key': 'versionId', 'type': 'int'},
        'begin_date': {'key': 'beginDate', 'type': 'iso-8601'},
        'end_date': {'key': 'endDate', 'type': 'iso-8601'},
        'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
        'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'},
        'note': {'key': 'note', 'type': 'str'},
        'created_by': {'key': 'createdBy', 'type': 'UserChild'},
        'modified_by': {'key': 'modifiedBy', 'type': 'UserChild'},
        'use_unit_cost': {'key': 'useUnitCost', 'type': 'float'},
        'use_unit': {'key': 'useUnit', 'type': 'UnitChild'},
        'demand_unit_cost': {'key': 'demandUnitCost', 'type': 'float'},
        'demand_unit': {'key': 'demandUnit', 'type': 'UnitChild'},
        'cost_unit': {'key': 'costUnit', 'type': 'UnitChild'},
        'account_line_items': {'key': 'accountLineItems', 'type': '[GenericBodylineResponse]'},
        'meter_line_items': {'key': 'meterLineItems', 'type': '[GenericBodylineResponse]'},
        'udfs': {'key': 'udfs', 'type': '[UDFFieldChild]'},
    }

    def __init__(self, **kwargs):
        super(RateVersionResponse, self).__init__(**kwargs)
        self.version_id = kwargs.get('version_id', None)
        self.begin_date = kwargs.get('begin_date', None)
        self.end_date = kwargs.get('end_date', None)
        self.created_date = kwargs.get('created_date', None)
        self.modified_date = kwargs.get('modified_date', None)
        self.note = kwargs.get('note', None)
        self.created_by = kwargs.get('created_by', None)
        self.modified_by = kwargs.get('modified_by', None)
        self.use_unit_cost = kwargs.get('use_unit_cost', None)
        self.use_unit = kwargs.get('use_unit', None)
        self.demand_unit_cost = kwargs.get('demand_unit_cost', None)
        self.demand_unit = kwargs.get('demand_unit', None)
        self.cost_unit = kwargs.get('cost_unit', None)
        self.account_line_items = kwargs.get('account_line_items', None)
        self.meter_line_items = kwargs.get('meter_line_items', None)
        self.udfs = kwargs.get('udfs', None)
