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

from __future__ import annotations

from enum import Enum, StrEnum
from typing import Any

from pydantic import BaseModel, Field, RootModel


class Model(RootModel[Any]):
    root: Any


class MyArrayName(RootModel[list[str]]):
    root: list[str] = Field(..., title='MyArrayName')


class MyObjectName(RootModel[dict[str, str]]):
    root: dict[str, str] = Field(..., title='MyObjectName')


class MyEnumName(Enum):
    foo = 'foo'
    bar = 'bar'


class MyOneOfName(RootModel[str | float]):
    root: str | float = Field(..., title='MyOneOfName')


class MyAnyOfName(RootModel[bool | int]):
    root: bool | int = Field(..., title='MyAnyOfName')


class MyOneOfConstName(StrEnum):
    alpha = 'alpha'
    beta = 'beta'


class Foo(BaseModel):
    array: MyArrayName | None = Field(None, title='MyArrayName')
    object: MyObjectName | None = Field(None, title='MyObjectName')
    enum: MyEnumName | None = Field(None, title='MyEnumName')
    oneOf: MyOneOfName | None = Field(None, title='MyOneOfName')
    anyOf: MyAnyOfName | None = Field(None, title='MyAnyOfName')
    oneOfConst: MyOneOfConstName | None = Field(None, title='MyOneOfConstName')
