# 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 .data_frame_request_out_columns_item import DataFrameRequestOutColumnsItem
from .data_frame_request_out_data_item_item import DataFrameRequestOutDataItemItem
from .data_frame_request_out_index_item import DataFrameRequestOutIndexItem


class DataFrameRequestOut(UniversalBaseModel):
    """
    Response model with JSON dataframe representation.
    """

    columns: typing.List[typing.Optional[DataFrameRequestOutColumnsItem]]
    data: typing.List[typing.List[typing.Optional[DataFrameRequestOutDataItemItem]]]
    index: typing.Optional[typing.List[typing.Optional[DataFrameRequestOutIndexItem]]] = None

    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
