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

    :param effective_date: Effective date for the version <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 12/31/1899 and 1/1/3000</span>
    :type effective_date: datetime
    :param note:  <span class='property-internal'>Must be between 0 and 255
     characters</span>
    :type note: str
    :param use_unit_cost: Unit cost for the use <span
     class='property-info'>Max precision of 8</span> <span
     class='property-info'>>NULL Valid</span>
    :type use_unit_cost: float
    :param use_unit_id: Use unit ID
    :type use_unit_id: int
    :param demand_unit_cost: Unit cost for the demand <span
     class='property-info'>Max precision of 8</span> <span
     class='property-info'>>NULL Valid</span>
    :type demand_unit_cost: float
    :param demand_unit_id: Demand unit ID
    :type demand_unit_id: int
    :param account_line_items: Cost bodylines for the account
    :type account_line_items:
     list[~energycap.sdk.models.GenericBodylineRequest]
    :param meter_line_items: Cost bodylines for the meter
    :type meter_line_items: list[~energycap.sdk.models.GenericBodylineRequest]
    """

    _validation = {
        'effective_date': {'required': True},
        'note': {'max_length': 255, 'min_length': 0},
    }

    _attribute_map = {
        'effective_date': {'key': 'effectiveDate', 'type': 'iso-8601'},
        'note': {'key': 'note', 'type': 'str'},
        'use_unit_cost': {'key': 'useUnitCost', 'type': 'float'},
        'use_unit_id': {'key': 'useUnitId', 'type': 'int'},
        'demand_unit_cost': {'key': 'demandUnitCost', 'type': 'float'},
        'demand_unit_id': {'key': 'demandUnitId', 'type': 'int'},
        'account_line_items': {'key': 'accountLineItems', 'type': '[GenericBodylineRequest]'},
        'meter_line_items': {'key': 'meterLineItems', 'type': '[GenericBodylineRequest]'},
    }

    def __init__(self, effective_date, note=None, use_unit_cost=None, use_unit_id=None, demand_unit_cost=None, demand_unit_id=None, account_line_items=None, meter_line_items=None):
        super(RateVersionRequest, self).__init__()
        self.effective_date = effective_date
        self.note = note
        self.use_unit_cost = use_unit_cost
        self.use_unit_id = use_unit_id
        self.demand_unit_cost = demand_unit_cost
        self.demand_unit_id = demand_unit_id
        self.account_line_items = account_line_items
        self.meter_line_items = meter_line_items
