"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .unifiedbenchmarksaaitem import (
    UnifiedBenchmarksAAItem,
    UnifiedBenchmarksAAItemTypedDict,
)
from .unifiedbenchmarksdaitem import (
    UnifiedBenchmarksDAItem,
    UnifiedBenchmarksDAItemTypedDict,
)
from .unifiedbenchmarksmeta import UnifiedBenchmarksMeta, UnifiedBenchmarksMetaTypedDict
from openrouter.types import BaseModel
from openrouter.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import List, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


DataTypedDict = TypeAliasType(
    "DataTypedDict",
    Union[UnifiedBenchmarksAAItemTypedDict, UnifiedBenchmarksDAItemTypedDict],
)


Data = Annotated[
    Union[
        Annotated[UnifiedBenchmarksAAItem, Tag("artificial-analysis")],
        Annotated[UnifiedBenchmarksDAItem, Tag("design-arena")],
    ],
    Discriminator(lambda m: get_discriminator(m, "source", "source")),
]


class UnifiedBenchmarksResponseTypedDict(TypedDict):
    data: List[DataTypedDict]
    meta: UnifiedBenchmarksMetaTypedDict


class UnifiedBenchmarksResponse(BaseModel):
    data: List[Data]

    meta: UnifiedBenchmarksMeta
