# 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 FormTemplateSectionObjectResponseBody(UniversalBaseModel):
    """
    Form Template section object.
    """

    field_index_first_inclusive: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="fieldIndexFirstInclusive"),
        pydantic.Field(
            alias="fieldIndexFirstInclusive",
            description="The index of the first field from the fields array that is in this section. Index 0 represents the first field definition of the fields array.",
        ),
    ]
    field_index_last_inclusive: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="fieldIndexLastInclusive"),
        pydantic.Field(
            alias="fieldIndexLastInclusive",
            description="The index of the last field from the fields array that is in this section.",
        ),
    ]
    id: str = pydantic.Field()
    """
    Identifier of the section.
    """

    label: str = pydantic.Field()
    """
    Label of the section.
    """

    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
