# generated by datamodel-codegen:
#   filename:  <stdin>
#   timestamp: 1985-10-26T08:21:00+00:00

from __future__ import annotations

from pydantic import BaseModel, Field, RootModel


class GrandParent(BaseModel):
    grand_field: str = Field(..., title='Grand Field')


class Parent(GrandParent):
    parent_field: int = Field(..., title='Parent Field')


class ChildA(Parent):
    child_a_field: float = Field(..., title='Child A Field')


class ChildB(Parent):
    child_b_field: bool = Field(..., title='Child B Field')


class Model(RootModel[ChildA | ChildB]):
    root: ChildA | ChildB
