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

from __future__ import annotations

from typing import Literal

from pydantic import BaseModel, Field


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


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


class Model(BaseModel):
    x: A | B | None = Field({'type': 'b'}, validate_default=True)
