# generated by datamodel-codegen:
#   filename:  default_factory_forward_nested_models.json

from __future__ import annotations

from msgspec import UNSET, Struct, UnsetType, field


class Existing(Struct):
    value: str | UnsetType = UNSET


class Node(Struct):
    child: Node | UnsetType = UNSET


class Model(Struct):
    existing: Existing | UnsetType = field(default_factory=Existing)
    cycle: CycleA | UnsetType = field(default_factory=lambda: CycleA())
    node: Node | UnsetType = field(default_factory=Node)


class CycleA(Struct):
    b: CycleB | UnsetType = UNSET


class CycleB(Struct):
    a: CycleA | UnsetType = UNSET
