# generated by datamodel-codegen:
#   filename:  discriminator_enum_sanitized.yaml
#   timestamp: 1985-10-26T08:21:00+00:00

from __future__ import annotations

from enum import Enum
from typing import Literal

from pydantic import BaseModel, Field, RootModel


class RequestVersionEnum(Enum):
    v1_beta = 'v1-beta'
    v2 = 'v2'


class RequestBase(BaseModel):
    version: RequestVersionEnum


class RequestV1(RequestBase):
    request_id: str
    version: Literal[RequestVersionEnum.v1_beta]


class RequestV2(RequestBase):
    version: Literal[RequestVersionEnum.v2]


class Request(RootModel[RequestV1 | RequestV2]):
    root: RequestV1 | RequestV2 = Field(..., discriminator='version')
