# coding: utf-8

from __future__ import absolute_import
from swagger_server.models.catalog_data_category_tree_interface import CatalogDataCategoryTreeInterface
from .base_model_ import Model
from datetime import date, datetime
from typing import List, Dict
from ..util import deserialize_model


class CatalogDataCategoryTreeInterface(Model):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id: int=None, parent_id: int=None, name: str=None, is_active: bool=None, position: int=None, level: int=None, product_count: int=None, children_data: List[CatalogDataCategoryTreeInterface]=None):
        """
        CatalogDataCategoryTreeInterface - a model defined in Swagger

        :param id: The id of this CatalogDataCategoryTreeInterface.
        :type id: int
        :param parent_id: The parent_id of this CatalogDataCategoryTreeInterface.
        :type parent_id: int
        :param name: The name of this CatalogDataCategoryTreeInterface.
        :type name: str
        :param is_active: The is_active of this CatalogDataCategoryTreeInterface.
        :type is_active: bool
        :param position: The position of this CatalogDataCategoryTreeInterface.
        :type position: int
        :param level: The level of this CatalogDataCategoryTreeInterface.
        :type level: int
        :param product_count: The product_count of this CatalogDataCategoryTreeInterface.
        :type product_count: int
        :param children_data: The children_data of this CatalogDataCategoryTreeInterface.
        :type children_data: List[CatalogDataCategoryTreeInterface]
        """
        self.swagger_types = {
            'id': int,
            'parent_id': int,
            'name': str,
            'is_active': bool,
            'position': int,
            'level': int,
            'product_count': int,
            'children_data': List[CatalogDataCategoryTreeInterface]
        }

        self.attribute_map = {
            'id': 'id',
            'parent_id': 'parent_id',
            'name': 'name',
            'is_active': 'is_active',
            'position': 'position',
            'level': 'level',
            'product_count': 'product_count',
            'children_data': 'children_data'
        }

        self._id = id
        self._parent_id = parent_id
        self._name = name
        self._is_active = is_active
        self._position = position
        self._level = level
        self._product_count = product_count
        self._children_data = children_data

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

        :param dikt: A dict.
        :type: dict
        :return: The catalog-data-category-tree-interface of this CatalogDataCategoryTreeInterface.
        :rtype: CatalogDataCategoryTreeInterface
        """
        return deserialize_model(dikt, cls)

    @property
    def id(self) -> int:
        """
        Gets the id of this CatalogDataCategoryTreeInterface.

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

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

        :param id: The id of this CatalogDataCategoryTreeInterface.
        :type id: int
        """

        self._id = id

    @property
    def parent_id(self) -> int:
        """
        Gets the parent_id of this CatalogDataCategoryTreeInterface.
        Parent category ID

        :return: The parent_id of this CatalogDataCategoryTreeInterface.
        :rtype: int
        """
        return self._parent_id

    @parent_id.setter
    def parent_id(self, parent_id: int):
        """
        Sets the parent_id of this CatalogDataCategoryTreeInterface.
        Parent category ID

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

        self._parent_id = parent_id

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

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

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

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

        self._name = name

    @property
    def is_active(self) -> bool:
        """
        Gets the is_active of this CatalogDataCategoryTreeInterface.
        Whether category is active

        :return: The is_active of this CatalogDataCategoryTreeInterface.
        :rtype: bool
        """
        return self._is_active

    @is_active.setter
    def is_active(self, is_active: bool):
        """
        Sets the is_active of this CatalogDataCategoryTreeInterface.
        Whether category is active

        :param is_active: The is_active of this CatalogDataCategoryTreeInterface.
        :type is_active: bool
        """
        if is_active is None:
            raise ValueError("Invalid value for `is_active`, must not be `None`")

        self._is_active = is_active

    @property
    def position(self) -> int:
        """
        Gets the position of this CatalogDataCategoryTreeInterface.
        Category position

        :return: The position of this CatalogDataCategoryTreeInterface.
        :rtype: int
        """
        return self._position

    @position.setter
    def position(self, position: int):
        """
        Sets the position of this CatalogDataCategoryTreeInterface.
        Category position

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

        self._position = position

    @property
    def level(self) -> int:
        """
        Gets the level of this CatalogDataCategoryTreeInterface.
        Category level

        :return: The level of this CatalogDataCategoryTreeInterface.
        :rtype: int
        """
        return self._level

    @level.setter
    def level(self, level: int):
        """
        Sets the level of this CatalogDataCategoryTreeInterface.
        Category level

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

        self._level = level

    @property
    def product_count(self) -> int:
        """
        Gets the product_count of this CatalogDataCategoryTreeInterface.
        Product count

        :return: The product_count of this CatalogDataCategoryTreeInterface.
        :rtype: int
        """
        return self._product_count

    @product_count.setter
    def product_count(self, product_count: int):
        """
        Sets the product_count of this CatalogDataCategoryTreeInterface.
        Product count

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

        self._product_count = product_count

    @property
    def children_data(self) -> List[CatalogDataCategoryTreeInterface]:
        """
        Gets the children_data of this CatalogDataCategoryTreeInterface.

        :return: The children_data of this CatalogDataCategoryTreeInterface.
        :rtype: List[CatalogDataCategoryTreeInterface]
        """
        return self._children_data

    @children_data.setter
    def children_data(self, children_data: List[CatalogDataCategoryTreeInterface]):
        """
        Sets the children_data of this CatalogDataCategoryTreeInterface.

        :param children_data: The children_data of this CatalogDataCategoryTreeInterface.
        :type children_data: List[CatalogDataCategoryTreeInterface]
        """
        if children_data is None:
            raise ValueError("Invalid value for `children_data`, must not be `None`")

        self._children_data = children_data

