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

from __future__ import annotations

from dataclasses import dataclass, field


@dataclass
class Existing:
    value: str | None = None


@dataclass
class Node:
    child: Node | None = None


@dataclass
class Model:
    existing: Existing | None = field(default_factory=Existing)
    cycle: CycleA | None = field(default_factory=lambda: CycleA())
    node: Node | None = field(default_factory=Node)


@dataclass
class CycleA:
    b: CycleB | None = None


@dataclass
class CycleB:
    a: CycleA | None = None
