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

from __future__ import annotations

from typing import Annotated

from pydantic import BaseModel, Field
from typing_extensions import TypeAliasType

SimpleString = TypeAliasType("SimpleString", str)


UnionType = TypeAliasType("UnionType", str | int)


ArrayType = TypeAliasType("ArrayType", list[str])


AnnotatedType = TypeAliasType(
    "AnnotatedType", Annotated[str | bool, Field(..., title='MyAnnotatedType')]
)


class ModelWithTypeAliasField(BaseModel):
    simple_field: SimpleString | None = None
    union_field: UnionType | None = None
    array_field: ArrayType | None = None
    annotated_field: AnnotatedType | None = None
