from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from openapi_server.models.base_model import Model
from openapi_server import util


class TdNode(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, id=None, op_type=None, name=None, path=None, properties=None):  # noqa: E501
        """TdNode - a model defined in OpenAPI

        :param id: The id of this TdNode.  # noqa: E501
        :type id: int
        :param op_type: The op_type of this TdNode.  # noqa: E501
        :type op_type: str
        :param name: The name of this TdNode.  # noqa: E501
        :type name: str
        :param path: The path of this TdNode.  # noqa: E501
        :type path: str
        :param properties: The properties of this TdNode.  # noqa: E501
        :type properties: Dict[str, object]
        """
        self.openapi_types = {
            'id': int,
            'op_type': str,
            'name': str,
            'path': str,
            'properties': Dict[str, object]
        }

        self.attribute_map = {
            'id': 'id',
            'op_type': 'opType',
            'name': 'name',
            'path': 'path',
            'properties': 'properties'
        }

        self._id = id
        self._op_type = op_type
        self._name = name
        self._path = path
        self._properties = properties

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

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

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


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

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


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

        self._id = id

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


        :return: The op_type of this TdNode.
        :rtype: str
        """
        return self._op_type

    @op_type.setter
    def op_type(self, op_type: str):
        """Sets the op_type of this TdNode.


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

        self._op_type = op_type

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


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

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


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

        self._name = name

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


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

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


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

        self._path = path

    @property
    def properties(self) -> Dict[str, object]:
        """Gets the properties of this TdNode.


        :return: The properties of this TdNode.
        :rtype: Dict[str, object]
        """
        return self._properties

    @properties.setter
    def properties(self, properties: Dict[str, object]):
        """Sets the properties of this TdNode.


        :param properties: The properties of this TdNode.
        :type properties: Dict[str, object]
        """
        if properties is None:
            raise ValueError("Invalid value for `properties`, must not be `None`")  # noqa: E501

        self._properties = properties
