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

from __future__ import annotations

from typing import Literal

from pydantic import BaseModel, Field, RootModel


class Foo(BaseModel):
    kind: Literal[1]


class Bar(BaseModel):
    kind: Literal[2]


class Base(RootModel[Foo | Bar]):
    root: Foo | Bar = Field(..., discriminator='kind')
