# generated by datamodel-codegen:
#   filename:  reduce_duplicate_field_types.json
#   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

PlaceName = TypeAliasType(
    "PlaceName",
    Annotated[
        str,
        Field(
            ...,
            description='A place name with alias',
            examples=['Tokyo', 'New York'],
            title='PlaceName',
        ),
    ],
)


class ClassA(BaseModel):
    place_name: PlaceName
    other_field: int | None = None


class ClassB(BaseModel):
    place_name: PlaceName
    description: str | None = None


Model = TypeAliasType("Model", Annotated[ClassA | ClassB, Field(..., title='Model')])
