# generated by datamodel-codegen:
#   filename:  reuse_model_collapse_with_root.json
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import BaseModel, RootModel


class Pos(BaseModel):
    x: int | None = None
    y: int | None = None


class Nested1(BaseModel):
    pos: Pos | None = None


class StringType(RootModel[str]):
    root: str


class Model(BaseModel):
    field1: StringType | None = None
    field2: StringType | None = None
    nested1: Nested1 | None = None
    nested2: Nested1 | None = None
