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

from __future__ import annotations

from typing import Annotated, Literal

from my_app import B
from pydantic import BaseModel, Field


class A(BaseModel):
    type: Literal['a'] | None = None


class B1(BaseModel):
    type: Literal['b'] | None = None


class Other(BaseModel):
    a: B | None = None


class Model(BaseModel):
    x: Annotated[A | B1 | None, Field(validate_default=True)] = {'type': 'b'}
    other: Other | None = None
