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

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, Field


class BaseItem(BaseModel):
    itemType: str


class FooItem(BaseModel):
    fooValue: Optional[str] = None


class BarItem(BaseModel):
    barValue: Optional[int] = None


class ItemContainer(BaseModel):
    item: BaseItem = Field(..., discriminator='itemType')
