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

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

    :param active: Required. Is the emission source active <span
     class='property-internal'>Required</span>
    :type active: bool
    :param emission_source_code: Required. The emission source code <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 32 characters</span>
    :type emission_source_code: str
    :param emission_source_info: Required. The emission source info <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 64 characters</span>
    :type emission_source_info: str
    :param commodity_id: Required. The emission source's commodity <span
     class='property-internal'>Required</span>
    :type commodity_id: int
    :param collection_id: Required. The collection to which the emission
     source belongs <span class='property-internal'>Required</span> <span
     class='property-internal'>Topmost (Collection)</span>
    :type collection_id: int
    :param default_scope_category_id: Required. The default scope category for
     the emission source <span class='property-internal'>Required</span>
    :type default_scope_category_id: int
    :param default_emission_factor: Required.
    :type default_emission_factor: ~energycap.sdk.models.GHGDefaultFactor
    :param note: The emission source note <span class='property-internal'>Must
     be between 0 and 255 characters</span> <span
     class='property-internal'>Required (defined)</span>
    :type note: str
    :param address:
    :type address: ~energycap.sdk.models.AddressChildBase
    """

    _validation = {
        'active': {'required': True},
        'emission_source_code': {'required': True, 'max_length': 32, 'min_length': 0},
        'emission_source_info': {'required': True, 'max_length': 64, 'min_length': 0},
        'commodity_id': {'required': True},
        'collection_id': {'required': True},
        'default_scope_category_id': {'required': True},
        'default_emission_factor': {'required': True},
        'note': {'max_length': 255, 'min_length': 0},
    }

    _attribute_map = {
        'active': {'key': 'active', 'type': 'bool'},
        'emission_source_code': {'key': 'emissionSourceCode', 'type': 'str'},
        'emission_source_info': {'key': 'emissionSourceInfo', 'type': 'str'},
        'commodity_id': {'key': 'commodityId', 'type': 'int'},
        'collection_id': {'key': 'collectionId', 'type': 'int'},
        'default_scope_category_id': {'key': 'defaultScopeCategoryId', 'type': 'int'},
        'default_emission_factor': {'key': 'defaultEmissionFactor', 'type': 'GHGDefaultFactor'},
        'note': {'key': 'note', 'type': 'str'},
        'address': {'key': 'address', 'type': 'AddressChildBase'},
    }

    def __init__(self, *, active: bool, emission_source_code: str, emission_source_info: str, commodity_id: int, collection_id: int, default_scope_category_id: int, default_emission_factor, note: str=None, address=None, **kwargs) -> None:
        super(EmissionSourceEdit, self).__init__(**kwargs)
        self.active = active
        self.emission_source_code = emission_source_code
        self.emission_source_info = emission_source_info
        self.commodity_id = commodity_id
        self.collection_id = collection_id
        self.default_scope_category_id = default_scope_category_id
        self.default_emission_factor = default_emission_factor
        self.note = note
        self.address = address
