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

    :param parent_id: The collection's parent
    :type parent_id: int
    :param collection_id: The collection's primary ID
    :type collection_id: int
    :param collection_info: The collection info
    :type collection_info: str
    :param collection_code: The collection code
    :type collection_code: str
    :param collection_icon:
    :type collection_icon: ~energycap.sdk.models.Icon
    :param has_children: If this collection has any children, either emission
     sources or collections
    :type has_children: bool
    :param has_collection_children: If this collection has any collection
     children
    :type has_collection_children: bool
    :param has_emission_source_children: If this collection has any emission
     source children
    :type has_emission_source_children: bool
    :param has_active_children: If this collection has any collection children
     or active emission source children
    :type has_active_children: bool
    :param has_active_emission_source_children: If this collection has any
     active emission source children
    :type has_active_emission_source_children: bool
    :param emission_source_children: List of emission source children
    :type emission_source_children:
     list[~energycap.sdk.models.CollectionEmissionSourceChild]
    :param collection_children: List of collection children
    :type collection_children:
     list[~energycap.sdk.models.HierarchicalCollections2]
    """

    _attribute_map = {
        'parent_id': {'key': 'parentId', 'type': 'int'},
        'collection_id': {'key': 'collectionId', 'type': 'int'},
        'collection_info': {'key': 'collectionInfo', 'type': 'str'},
        'collection_code': {'key': 'collectionCode', 'type': 'str'},
        'collection_icon': {'key': 'collectionIcon', 'type': 'Icon'},
        'has_children': {'key': 'hasChildren', 'type': 'bool'},
        'has_collection_children': {'key': 'hasCollectionChildren', 'type': 'bool'},
        'has_emission_source_children': {'key': 'hasEmissionSourceChildren', 'type': 'bool'},
        'has_active_children': {'key': 'hasActiveChildren', 'type': 'bool'},
        'has_active_emission_source_children': {'key': 'hasActiveEmissionSourceChildren', 'type': 'bool'},
        'emission_source_children': {'key': 'emissionSourceChildren', 'type': '[CollectionEmissionSourceChild]'},
        'collection_children': {'key': 'collectionChildren', 'type': '[HierarchicalCollections2]'},
    }

    def __init__(self, **kwargs):
        super(HierarchicalCollections, self).__init__(**kwargs)
        self.parent_id = kwargs.get('parent_id', None)
        self.collection_id = kwargs.get('collection_id', None)
        self.collection_info = kwargs.get('collection_info', None)
        self.collection_code = kwargs.get('collection_code', None)
        self.collection_icon = kwargs.get('collection_icon', None)
        self.has_children = kwargs.get('has_children', None)
        self.has_collection_children = kwargs.get('has_collection_children', None)
        self.has_emission_source_children = kwargs.get('has_emission_source_children', None)
        self.has_active_children = kwargs.get('has_active_children', None)
        self.has_active_emission_source_children = kwargs.get('has_active_emission_source_children', None)
        self.emission_source_children = kwargs.get('emission_source_children', None)
        self.collection_children = kwargs.get('collection_children', None)
