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

from __future__ import annotations

from pydantic import BaseModel, Field, RootModel

from . import Foo as Foo_1


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


class Bar(BaseModel):
    foo: Foo_1 | None = Field({'text': 'abc', 'number': 123}, validate_default=True)
    baz: list[Foo_1] | None = Field(
        [{'text': 'abc', 'number': 123}, {'text': 'efg', 'number': 456}],
        validate_default=True,
    )
    nested_foo: Foo | None = Field('default foo', validate_default=True)
