# 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


class Sheet(UniversalBaseModel):
    column_count: typing_extensions.Annotated[int, FieldMetadata(alias="columnCount")] = pydantic.Field()
    """
    Column count (Default to 100)
    """

    frozen_column_count: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="frozenColumnCount")] = (
        None
    )
    frozen_row_count: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="frozenRowCount")] = None
    hidden: typing.Optional[bool] = None
    index: int = pydantic.Field()
    """
    The order of the new sheet
    """

    row_count: typing_extensions.Annotated[int, FieldMetadata(alias="rowCount")] = pydantic.Field()
    """
    Row count (Defauls to 1000)
    """

    sheet_id: typing_extensions.Annotated[int, FieldMetadata(alias="sheetId")] = pydantic.Field()
    """
    Sheet ID (required)
    """

    tab_color: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="tabColor")] = pydantic.Field(
        default=None
    )
    """
    Tab color in hex format (e.g., '#FF0000' for red)
    """

    title: str

    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
