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

from __future__ import annotations

from enum import Enum

from pydantic import BaseModel, RootModel


class ItemType(Enum):
    text = 'text'


class TextItem(BaseModel):
    itemType: ItemType
    text: str


class ItemType1(Enum):
    number = 'number'


class NumberItem(BaseModel):
    itemType: ItemType1
    value: int


class Item(RootModel[TextItem | NumberItem]):
    root: TextItem | NumberItem


class ItemPostRequest1(BaseModel):
    itemId: str


class ItemPostRequest2(TextItem, ItemPostRequest1):
    pass


class ItemPostRequest3(NumberItem, ItemPostRequest1):
    pass


class ItemPostRequest(RootModel[ItemPostRequest2 | ItemPostRequest3]):
    root: ItemPostRequest2 | ItemPostRequest3
