# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .dashboard import Dashboard
from .dataset import Dataset
from .unified_dashboard_response_components_item import UnifiedDashboardResponseComponentsItem
from .unified_dashboard_response_layers_item import UnifiedDashboardResponseLayersItem


class UnifiedDashboardResponse(UniversalBaseModel):
    """
    Unified response containing all dashboard data in a single request.
    """

    dashboard: Dashboard
    components: typing.List[UnifiedDashboardResponseComponentsItem]
    layers: typing.List[UnifiedDashboardResponseLayersItem]
    datasets: typing.List[Dataset]

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
