# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from det.models.base_model_ import Model
from det.models.element_defs_item import ElementDefsItem  # noqa: F401,E501
from det import util


class EnumDefsItem(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    def __init__(self, category: str=None, name: str=None, description: str=None, type_version: str=None, element_defs: List[ElementDefsItem]=None):  # noqa: E501
        """EnumDefsItem - a model defined in Swagger

        :param category: The category of this EnumDefsItem.  # noqa: E501
        :type category: str
        :param name: The name of this EnumDefsItem.  # noqa: E501
        :type name: str
        :param description: The description of this EnumDefsItem.  # noqa: E501
        :type description: str
        :param type_version: The type_version of this EnumDefsItem.  # noqa: E501
        :type type_version: str
        :param element_defs: The element_defs of this EnumDefsItem.  # noqa: E501
        :type element_defs: List[ElementDefsItem]
        """
        self.swagger_types = {
            'category': str,
            'name': str,
            'description': str,
            'type_version': str,
            'element_defs': List[ElementDefsItem]
        }

        self.attribute_map = {
            'category': 'category',
            'name': 'name',
            'description': 'description',
            'type_version': 'typeVersion',
            'element_defs': 'elementDefs'
        }

        self._category = category
        self._name = name
        self._description = description
        self._type_version = type_version
        self._element_defs = element_defs

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

        :param dikt: A dict.
        :type: dict
        :return: The EnumDefsItem of this EnumDefsItem.  # noqa: E501
        :rtype: EnumDefsItem
        """
        return util.deserialize_model(dikt, cls)

    @property
    def category(self) -> str:
        """Gets the category of this EnumDefsItem.


        :return: The category of this EnumDefsItem.
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category: str):
        """Sets the category of this EnumDefsItem.


        :param category: The category of this EnumDefsItem.
        :type category: str
        """
        allowed_values = ["ENUM"]  # noqa: E501
        if category not in allowed_values:
            raise ValueError(
                "Invalid value for `category` ({0}), must be one of {1}"
                .format(category, allowed_values)
            )

        self._category = category

    @property
    def name(self) -> str:
        """Gets the name of this EnumDefsItem.


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

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


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

        self._name = name

    @property
    def description(self) -> str:
        """Gets the description of this EnumDefsItem.


        :return: The description of this EnumDefsItem.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description: str):
        """Sets the description of this EnumDefsItem.


        :param description: The description of this EnumDefsItem.
        :type description: str
        """
        if description is None:
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501

        self._description = description

    @property
    def type_version(self) -> str:
        """Gets the type_version of this EnumDefsItem.


        :return: The type_version of this EnumDefsItem.
        :rtype: str
        """
        return self._type_version

    @type_version.setter
    def type_version(self, type_version: str):
        """Sets the type_version of this EnumDefsItem.


        :param type_version: The type_version of this EnumDefsItem.
        :type type_version: str
        """

        self._type_version = type_version

    @property
    def element_defs(self) -> List[ElementDefsItem]:
        """Gets the element_defs of this EnumDefsItem.


        :return: The element_defs of this EnumDefsItem.
        :rtype: List[ElementDefsItem]
        """
        return self._element_defs

    @element_defs.setter
    def element_defs(self, element_defs: List[ElementDefsItem]):
        """Sets the element_defs of this EnumDefsItem.


        :param element_defs: The element_defs of this EnumDefsItem.
        :type element_defs: List[ElementDefsItem]
        """

        self._element_defs = element_defs
