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

    :param observation_type_code: The channel's observation type code <span
     class='property-internal'>Required</span>
    :type observation_type_code: str
    :param observation_method_code: The channel's observation method code .
     Possible values include "Automatic", "Manual", "Simulated" <span
     class='property-internal'>Required</span>
    :type observation_method_code: str
    :param observation_rule_code: The channel's observation rule code.
     Possible values include "Odometer" and "Trip" <span
     class='property-internal'>Required</span>
    :type observation_rule_code: str
    :param unit_code: The channel's unit code <span
     class='property-internal'>Required</span>
    :type unit_code: str
    :param interval_minutes: The channel's interval. The interval is measured
     in minutes <span class='property-internal'>Must be between 1 and
     2147483647</span>
    :type interval_minutes: int
    :param hidden: Indicates if the channel is hidden
    :type hidden: bool
    :param total_sum: The total sum of the channel
    :type total_sum: bool
    :param auto_summarize: Indicates if the channels reading is auto
     summarized.
     To enable the interval must be monthly, multiplier must be 1, observation
     type must be Reading use or Reading demand, unit must be Value and
     observation method must be Trip.
    :type auto_summarize: bool
    :param channel_import_id: The import identifier for the channel. <span
     class='property-internal'>Must be between 0 and 255 characters</span>
    :type channel_import_id: str
    :param maximum_reading: The channel's maximum reading <span
     class='property-internal'>Required when observationmethodcode is set to
     odometer</span> <span class='property-internal'>Must be between 1 and
     9999999999</span>
    :type maximum_reading: long
    :param multiplier: The channel multiplier. If no value is provided, a
     default value of
     `1` is used. There are a total of 13 digits allowed including the decimal
     place.
    :type multiplier: float
    :param properties: An object with channel properties
    :type properties: ~energycap.sdk.models.DeviceChannelChild
    """

    _validation = {
        'observation_type_code': {'required': True},
        'observation_method_code': {'required': True},
        'observation_rule_code': {'required': True},
        'unit_code': {'required': True},
        'interval_minutes': {'maximum': 2147483647, 'minimum': 1},
        'channel_import_id': {'max_length': 255, 'min_length': 0},
        'maximum_reading': {'minimum': 1},
    }

    _attribute_map = {
        'observation_type_code': {'key': 'observationTypeCode', 'type': 'str'},
        'observation_method_code': {'key': 'observationMethodCode', 'type': 'str'},
        'observation_rule_code': {'key': 'observationRuleCode', 'type': 'str'},
        'unit_code': {'key': 'unitCode', 'type': 'str'},
        'interval_minutes': {'key': 'intervalMinutes', 'type': 'int'},
        'hidden': {'key': 'hidden', 'type': 'bool'},
        'total_sum': {'key': 'totalSum', 'type': 'bool'},
        'auto_summarize': {'key': 'autoSummarize', 'type': 'bool'},
        'channel_import_id': {'key': 'channelImportId', 'type': 'str'},
        'maximum_reading': {'key': 'maximumReading', 'type': 'long'},
        'multiplier': {'key': 'multiplier', 'type': 'float'},
        'properties': {'key': 'properties', 'type': 'DeviceChannelChild'},
    }

    def __init__(self, observation_type_code, observation_method_code, observation_rule_code, unit_code, interval_minutes=None, hidden=None, total_sum=None, auto_summarize=None, channel_import_id=None, maximum_reading=None, multiplier=None, properties=None):
        super(ChannelEdit, self).__init__()
        self.observation_type_code = observation_type_code
        self.observation_method_code = observation_method_code
        self.observation_rule_code = observation_rule_code
        self.unit_code = unit_code
        self.interval_minutes = interval_minutes
        self.hidden = hidden
        self.total_sum = total_sum
        self.auto_summarize = auto_summarize
        self.channel_import_id = channel_import_id
        self.maximum_reading = maximum_reading
        self.multiplier = multiplier
        self.properties = properties
