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

    :param unit_id:
    :type unit_id: int
    :param unit_code:  <span class='property-internal'>Must be between 0 and
     16 characters</span>
    :type unit_code: str
    :param unit_info:  <span class='property-internal'>Must be between 0 and
     32 characters</span>
    :type unit_info: str
    :param unit_type:
    :type unit_type: ~energycap.sdk.models.UnitType
    """

    _validation = {
        'unit_code': {'max_length': 16, 'min_length': 0},
        'unit_info': {'max_length': 32, 'min_length': 0},
    }

    _attribute_map = {
        'unit_id': {'key': 'unitId', 'type': 'int'},
        'unit_code': {'key': 'unitCode', 'type': 'str'},
        'unit_info': {'key': 'unitInfo', 'type': 'str'},
        'unit_type': {'key': 'unitType', 'type': 'UnitType'},
    }

    def __init__(self, **kwargs):
        super(Unit, self).__init__(**kwargs)
        self.unit_id = kwargs.get('unit_id', None)
        self.unit_code = kwargs.get('unit_code', None)
        self.unit_info = kwargs.get('unit_info', None)
        self.unit_type = kwargs.get('unit_type', None)
