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

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

    :param commodity_info: Required. The commodity info <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 32 characters</span>
    :type commodity_info: str
    :param abbreviation: Required. Three letter abbreviation code to represent
     the commodity <span class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 1 and 3 characters</span>
    :type abbreviation: str
    :param description: The commodity description <span
     class='property-internal'>Must be between 0 and 255 characters</span>
    :type description: str
    :param icon:
    :type icon: ~energycap.sdk.models.Icon
    :param commodity_category_id: The commodity category identifier <br />
     If the category is provided, the default rollup unit for that category
     will be used
    :type commodity_category_id: int
    :param commodity_rollup_unit_id: The common use unit identifier for
     reporting purposes <br />
     Ignored if a commodity category is provided and it has a rollup unit
     specified
    :type commodity_rollup_unit_id: int
    :param include_in_energy_reporting: Indicates if the commodity should be
     included in Energy reporting
    :type include_in_energy_reporting: bool
    :param energy_reporting_unit_conversion_multiplier: The multiplier to
     convert from the commodity rollup unit to the energy use reporting unit
     <br />
     Not required if commodity rollup unit is in the energy unit category
    :type energy_reporting_unit_conversion_multiplier: float
    """

    _validation = {
        'commodity_info': {'required': True, 'max_length': 32, 'min_length': 0},
        'abbreviation': {'required': True, 'max_length': 3, 'min_length': 1},
        'description': {'max_length': 255, 'min_length': 0},
    }

    _attribute_map = {
        'commodity_info': {'key': 'commodityInfo', 'type': 'str'},
        'abbreviation': {'key': 'abbreviation', 'type': 'str'},
        'description': {'key': 'description', 'type': 'str'},
        'icon': {'key': 'icon', 'type': 'Icon'},
        'commodity_category_id': {'key': 'commodityCategoryId', 'type': 'int'},
        'commodity_rollup_unit_id': {'key': 'commodityRollupUnitId', 'type': 'int'},
        'include_in_energy_reporting': {'key': 'includeInEnergyReporting', 'type': 'bool'},
        'energy_reporting_unit_conversion_multiplier': {'key': 'energyReportingUnitConversionMultiplier', 'type': 'float'},
    }

    def __init__(self, *, commodity_info: str, abbreviation: str, description: str=None, icon=None, commodity_category_id: int=None, commodity_rollup_unit_id: int=None, include_in_energy_reporting: bool=None, energy_reporting_unit_conversion_multiplier: float=None, **kwargs) -> None:
        super(CommodityRequest, self).__init__(**kwargs)
        self.commodity_info = commodity_info
        self.abbreviation = abbreviation
        self.description = description
        self.icon = icon
        self.commodity_category_id = commodity_category_id
        self.commodity_rollup_unit_id = commodity_rollup_unit_id
        self.include_in_energy_reporting = include_in_energy_reporting
        self.energy_reporting_unit_conversion_multiplier = energy_reporting_unit_conversion_multiplier
