"""Custom types for CGNS data structures."""# -*- coding: utf-8 -*-## This file is subject to the terms and conditions defined in# file 'LICENSE.txt', which is part of this source code package.##importsysfromtypingimportAny,OptionalfrompydanticimportBaseModel,Fieldifsys.version_info>=(3,11):fromtypingimportTypeAliaselse:# pragma: no coverfromtyping_extensionsimportTypeAlias
[docs]classCGNSNode(BaseModel):"""Custom type for a CGNS node."""
[docs]name:str=Field(...,description="The name of the CGNS node.")
[docs]value:Optional[Any]=Field(None,description="The value of the CGNS node, which can be of any type or None.",)
[docs]children:list["CGNSNode"]=Field(default_factory=list,description="A list of child CGNS nodes.")
[docs]label:str=Field(...,description="The label of the CGNS node.")