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

    :param meter_code: The meter code <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 32 characters</span>
    :type meter_code: str
    :param meter_info: The meter info <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 50 characters</span>
    :type meter_info: str
    :param place_id: The identifier for the place the meter is assigned to
     <span class='property-internal'>Topmost (Place)</span> <span
     class='property-internal'>Required</span>
    :type place_id: int
    :param commodity_id: The commodity identifier that the meter is assigned
     to.
     If different from original commodity id, then a commodity change will be
     attempted. <span class='property-internal'>Required</span>
    :type commodity_id: int
    :param address:
    :type address: ~energycap.sdk.models.AddressChild
    :param bill_entry_note: The bill entry note <span
     class='property-internal'>Must be between 0 and 64 characters</span> <span
     class='property-internal'>Required (defined)</span>
    :type bill_entry_note: str
    :param include_in_energy_star: Indicates if the meter should be included
     in ENERGY STAR <span class='property-internal'>Required</span>
    :type include_in_energy_star: bool
    :param primary_use_id: The identifier for the meter's primary use <span
     class='property-internal'>Required (defined)</span>
    :type primary_use_id: int
    :param meter_time_zone_id: The identifier for the meter's time zone. <span
     class='property-internal'>Required</span>
    :type meter_time_zone_id: int
    :param active: Is this meter active? <span
     class='property-internal'>Required</span>
    :type active: bool
    :param properties: An array of meter properties <span
     class='property-internal'>Required (defined)</span>
    :type properties: dict[str, str]
    :param use_unit_id: The use unit ID is the reporting unit for use for this
     meter.
     It is used to determine initial bill format for this meter. <span
     class='property-internal'>Required (defined)</span>
    :type use_unit_id: int
    :param demand_unit_id: The demand unit ID is the reporting unit for demand
     for this meter.
     It is used to determine initial bill format for this meter. <span
     class='property-internal'>Required (defined)</span>
    :type demand_unit_id: int
    """

    _validation = {
        'meter_code': {'required': True, 'max_length': 32, 'min_length': 0},
        'meter_info': {'required': True, 'max_length': 50, 'min_length': 0},
        'place_id': {'required': True},
        'commodity_id': {'required': True},
        'address': {'required': True},
        'bill_entry_note': {'required': True, 'max_length': 64, 'min_length': 0},
        'include_in_energy_star': {'required': True},
        'primary_use_id': {'required': True},
        'meter_time_zone_id': {'required': True},
        'active': {'required': True},
        'properties': {'required': True},
    }

    _attribute_map = {
        'meter_code': {'key': 'meterCode', 'type': 'str'},
        'meter_info': {'key': 'meterInfo', 'type': 'str'},
        'place_id': {'key': 'placeId', 'type': 'int'},
        'commodity_id': {'key': 'commodityId', 'type': 'int'},
        'address': {'key': 'address', 'type': 'AddressChild'},
        'bill_entry_note': {'key': 'billEntryNote', 'type': 'str'},
        'include_in_energy_star': {'key': 'includeInEnergyStar', 'type': 'bool'},
        'primary_use_id': {'key': 'primaryUseId', 'type': 'int'},
        'meter_time_zone_id': {'key': 'meterTimeZoneId', 'type': 'int'},
        'active': {'key': 'active', 'type': 'bool'},
        'properties': {'key': 'properties', 'type': '{str}'},
        'use_unit_id': {'key': 'useUnitId', 'type': 'int'},
        'demand_unit_id': {'key': 'demandUnitId', 'type': 'int'},
    }

    def __init__(self, meter_code, meter_info, place_id, commodity_id, address, bill_entry_note, include_in_energy_star, primary_use_id, meter_time_zone_id, active, properties, use_unit_id=None, demand_unit_id=None):
        super(MeterEdit, self).__init__()
        self.meter_code = meter_code
        self.meter_info = meter_info
        self.place_id = place_id
        self.commodity_id = commodity_id
        self.address = address
        self.bill_entry_note = bill_entry_note
        self.include_in_energy_star = include_in_energy_star
        self.primary_use_id = primary_use_id
        self.meter_time_zone_id = meter_time_zone_id
        self.active = active
        self.properties = properties
        self.use_unit_id = use_unit_id
        self.demand_unit_id = demand_unit_id
