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

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

    :param collection_code: Required. The collection code <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 32 characters</span>
    :type collection_code: str
    :param collection_info: Required. The collection info <span
     class='property-internal'>Required</span> <span
     class='property-internal'>Must be between 0 and 50 characters</span>
    :type collection_info: str
    :param parent_collection_id: Required. The identifier for the parent of
     the collection. The parent is the collection directly above the current
     collection on the collections and emission sources tree <span
     class='property-internal'>Required</span>
    :type parent_collection_id: int
    :param collection_icon:
    :type collection_icon: ~energycap.sdk.models.Icon
    :param note: The collection note <span class='property-internal'>Must be
     between 0 and 255 characters</span>
    :type note: str
    """

    _validation = {
        'collection_code': {'required': True, 'max_length': 32, 'min_length': 0},
        'collection_info': {'required': True, 'max_length': 50, 'min_length': 0},
        'parent_collection_id': {'required': True},
        'note': {'max_length': 255, 'min_length': 0},
    }

    _attribute_map = {
        'collection_code': {'key': 'collectionCode', 'type': 'str'},
        'collection_info': {'key': 'collectionInfo', 'type': 'str'},
        'parent_collection_id': {'key': 'parentCollectionId', 'type': 'int'},
        'collection_icon': {'key': 'collectionIcon', 'type': 'Icon'},
        'note': {'key': 'note', 'type': 'str'},
    }

    def __init__(self, **kwargs):
        super(CollectionRequest, self).__init__(**kwargs)
        self.collection_code = kwargs.get('collection_code', None)
        self.collection_info = kwargs.get('collection_info', None)
        self.parent_collection_id = kwargs.get('parent_collection_id', None)
        self.collection_icon = kwargs.get('collection_icon', None)
        self.note = kwargs.get('note', None)
