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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs


class BigQueryTable(UniversalBaseModel):
    """
    BigQuery table
    """

    dataset_id: str = pydantic.Field()
    """
    Parent dataset ID
    """

    id: str = pydantic.Field()
    """
    Table ID
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Table description
    """

    fields: typing.Optional[typing.List["BigQueryField"]] = pydantic.Field(default=None)
    """
    Table schema fields
    """

    row_count: typing.Optional[str] = pydantic.Field(default=None)
    """
    Number of rows
    """

    created_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    Creation timestamp
    """

    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


from .big_query_field import BigQueryField  # noqa: E402, I001

update_forward_refs(BigQueryTable)
