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

    :param commodity_id: The Commodity ID
    :type commodity_id: int
    :param commodity_code: The Commodity Code
    :type commodity_code: str
    :param commodity_info: The Commodity Info
    :type commodity_info: str
    :param in_use_by_vendor: Flag to indicate whether any vendor is assigned
     this commodity
     through an Account Meter relationship
    :type in_use_by_vendor: bool
    :param common_use_unit:
    :type common_use_unit: ~energycap.sdk.models.UnitChild
    :param common_demand_unit:
    :type common_demand_unit: ~energycap.sdk.models.UnitChild
    """

    _attribute_map = {
        'commodity_id': {'key': 'commodityId', 'type': 'int'},
        'commodity_code': {'key': 'commodityCode', 'type': 'str'},
        'commodity_info': {'key': 'commodityInfo', 'type': 'str'},
        'in_use_by_vendor': {'key': 'inUseByVendor', 'type': 'bool'},
        'common_use_unit': {'key': 'commonUseUnit', 'type': 'UnitChild'},
        'common_demand_unit': {'key': 'commonDemandUnit', 'type': 'UnitChild'},
    }

    def __init__(self, commodity_id=None, commodity_code=None, commodity_info=None, in_use_by_vendor=None, common_use_unit=None, common_demand_unit=None):
        super(Commodity, self).__init__()
        self.commodity_id = commodity_id
        self.commodity_code = commodity_code
        self.commodity_info = commodity_info
        self.in_use_by_vendor = in_use_by_vendor
        self.common_use_unit = common_use_unit
        self.common_demand_unit = common_demand_unit
