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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .big_query_dataset_reference import BigQueryDatasetReference


class BigQueryDataset(UniversalBaseModel):
    """
    BigQuery dataset object - matches API format
    """

    dataset_reference: typing_extensions.Annotated[
        BigQueryDatasetReference, FieldMetadata(alias="datasetReference")
    ] = pydantic.Field()
    """
    Dataset reference
    """

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

    location: typing.Optional[str] = pydantic.Field(default=None)
    """
    Dataset location
    """

    creation_time: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="creationTime")] = (
        pydantic.Field(default=None)
    )
    """
    Creation timestamp
    """

    last_modified_time: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="lastModifiedTime")] = (
        pydantic.Field(default=None)
    )
    """
    Last modified 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
