# coding: utf-8

from __future__ import absolute_import
from .base_model_ import Model as BaseModel
from datetime import date, datetime
from typing import List, Dict
from ..util import deserialize_model


class Unit(BaseModel):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, name=None, symbol=None):
        """
        Unit - a model defined in Swagger

        :param id: The id of this Unit.
        :type id: int
        :param name: The name of this Unit.
        :type name: str
        :param symbol: The symbol of this Unit.
        :type symbol: str
        """
        self.swagger_types = {
            'id': int,
            'name': str,
            'symbol': str
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'symbol': 'symbol'
        }

        self._id = id
        self._name = name
        self._symbol = symbol

    @classmethod
    def from_dict(cls, dikt):
        """
        Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Unit of this Unit.
        :rtype: Unit
        """
        return deserialize_model(dikt, cls)

    @property
    def id(self):
        """
        Gets the id of this Unit.

        :return: The id of this Unit.
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this Unit.

        :param id: The id of this Unit.
        :type id: int
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this Unit.

        :return: The name of this Unit.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this Unit.

        :param name: The name of this Unit.
        :type name: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def symbol(self):
        """
        Gets the symbol of this Unit.

        :return: The symbol of this Unit.
        :rtype: str
        """
        return self._symbol

    @symbol.setter
    def symbol(self, symbol):
        """
        Sets the symbol of this Unit.

        :param symbol: The symbol of this Unit.
        :type symbol: str
        """
        if symbol is None:
            raise ValueError("Invalid value for `symbol`, must not be `None`")

        self._symbol = symbol

