# 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 .google_forms_choice_option import GoogleFormsChoiceOption
from .google_forms_question_question_type import GoogleFormsQuestionQuestionType


class GoogleFormsQuestion(UniversalBaseModel):
    """
    A question item in the form - simplified structure
    """

    title: str = pydantic.Field()
    """
    The question title/prompt
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Additional description for the question
    """

    required: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether this question is required
    """

    question_type: GoogleFormsQuestionQuestionType = pydantic.Field()
    """
    The type of question
    """

    options: typing.Optional[typing.List[GoogleFormsChoiceOption]] = pydantic.Field(default=None)
    """
    List of options for choice-based questions
    """

    scale_low: typing.Optional[int] = pydantic.Field(default=None)
    """
    Low end of scale (for scale questions)
    """

    scale_high: typing.Optional[int] = pydantic.Field(default=None)
    """
    High end of scale (for scale questions)
    """

    scale_low_label: typing.Optional[str] = pydantic.Field(default=None)
    """
    Label for low end of scale
    """

    scale_high_label: typing.Optional[str] = pydantic.Field(default=None)
    """
    Label for high end of scale
    """

    include_year: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to include year in date questions
    """

    include_time: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to include time in date questions
    """

    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
