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

    All required parameters must be populated in order to send to Azure.

    :param begin_date: Date the channel version started to be used <span
     class='property-internal'>Must be between 12/30/1899 and 12/31/2099</span>
    :type begin_date: datetime
    :param multiplier: Required. The channel multiplier <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 999999999999999</span>
    :type multiplier: float
    :param unit_code: Required. The channel's unit of measure <span
     class='property-internal'>Required</span>
    :type unit_code: str
    :param observation_rule: Required. The channel's observation rule.
     Possible values include "Odometer" and "Trip" <span
     class='property-internal'>Required</span> <span
     class='property-internal'>One of Odometer, Trip </span>
    :type observation_rule: str
    :param maximum_reading: Required. The channel's max reading <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 999999999999999</span>
    :type maximum_reading: float
    :param udfs: List of user defined/custom fields and values for this
     version
     If the Udfs list is null or empty no values are assigned
     If a udf is omitted no value is assigned to that udf
     To remove a value from an existing Udf, pass in the UdfId and set the
     Value to null
    :type udfs: list[~energycap.sdk.models.UDFValue]
    """

    _validation = {
        'multiplier': {'required': True, 'maximum': 999999999999999, 'minimum': 0},
        'unit_code': {'required': True},
        'observation_rule': {'required': True},
        'maximum_reading': {'required': True, 'maximum': 999999999999999, 'minimum': 0},
    }

    _attribute_map = {
        'begin_date': {'key': 'beginDate', 'type': 'iso-8601'},
        'multiplier': {'key': 'multiplier', 'type': 'float'},
        'unit_code': {'key': 'unitCode', 'type': 'str'},
        'observation_rule': {'key': 'observationRule', 'type': 'str'},
        'maximum_reading': {'key': 'maximumReading', 'type': 'float'},
        'udfs': {'key': 'udfs', 'type': '[UDFValue]'},
    }

    def __init__(self, *, multiplier: float, unit_code: str, observation_rule: str, maximum_reading: float, begin_date=None, udfs=None, **kwargs) -> None:
        super(ChannelVersionWithBeginDateRequest, self).__init__(**kwargs)
        self.begin_date = begin_date
        self.multiplier = multiplier
        self.unit_code = unit_code
        self.observation_rule = observation_rule
        self.maximum_reading = maximum_reading
        self.udfs = udfs
