# coding: utf-8

from __future__ import absolute_import

from swagger_server.models.model_category_data import ModelCategoryData
from swagger_server.models.model_category_ref import ModelCategoryRef
from .base_model_ import Model as BaseModel
from datetime import date, datetime
from typing import List, Dict
from ..util import deserialize_model


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

        :param name: The name of this ModelCategory.
        :type name: str
        :param description: The description of this ModelCategory.
        :type description: str
        :param id: The id of this ModelCategory.
        :type id: int
        :param parent: The parent of this ModelCategory.
        :type parent: ModelCategoryRef
        :param childs: The childs of this ModelCategory.
        :type childs: List[ModelCategory]
        :param path: The path of this ModelCategory.
        :type path: str
        """
        self.swagger_types = {
            'name': str,
            'description': str,
            'id': int,
            'parent': ModelCategoryRef,
            'childs': List[ModelCategory],
            'path': str
        }

        self.attribute_map = {
            'name': 'name',
            'description': 'description',
            'id': 'id',
            'parent': 'parent',
            'childs': 'childs',
            'path': 'path'
        }

        self._name = name
        self._description = description
        self._id = id
        self._parent = parent
        self._childs = childs
        self._path = path

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

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

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

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

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

        :param name: The name of this ModelCategory.
        :type name: str
        """

        self._name = name

    @property
    def description(self):
        """
        Gets the description of this ModelCategory.

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

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

        :param description: The description of this ModelCategory.
        :type description: str
        """

        self._description = description

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

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

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

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

        self._id = id

    @property
    def parent(self):
        """
        Gets the parent of this ModelCategory.

        :return: The parent of this ModelCategory.
        :rtype: ModelCategoryRef
        """
        return self._parent

    @parent.setter
    def parent(self, parent):
        """
        Sets the parent of this ModelCategory.

        :param parent: The parent of this ModelCategory.
        :type parent: ModelCategoryRef
        """

        self._parent = parent

    @property
    def childs(self):
        """
        Gets the childs of this ModelCategory.

        :return: The childs of this ModelCategory.
        :rtype: List[ModelCategory]
        """
        return self._childs

    @childs.setter
    def childs(self, childs):
        """
        Sets the childs of this ModelCategory.

        :param childs: The childs of this ModelCategory.
        :type childs: List[ModelCategory]
        """

        self._childs = childs

    @property
    def path(self):
        """
        Gets the path of this ModelCategory.

        :return: The path of this ModelCategory.
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """
        Sets the path of this ModelCategory.

        :param path: The path of this ModelCategory.
        :type path: str
        """

        self._path = path

