# generated by datamodel-codegen:
#   filename:  StudyConfigSchema.json
#   timestamp: 2025-09-24T17:54:00+00:00

from __future__ import annotations

import warnings
from enum import Enum
from typing import Any, Dict, List, Literal, Optional, TypedDict, Union

from pydantic import BaseModel, ConfigDict, Field, RootModel

warnings.filterwarnings("ignore", module="pydantic")


class Answer(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    acceptableHigh: Optional[float] = Field(
        None,
        description='The acceptable high value for the answer. This is used to define a range of acceptable answers.',
    )
    acceptableLow: Optional[float] = Field(
        None,
        description='The acceptable low value for the answer. This is used to define a range of acceptable answers.',
    )
    answer: Any = Field(..., description='The correct answer to the question.')
    id: str = Field(
        ...,
        description='The id of the answer. This is used to identify the answer in the data file.',
    )  # End of class


class AnswerType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    acceptableHigh: Optional[float] = Field(
        None,
        description='The acceptable high value for the answer. This is used to define a range of acceptable answers.',
    )
    acceptableLow: Optional[float] = Field(
        None,
        description='The acceptable low value for the answer. This is used to define a range of acceptable answers.',
    )
    answer: Any = Field(..., description='The correct answer to the question.')
    id: str = Field(
        ...,
        description='The id of the answer. This is used to identify the answer in the data file.',
    )


class ResponseOrder(Enum):
    fixed = 'fixed'
    random = 'random'


class Type(Enum):
    markdown = 'markdown'
    react_component = 'react-component'
    image = 'image'
    website = 'website'
    questionnaire = 'questionnaire'
    vega = 'vega'
    video = 'video'


class OptionOrder(Enum):
    fixed = 'fixed'
    random = 'random'


class Order(Enum):
    random = 'random'
    latinSquare = 'latinSquare'
    fixed = 'fixed'


class Condition(Enum):
    numCorrect = 'numCorrect'
    numIncorrect = 'numIncorrect'


warnings.filterwarnings("ignore", module="pydantic")


class ComponentBlockCondition(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    check: Literal['block'] = Field(..., description="The check we'll perform.")
    condition: Condition = Field(..., description='The condition to check.')
    to: str = Field(..., description='The id of the component or block to skip to')
    value: float = Field(
        ..., description='The number of correct or incorrect responses to check for.'
    )  # End of class


class ComponentBlockConditionType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    check: Literal['block'] = Field(..., description="The check we'll perform.")
    condition: Condition = Field(..., description='The condition to check.')
    to: str = Field(..., description='The id of the component or block to skip to')
    value: float = Field(
        ..., description='The number of correct or incorrect responses to check for.'
    )


class ConfigResponseBlockLocation(Enum):
    sidebar = 'sidebar'
    aboveStimulus = 'aboveStimulus'
    belowStimulus = 'belowStimulus'


warnings.filterwarnings("ignore", module="pydantic")


class DeterministicInterruption(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    components: List[str] = Field(
        ...,
        description='The components that are included in the interruption. These reference components in the StudyConfig.components section of the config.',
    )
    firstLocation: float = Field(
        ...,
        description='The Location of the first instance of the interruption. If this is set to 2, the interruption will be shown after the second component (inserted at index 2).',
    )
    spacing: float = Field(
        ..., description='The number of components between breaks.'
    )  # End of class


class DeterministicInterruptionType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    components: List[str] = Field(
        ...,
        description='The components that are included in the interruption. These reference components in the StudyConfig.components section of the config.',
    )
    firstLocation: float = Field(
        ...,
        description='The Location of the first instance of the interruption. If this is set to 2, the interruption will be shown after the second component (inserted at index 2).',
    )
    spacing: float = Field(..., description='The number of components between breaks.')


warnings.filterwarnings("ignore", module="pydantic")


class DynamicBlock(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    functionPath: str = Field(
        ...,
        description='The path to the function that generates the components. This should be a relative path from the src/public folder.',
    )
    id: str = Field(
        ...,
        description='The id of the block. This is used to identify the block in the SkipConditions and is only required if you want to refer to the whole block in the condition.to property.',
    )
    order: Literal['dynamic'] = Field(
        ...,
        description='The type of order. This can be random (pure random), latinSquare (random with some guarantees), or fixed.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the function. These can be used within your function to render different things.',
    )  # End of class


class DynamicBlockType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    functionPath: str = Field(
        ...,
        description='The path to the function that generates the components. This should be a relative path from the src/public folder.',
    )
    id: str = Field(
        ...,
        description='The id of the block. This is used to identify the block in the SkipConditions and is only required if you want to refer to the whole block in the condition.to property.',
    )
    order: Literal['dynamic'] = Field(
        ...,
        description='The type of order. This can be random (pure random), latinSquare (random with some guarantees), or fixed.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the function. These can be used within your function to render different things.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class IndividualComponentAllResponsesCondition(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    check: Literal['responses'] = Field(..., description="The check we'll perform.")
    name: str = Field(..., description='The name of the component to check.')
    to: str = Field(
        ..., description='The id of the component or block to skip to'
    )  # End of class


class IndividualComponentAllResponsesConditionType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    check: Literal['responses'] = Field(..., description="The check we'll perform.")
    name: str = Field(..., description='The name of the component to check.')
    to: str = Field(..., description='The id of the component or block to skip to')


class Comparison(Enum):
    equal = 'equal'
    notEqual = 'notEqual'


warnings.filterwarnings("ignore", module="pydantic")


class IndividualComponentSingleResponseCondition(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    check: Literal['response'] = Field(..., description="The check we'll perform.")
    comparison: Comparison = Field(..., description='The comparison to use.')
    name: str = Field(..., description='The name of the component to check.')
    responseId: str = Field(..., description='The response id to check.')
    to: str = Field(..., description='The id of the component or block to skip to')
    value: Union[str, float] = Field(
        ..., description='The value to check.'
    )  # End of class


class IndividualComponentSingleResponseConditionType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    check: Literal['response'] = Field(..., description="The check we'll perform.")
    comparison: Comparison = Field(..., description='The comparison to use.')
    name: str = Field(..., description='The name of the component to check.')
    responseId: str = Field(..., description='The response id to check.')
    to: str = Field(..., description='The id of the component or block to skip to')
    value: Union[str, float] = Field(..., description='The value to check.')


class QuestionOrder(Enum):
    fixed = 'fixed'
    random = 'random'


class Type2(Enum):
    matrix_radio = 'matrix-radio'
    matrix_checkbox = 'matrix-checkbox'


warnings.filterwarnings("ignore", module="pydantic")


class NumberOption(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    label: str = Field(..., description='The label displayed to participants.')
    value: float = Field(
        ..., description="The value stored in the participant's data."
    )  # End of class


class NumberOptionType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    label: str = Field(..., description='The label displayed to participants.')
    value: float = Field(..., description="The value stored in the participant's data.")


warnings.filterwarnings("ignore", module="pydantic")


class RandomInterruption(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    components: List[str] = Field(
        ...,
        description='The components that are included in the interruption. These reference components in the StudyConfig.components section of the config.',
    )
    numInterruptions: float = Field(
        ..., description='The number of times the interruption will be randomly added'
    )
    spacing: Literal['random'] = Field(
        ...,
        description='If spacing is set to random, reVISit will add interruptions randomly. These interruptions will not ever be displayed as the first component in the block.',
    )  # End of class


class RandomInterruptionType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    components: List[str] = Field(
        ...,
        description='The components that are included in the interruption. These reference components in the StudyConfig.components section of the config.',
    )
    numInterruptions: float = Field(
        ..., description='The number of times the interruption will be randomly added'
    )
    spacing: Literal['random'] = Field(
        ...,
        description='If spacing is set to random, reVISit will add interruptions randomly. These interruptions will not ever be displayed as the first component in the block.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class RepeatedComponentBlockCondition(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    check: Literal['repeatedComponent'] = Field(
        ..., description="The check we'll perform."
    )
    condition: Condition = Field(..., description='The condition to check.')
    name: str = Field(
        ...,
        description='The name of the repeated component to check (e.g. attentionCheck).',
    )
    to: str = Field(..., description='The id of the component or block to skip to')
    value: float = Field(
        ..., description='The number of correct or incorrect responses to check for.'
    )  # End of class


class RepeatedComponentBlockConditionType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    check: Literal['repeatedComponent'] = Field(
        ..., description="The check we'll perform."
    )
    condition: Condition = Field(..., description='The condition to check.')
    name: str = Field(
        ...,
        description='The name of the repeated component to check (e.g. attentionCheck).',
    )
    to: str = Field(..., description='The id of the component or block to skip to')
    value: float = Field(
        ..., description='The number of correct or incorrect responses to check for.'
    )


class SkipConditions(
    RootModel[
        List[
            Union[
                IndividualComponentSingleResponseCondition,
                IndividualComponentAllResponsesCondition,
                ComponentBlockCondition,
                RepeatedComponentBlockCondition,
            ]
        ]
    ]
):
    root: List[
        Union[
            IndividualComponentSingleResponseCondition,
            IndividualComponentAllResponsesCondition,
            ComponentBlockCondition,
            RepeatedComponentBlockCondition,
        ]
    ] = Field(
        ...,
        description='The SkipConditions interface is used to define skip conditions. This is used to skip to a different component/block based on the response to a component or based on the number of correct/incorrect responses in a block. Skip conditions work recursively: if you have a nested block, the parent blocks\' skip conditions will be considered when computing the skip logic.\n\nSkip conditions are evaluated in the order they are defined in the array. If a condition is met, the participant will be redirected to the component or block specified in the `"to"` property. If no conditions are met, the participant will continue to the next component in the sequence.\n\nSkip conditions allow you to jump to a different component or block. If you intend to skip to a block, you should specify a block id in the sequence. If you intend to skip to a component, you should specify a component id. Skipping backwards is not supported. Skipping to a repeated component will skip to the first instance of the component after the component that triggered the skip.\n\nPlease see the interface definitions for more specific information on the different types of skip conditions.',
    )


# End of class


class SkipConditionsType(TypedDict):
    root: List[
        Union[
            IndividualComponentSingleResponseCondition,
            IndividualComponentAllResponsesCondition,
            ComponentBlockCondition,
            RepeatedComponentBlockCondition,
        ]
    ] = Field(
        ...,
        description='The SkipConditions interface is used to define skip conditions. This is used to skip to a different component/block based on the response to a component or based on the number of correct/incorrect responses in a block. Skip conditions work recursively: if you have a nested block, the parent blocks\' skip conditions will be considered when computing the skip logic.\n\nSkip conditions are evaluated in the order they are defined in the array. If a condition is met, the participant will be redirected to the component or block specified in the `"to"` property. If no conditions are met, the participant will continue to the next component in the sequence.\n\nSkip conditions allow you to jump to a different component or block. If you intend to skip to a block, you should specify a block id in the sequence. If you intend to skip to a component, you should specify a component id. Skipping backwards is not supported. Skipping to a repeated component will skip to the first instance of the component after the component that triggered the skip.\n\nPlease see the interface definitions for more specific information on the different types of skip conditions.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class StringOption(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    label: str = Field(
        ..., description='The label displayed to participants. Markdown is supported.'
    )
    value: str = Field(
        ..., description="The value stored in the participant's data."
    )  # End of class


class StringOptionType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    label: str = Field(
        ..., description='The label displayed to participants. Markdown is supported.'
    )
    value: str = Field(..., description="The value stored in the participant's data.")


warnings.filterwarnings("ignore", module="pydantic")


class StudyMetadata(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    authors: List[str] = Field(..., description='The authors of your study.')
    date: str = Field(
        ..., description='The date of your study, may be useful for the researcher.'
    )
    description: str = Field(
        ..., description='The description of your study, shown on the landing page.'
    )
    organizations: List[str] = Field(
        ..., description='The organizations that are associated with your study.'
    )
    title: str = Field(
        ..., description='The title of your study, shown on the landing page.'
    )
    version: str = Field(
        ...,
        description='The version of your study. When you change a configuration file after a study has already been distributed to participants, you can change the version number so that the participants who see this new configuration file can be identified.',
    )  # End of class


class StudyMetadataType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    authors: List[str] = Field(..., description='The authors of your study.')
    date: str = Field(
        ..., description='The date of your study, may be useful for the researcher.'
    )
    description: str = Field(
        ..., description='The description of your study, shown on the landing page.'
    )
    organizations: List[str] = Field(
        ..., description='The organizations that are associated with your study.'
    )
    title: str = Field(
        ..., description='The title of your study, shown on the landing page.'
    )
    version: str = Field(
        ...,
        description='The version of your study. When you change a configuration file after a study has already been distributed to participants, you can change the version number so that the participants who see this new configuration file can be identified.',
    )


class FontStyle(Enum):
    normal = 'normal'
    italic = 'italic'
    oblique = 'oblique'


class Position(Enum):
    static = 'static'
    relative = 'relative'
    absolute = 'absolute'
    fixed = 'fixed'
    sticky = 'sticky'


class TextAlign(Enum):
    start = 'start'
    center = 'center'
    end = 'end'
    justify = 'justify'
    left = 'left'
    right = 'right'
    match_parent = 'match-parent'


class TextDecoration(Enum):
    none = 'none'
    underline = 'underline'
    overline = 'overline'
    line_through = 'line-through'
    underline_overline = 'underline-overline'


class TextTransform(Enum):
    capitalize = 'capitalize'
    lowercase = 'lowercase'
    none = 'none'
    uppercase = 'uppercase'


warnings.filterwarnings("ignore", module="pydantic")


class Styles(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    background: Optional[str] = Field(None, description='Background')
    backgroundColor: Optional[str] = None
    backgroundImage: Optional[str] = None
    backgroundPosition: Optional[str] = None
    backgroundSize: Optional[str] = None
    border: Optional[str] = Field(None, description='Border')
    borderRadius: Optional[str] = None
    bottom: Optional[str] = None
    color: Optional[str] = Field(None, description='Typography')
    filter: Optional[str] = Field(None, description='Filter')
    font: Optional[str] = None
    fontFamily: Optional[str] = None
    fontSize: Optional[str] = None
    fontStyle: Optional[FontStyle] = None
    fontWeight: Optional[Union[str, float]] = None
    height: Optional[str] = Field(None, description='Sizing')
    left: Optional[str] = None
    letterSpacing: Optional[str] = None
    lineHeight: Optional[Union[str, float]] = None
    margin: Optional[str] = Field(None, description='Spacing')
    maxHeight: Optional[str] = None
    maxWidth: Optional[str] = None
    minHeight: Optional[str] = None
    minWidth: Optional[str] = None
    padding: Optional[str] = None
    position: Optional[Position] = Field(None, description='Positioning')
    right: Optional[str] = None
    textAlign: Optional[TextAlign] = None
    textDecoration: Optional[TextDecoration] = None
    textTransform: Optional[TextTransform] = None
    top: Optional[str] = None
    transform: Optional[str] = Field(None, description='Transform')
    width: Optional[str] = None
    wordSpacing: Optional[str] = None  # End of class


class StylesType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    background: Optional[str] = Field(None, description='Background')
    backgroundColor: Optional[str] = None
    backgroundImage: Optional[str] = None
    backgroundPosition: Optional[str] = None
    backgroundSize: Optional[str] = None
    border: Optional[str] = Field(None, description='Border')
    borderRadius: Optional[str] = None
    bottom: Optional[str] = None
    color: Optional[str] = Field(None, description='Typography')
    filter: Optional[str] = Field(None, description='Filter')
    font: Optional[str] = None
    fontFamily: Optional[str] = None
    fontSize: Optional[str] = None
    fontStyle: Optional[FontStyle] = None
    fontWeight: Optional[Union[str, float]] = None
    height: Optional[str] = Field(None, description='Sizing')
    left: Optional[str] = None
    letterSpacing: Optional[str] = None
    lineHeight: Optional[Union[str, float]] = None
    margin: Optional[str] = Field(None, description='Spacing')
    maxHeight: Optional[str] = None
    maxWidth: Optional[str] = None
    minHeight: Optional[str] = None
    minWidth: Optional[str] = None
    padding: Optional[str] = None
    position: Optional[Position] = Field(None, description='Positioning')
    right: Optional[str] = None
    textAlign: Optional[TextAlign] = None
    textDecoration: Optional[TextDecoration] = None
    textTransform: Optional[TextTransform] = None
    top: Optional[str] = None
    transform: Optional[str] = Field(None, description='Transform')
    width: Optional[str] = None
    wordSpacing: Optional[str] = None


warnings.filterwarnings("ignore", module="pydantic")


class TextOnlyResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[Any] = None
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[Any] = None
    prompt: str = Field(
        ..., description='The markdown text that is displayed to the user.'
    )
    required: Optional[Any] = None
    requiredLabel: Optional[Any] = None
    requiredValue: Optional[Any] = None
    restartEnumeration: Optional[bool] = Field(
        None,
        description='Whether to restart the enumeration of the questions. Defaults to false.',
    )
    secondaryText: Optional[Any] = None
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['textOnly']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[Any] = None  # End of class


class TextOnlyResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[Any] = None
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[Any] = None
    prompt: str = Field(
        ..., description='The markdown text that is displayed to the user.'
    )
    required: Optional[Any] = None
    requiredLabel: Optional[Any] = None
    requiredValue: Optional[Any] = None
    restartEnumeration: Optional[bool] = Field(
        None,
        description='Whether to restart the enumeration of the questions. Defaults to false.',
    )
    secondaryText: Optional[Any] = None
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['textOnly']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[Any] = None


warnings.filterwarnings("ignore", module="pydantic")


class UIConfig(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. Defaults to true.',
    )
    autoDownloadStudy: Optional[bool] = Field(
        None,
        description='Controls whether the study data is automatically downloaded at the end of the study.',
    )
    autoDownloadTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before automatically downloading the study data.',
    )
    contactEmail: str = Field(
        ...,
        description='The email address that used during the study if a participant clicks contact.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None, description='The location of the instructions.'
    )
    logoPath: str = Field(
        ...,
        description='The path to the logo image. This is displayed on the landing page and the header.',
    )
    minHeightSize: Optional[float] = Field(
        None, description='The minimum screen height size for the study'
    )
    minWidthSize: Optional[float] = Field(
        None, description='The minimum screen width size for the study'
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None, description='The location of the next button.'
    )
    nextButtonText: Optional[str] = Field(
        None, description='The text to display on the next button.'
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. Defaults to false.',
    )
    numSequences: Optional[float] = Field(
        None,
        description='The number of sequences to generate for the study. This is used to generate the random sequences for the study. Defaults to 1000.',
    )
    participantNameField: Optional[str] = Field(
        None,
        description="The default name field for a participant. Directs revisit to use the task and response id as a name in UI elements. For example, if you wanted the response 'prolificId' from the task 'introduction' to be the name, this field would be 'introduction.prolificId'",
    )
    previousButtonText: Optional[str] = Field(
        None, description='The text that is displayed on the previous button.'
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. Defaults to false.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If true, will record audio on all components unless deactivated on individual components. Defaults to false.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If true, will record audio on all components unless deactivated on individual components. This must be set to true if you want to record audio on any component in your study. Defaults to false. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before any component that you want to record the screen on to ensure permissions are granted and screen capture has started.",
    )
    recordScreenFPS: Optional[float] = Field(
        None,
        description="Desired fps for recording screen. If possible, this value will be used, but if it's not possible, the user agent will use the closest possible match.",
    )
    responseDividers: Optional[bool] = Field(
        None, description='Whether to show the response dividers. Defaults to false.'
    )
    showTitle: Optional[bool] = Field(
        None, description='Controls whether the title should be hidden in the study.'
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study.',
    )
    sidebarWidth: Optional[float] = Field(
        None, description='The width of the left sidebar. Defaults to 300.'
    )
    studyEndMsg: Optional[str] = Field(
        None, description='The message to display when the study ends.'
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    timeoutReject: Optional[bool] = Field(
        None,
        description='Whether to redirect a timed out participant to a rejection page. This only works for components where the `nextButtonDisableTime` field is set.',
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. The next button will be disabled until either the correct answer is given or the number of attempts is reached. When the number of attempts is reached, if the answer is incorrect still, the correct value will be shown to the participant. The default value is 2. Providing a value of -1 will allow infinite attempts and the participant must enter the correct answer to continue, and reVISit will not show the correct answer to the user.',
    )
    urlParticipantIdParam: Optional[str] = Field(
        None,
        description='If the participant ID is passed in the URL, this is the name of the querystring parameter that is used to capture the participant ID (e.g. PROLIFIC_ID). This will allow a user to continue a study on different devices and browsers.',
    )
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. Defaults to 100. E.g 100 here means 1000ms / 100ms = 10 times a second, 200 here means 1000ms / 200ms = 5 times per second',
    )
    withProgressBar: bool = Field(
        ..., description='Controls whether the progress bar is rendered in the study.'
    )
    withSidebar: bool = Field(
        ...,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question.",
    )  # End of class


class UIConfigType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. Defaults to true.',
    )
    autoDownloadStudy: Optional[bool] = Field(
        None,
        description='Controls whether the study data is automatically downloaded at the end of the study.',
    )
    autoDownloadTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before automatically downloading the study data.',
    )
    contactEmail: str = Field(
        ...,
        description='The email address that used during the study if a participant clicks contact.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None, description='The location of the instructions.'
    )
    logoPath: str = Field(
        ...,
        description='The path to the logo image. This is displayed on the landing page and the header.',
    )
    minHeightSize: Optional[float] = Field(
        None, description='The minimum screen height size for the study'
    )
    minWidthSize: Optional[float] = Field(
        None, description='The minimum screen width size for the study'
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None, description='The location of the next button.'
    )
    nextButtonText: Optional[str] = Field(
        None, description='The text to display on the next button.'
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. Defaults to false.',
    )
    numSequences: Optional[float] = Field(
        None,
        description='The number of sequences to generate for the study. This is used to generate the random sequences for the study. Defaults to 1000.',
    )
    participantNameField: Optional[str] = Field(
        None,
        description="The default name field for a participant. Directs revisit to use the task and response id as a name in UI elements. For example, if you wanted the response 'prolificId' from the task 'introduction' to be the name, this field would be 'introduction.prolificId'",
    )
    previousButtonText: Optional[str] = Field(
        None, description='The text that is displayed on the previous button.'
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. Defaults to false.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If true, will record audio on all components unless deactivated on individual components. Defaults to false.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If true, will record audio on all components unless deactivated on individual components. This must be set to true if you want to record audio on any component in your study. Defaults to false. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before any component that you want to record the screen on to ensure permissions are granted and screen capture has started.",
    )
    recordScreenFPS: Optional[float] = Field(
        None,
        description="Desired fps for recording screen. If possible, this value will be used, but if it's not possible, the user agent will use the closest possible match.",
    )
    responseDividers: Optional[bool] = Field(
        None, description='Whether to show the response dividers. Defaults to false.'
    )
    showTitle: Optional[bool] = Field(
        None, description='Controls whether the title should be hidden in the study.'
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study.',
    )
    sidebarWidth: Optional[float] = Field(
        None, description='The width of the left sidebar. Defaults to 300.'
    )
    studyEndMsg: Optional[str] = Field(
        None, description='The message to display when the study ends.'
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    timeoutReject: Optional[bool] = Field(
        None,
        description='Whether to redirect a timed out participant to a rejection page. This only works for components where the `nextButtonDisableTime` field is set.',
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. The next button will be disabled until either the correct answer is given or the number of attempts is reached. When the number of attempts is reached, if the answer is incorrect still, the correct value will be shown to the participant. The default value is 2. Providing a value of -1 will allow infinite attempts and the participant must enter the correct answer to continue, and reVISit will not show the correct answer to the user.',
    )
    urlParticipantIdParam: Optional[str] = Field(
        None,
        description='If the participant ID is passed in the URL, this is the name of the querystring parameter that is used to capture the participant ID (e.g. PROLIFIC_ID). This will allow a user to continue a study on different devices and browsers.',
    )
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. Defaults to 100. E.g 100 here means 1000ms / 100ms = 10 times a second, 200 here means 1000ms / 200ms = 5 times per second',
    )
    withProgressBar: bool = Field(
        ..., description='Controls whether the progress bar is rendered in the study.'
    )
    withSidebar: bool = Field(
        ...,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question.",
    )


warnings.filterwarnings("ignore", module="pydantic")


class ButtonsResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    optionOrder: Optional[OptionOrder] = Field(
        None,
        description='The order in which the buttons are displayed. Defaults to fixed.',
    )
    options: List[Union[StringOption, str]]
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['buttons']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class ButtonsResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    optionOrder: Optional[OptionOrder] = Field(
        None,
        description='The order in which the buttons are displayed. Defaults to fixed.',
    )
    options: List[Union[StringOption, str]]
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['buttons']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class CheckboxResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    horizontal: Optional[bool] = Field(
        None,
        description='Whether to render the checkboxes horizontally. Defaults to false, so they render horizontally.',
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    maxSelections: Optional[float] = Field(
        None, description='The maximum number of selections that are required.'
    )
    minSelections: Optional[float] = Field(
        None, description='The minimum number of selections that are required.'
    )
    optionOrder: Optional[OptionOrder] = Field(
        None,
        description='The order in which the checkboxes are displayed. Defaults to fixed.',
    )
    options: List[Union[StringOption, str]] = Field(
        ...,
        description='The options that are displayed as checkboxes, provided as an array of objects, with label and value fields.',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['checkbox']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )
    withOther: Optional[bool] = Field(
        None, description='Whether to render the checkboxes with an "other" option.'
    )  # End of class


class CheckboxResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    horizontal: Optional[bool] = Field(
        None,
        description='Whether to render the checkboxes horizontally. Defaults to false, so they render horizontally.',
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    maxSelections: Optional[float] = Field(
        None, description='The maximum number of selections that are required.'
    )
    minSelections: Optional[float] = Field(
        None, description='The minimum number of selections that are required.'
    )
    optionOrder: Optional[OptionOrder] = Field(
        None,
        description='The order in which the checkboxes are displayed. Defaults to fixed.',
    )
    options: List[Union[StringOption, str]] = Field(
        ...,
        description='The options that are displayed as checkboxes, provided as an array of objects, with label and value fields.',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['checkbox']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )
    withOther: Optional[bool] = Field(
        None, description='Whether to render the checkboxes with an "other" option.'
    )


warnings.filterwarnings("ignore", module="pydantic")


class DropdownResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    options: List[Union[StringOption, str]] = Field(
        ..., description='The options that are displayed in the dropdown.'
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    placeholder: Optional[str] = Field(
        None, description='The placeholder text that is displayed in the input.'
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['dropdown']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class DropdownResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    options: List[Union[StringOption, str]] = Field(
        ..., description='The options that are displayed in the dropdown.'
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    placeholder: Optional[str] = Field(
        None, description='The placeholder text that is displayed in the input.'
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['dropdown']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


class InterruptionBlock(
    RootModel[Union[DeterministicInterruption, RandomInterruption]]
):
    root: Union[DeterministicInterruption, RandomInterruption] = Field(
        ...,
        description='The InterruptionBlock interface is used to define interruptions in a block. These can be used for breaks or attention checks. Interruptions can be deterministic or random.',
    )


# End of class


class InterruptionBlockType(TypedDict):
    root: Union[DeterministicInterruption, RandomInterruption] = Field(
        ...,
        description='The InterruptionBlock interface is used to define interruptions in a block. These can be used for breaks or attention checks. Interruptions can be deterministic or random.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class LikertResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    leftLabel: Optional[str] = Field(
        None, description='The left label of the likert scale. E.g Strongly Disagree'
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    numItems: float = Field(..., description='The number of options to render.')
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    rightLabel: Optional[str] = Field(
        None, description='The right label of the likert scale. E.g Strongly Agree'
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    spacing: Optional[float] = Field(
        None, description='The spacing between the options. Defaults to 1.'
    )
    start: Optional[float] = Field(
        None, description='The starting value of the likert scale. Defaults to 1.'
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['likert']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class LikertResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    leftLabel: Optional[str] = Field(
        None, description='The left label of the likert scale. E.g Strongly Disagree'
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    numItems: float = Field(..., description='The number of options to render.')
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    rightLabel: Optional[str] = Field(
        None, description='The right label of the likert scale. E.g Strongly Agree'
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    spacing: Optional[float] = Field(
        None, description='The spacing between the options. Defaults to 1.'
    )
    start: Optional[float] = Field(
        None, description='The starting value of the likert scale. Defaults to 1.'
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['likert']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class LongTextResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    placeholder: Optional[str] = Field(
        None, description='The placeholder text that is displayed in the input.'
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['longText']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class LongTextResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    placeholder: Optional[str] = Field(
        None, description='The placeholder text that is displayed in the input.'
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['longText']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class MatrixResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    answerOptions: Union[List[str], str] = Field(
        ...,
        description='The answer options (columns). We provide some shortcuts for a likelihood scale (ranging from highly unlikely to highly likely) and a satisfaction scale (ranging from highly unsatisfied to highly satisfied) with either 5 or 7 options to choose from.',
    )
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    questionOptions: List[str] = Field(
        ...,
        description="The question options (rows) are the prompts for each response you'd like to record.",
    )
    questionOrder: Optional[QuestionOrder] = Field(
        None,
        description='The order in which the questions are displayed. Defaults to fixed.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Type2
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class MatrixResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    answerOptions: Union[List[str], str] = Field(
        ...,
        description='The answer options (columns). We provide some shortcuts for a likelihood scale (ranging from highly unlikely to highly likely) and a satisfaction scale (ranging from highly unsatisfied to highly satisfied) with either 5 or 7 options to choose from.',
    )
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    questionOptions: List[str] = Field(
        ...,
        description="The question options (rows) are the prompts for each response you'd like to record.",
    )
    questionOrder: Optional[QuestionOrder] = Field(
        None,
        description='The order in which the questions are displayed. Defaults to fixed.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Type2
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class NumericalResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    max: Optional[float] = Field(
        None, description='The maximum value that is accepted in the input.'
    )
    min: Optional[float] = Field(
        None, description='The minimum value that is accepted in the input.'
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    placeholder: Optional[str] = Field(
        None, description='The placeholder text that is displayed in the input.'
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['numerical']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class NumericalResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    max: Optional[float] = Field(
        None, description='The maximum value that is accepted in the input.'
    )
    min: Optional[float] = Field(
        None, description='The minimum value that is accepted in the input.'
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    placeholder: Optional[str] = Field(
        None, description='The placeholder text that is displayed in the input.'
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['numerical']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class RadioResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    horizontal: Optional[bool] = Field(
        None,
        description='Whether to render the radio buttons horizontally. Defaults to false, so they render horizontally.',
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    leftLabel: Optional[str] = Field(
        None,
        description='The left label of the radio group. Used in Likert scales for example',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    optionOrder: Optional[OptionOrder] = Field(
        None,
        description='The order in which the radio buttons are displayed. Defaults to fixed.',
    )
    options: List[Union[StringOption, str]] = Field(
        ...,
        description='The options that are displayed as checkboxes, provided as an array of objects, with label and value fields.',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    rightLabel: Optional[str] = Field(
        None,
        description='The right label of the radio group. Used in Likert scales for example',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['radio']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )
    withOther: Optional[bool] = Field(
        None, description='Whether to render the radios with an "other" option.'
    )  # End of class


class RadioResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    horizontal: Optional[bool] = Field(
        None,
        description='Whether to render the radio buttons horizontally. Defaults to false, so they render horizontally.',
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    leftLabel: Optional[str] = Field(
        None,
        description='The left label of the radio group. Used in Likert scales for example',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    optionOrder: Optional[OptionOrder] = Field(
        None,
        description='The order in which the radio buttons are displayed. Defaults to fixed.',
    )
    options: List[Union[StringOption, str]] = Field(
        ...,
        description='The options that are displayed as checkboxes, provided as an array of objects, with label and value fields.',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    rightLabel: Optional[str] = Field(
        None,
        description='The right label of the radio group. Used in Likert scales for example',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['radio']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )
    withOther: Optional[bool] = Field(
        None, description='Whether to render the radios with an "other" option.'
    )


warnings.filterwarnings("ignore", module="pydantic")


class ReactiveResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['reactive']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class ReactiveResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['reactive']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class ShortTextResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    placeholder: Optional[str] = Field(
        None, description='The placeholder text that is displayed in the input.'
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['shortText']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class ShortTextResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    placeholder: Optional[str] = Field(
        None, description='The placeholder text that is displayed in the input.'
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    type: Literal['shortText']
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class SliderResponse(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    options: List[NumberOption] = Field(
        ...,
        description='This defines the steps in the slider and the extent of the slider as an array of objects that have a label and a value.',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    smeqStyle: Optional[bool] = Field(
        None,
        description='Whether to render the slider with a SMEQ style. Defaults to false.',
    )
    snap: Optional[bool] = Field(
        None,
        description='Whether the slider should snap between values. Defaults to false. Slider snapping disables the label above the handle.',
    )
    spacing: Optional[float] = Field(
        None,
        description='The spacing between the ticks. If not provided, the spacing is calculated as the range of the slider divided by power of 10.',
    )
    startingValue: Optional[float] = Field(
        None,
        description='The starting value of the slider. Defaults to the minimum value.',
    )
    step: Optional[float] = Field(
        None,
        description='The step value of the slider. If not provided (and snap not enabled), the step value is calculated as the range of the slider divided by 100.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    tlxStyle: Optional[bool] = Field(
        None,
        description='Whether to render the slider with a NASA-tlx style. Defaults to false.',
    )
    type: Literal['slider']
    withBar: Optional[bool] = Field(
        None,
        description='Whether to render the slider with a bar to the left. Defaults to true.',
    )
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )  # End of class


class SliderResponseType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    hidden: Optional[bool] = Field(
        None, description='Controls whether the response is hidden.'
    )
    id: str = Field(
        ...,
        description='The id of the response. This is used to identify the response in the data file.',
    )
    location: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='Controls the response location. These might be the same for all responses, or differ across responses. Defaults to `belowStimulus`',
    )
    options: List[NumberOption] = Field(
        ...,
        description='This defines the steps in the slider and the extent of the slider as an array of objects that have a label and a value.',
    )
    paramCapture: Optional[str] = Field(
        None,
        description='Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.',
    )
    prompt: str = Field(
        ...,
        description='The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.',
    )
    required: Optional[bool] = Field(
        None,
        description='Controls whether the response is required to be answered. Defaults to true.',
    )
    requiredLabel: Optional[str] = Field(
        None,
        description='You can provide a required label, which makes it so a participant has to answer with a response that matches label.',
    )
    requiredValue: Optional[Any] = Field(
        None,
        description='You can provide a required value, which makes it so a participant has to answer with that value.',
    )
    secondaryText: Optional[str] = Field(
        None,
        description='The secondary text that is displayed to the participant under the prompt. This does not accept markdown.',
    )
    smeqStyle: Optional[bool] = Field(
        None,
        description='Whether to render the slider with a SMEQ style. Defaults to false.',
    )
    snap: Optional[bool] = Field(
        None,
        description='Whether the slider should snap between values. Defaults to false. Slider snapping disables the label above the handle.',
    )
    spacing: Optional[float] = Field(
        None,
        description='The spacing between the ticks. If not provided, the spacing is calculated as the range of the slider divided by power of 10.',
    )
    startingValue: Optional[float] = Field(
        None,
        description='The starting value of the slider. Defaults to the minimum value.',
    )
    step: Optional[float] = Field(
        None,
        description='The step value of the slider. If not provided (and snap not enabled), the step value is calculated as the range of the slider divided by 100.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    tlxStyle: Optional[bool] = Field(
        None,
        description='Whether to render the slider with a NASA-tlx style. Defaults to false.',
    )
    type: Literal['slider']
    withBar: Optional[bool] = Field(
        None,
        description='Whether to render the slider with a bar to the left. Defaults to true.',
    )
    withDivider: Optional[bool] = Field(
        None,
        description='Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.',
    )
    withDontKnow: Optional[bool] = Field(
        None,
        description='Renders the response with an option for "I don\'t know". This counts as a completed answer for the validation.',
    )


warnings.filterwarnings("ignore", module="pydantic")


class ComponentBlock(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    components: List[Union[str, ComponentBlock, DynamicBlock]] = Field(
        ..., description='The components that are included in the order.'
    )
    id: Optional[str] = Field(
        None,
        description='The id of the block. This is used to identify the block in the SkipConditions and is only required if you want to refer to the whole block in the condition.to property.',
    )
    interruptions: Optional[List[InterruptionBlock]] = Field(
        None,
        description='The interruptions property specifies an array of interruptions. These can be used for breaks or attention checks.',
    )
    numSamples: Optional[float] = Field(
        None,
        description='The number of samples to use for the random assignments. This means you can randomize across 3 components while only showing a participant 2 at a time.',
    )
    order: Order = Field(
        ...,
        description='The type of order. This can be random (pure random), latinSquare (random with some guarantees), or fixed.',
    )
    skip: Optional[SkipConditions] = Field(
        None, description='The skip conditions for the block.'
    )  # End of class


class ComponentBlockType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    components: List[Union[str, ComponentBlock, DynamicBlock]] = Field(
        ..., description='The components that are included in the order.'
    )
    id: Optional[str] = Field(
        None,
        description='The id of the block. This is used to identify the block in the SkipConditions and is only required if you want to refer to the whole block in the condition.to property.',
    )
    interruptions: Optional[List[InterruptionBlock]] = Field(
        None,
        description='The interruptions property specifies an array of interruptions. These can be used for breaks or attention checks.',
    )
    numSamples: Optional[float] = Field(
        None,
        description='The number of samples to use for the random assignments. This means you can randomize across 3 components while only showing a participant 2 at a time.',
    )
    order: Order = Field(
        ...,
        description='The type of order. This can be random (pure random), latinSquare (random with some guarantees), or fixed.',
    )
    skip: Optional[SkipConditions] = Field(
        None, description='The skip conditions for the block.'
    )


class Response(
    RootModel[
        Union[
            NumericalResponse,
            ShortTextResponse,
            LongTextResponse,
            LikertResponse,
            DropdownResponse,
            SliderResponse,
            RadioResponse,
            CheckboxResponse,
            ReactiveResponse,
            MatrixResponse,
            ButtonsResponse,
            TextOnlyResponse,
        ]
    ]
):
    root: Union[
        NumericalResponse,
        ShortTextResponse,
        LongTextResponse,
        LikertResponse,
        DropdownResponse,
        SliderResponse,
        RadioResponse,
        CheckboxResponse,
        ReactiveResponse,
        MatrixResponse,
        ButtonsResponse,
        TextOnlyResponse,
    ]


# End of class


class ResponseType(TypedDict):
    root: Union[
        NumericalResponse,
        ShortTextResponse,
        LongTextResponse,
        LikertResponse,
        DropdownResponse,
        SliderResponse,
        RadioResponse,
        CheckboxResponse,
        ReactiveResponse,
        MatrixResponse,
        ButtonsResponse,
        TextOnlyResponse,
    ]


warnings.filterwarnings("ignore", module="pydantic")


class VegaComponentConfig(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    config: Dict[str, Any] = Field(
        ..., description='The vega or vega-lite configuration.'
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['vega']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withActions: Optional[bool] = Field(
        None, description='Whether to include vega actions. Defaults to true.'
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )  # End of class


class VegaComponentConfigType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    config: Dict[str, Any] = Field(
        ..., description='The vega or vega-lite configuration.'
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['vega']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withActions: Optional[bool] = Field(
        None, description='Whether to include vega actions. Defaults to true.'
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )


warnings.filterwarnings("ignore", module="pydantic")


class VegaComponentPath(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    path: str = Field(
        ...,
        description='The path to the vega file. This should be a relative path from the public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['vega']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withActions: Optional[bool] = Field(
        None, description='Whether to include vega actions. Defaults to true.'
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )  # End of class


class VegaComponentPathType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    path: str = Field(
        ...,
        description='The path to the vega file. This should be a relative path from the public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['vega']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withActions: Optional[bool] = Field(
        None, description='Whether to include vega actions. Defaults to true.'
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )


warnings.filterwarnings("ignore", module="pydantic")


class VideoComponent(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    forceCompletion: Optional[bool] = Field(
        None,
        description='Whether to force the video to play until the end. Defaults to true.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    path: str = Field(
        ...,
        description='The path to the video. This could be a relative path from the public folder or might be a url to an external website.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['video']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )
    withTimeline: Optional[bool] = Field(
        None, description='Whether to show the video timeline. Defaults to false.'
    )  # End of class


class VideoComponentType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    forceCompletion: Optional[bool] = Field(
        None,
        description='Whether to force the video to play until the end. Defaults to true.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    path: str = Field(
        ...,
        description='The path to the video. This could be a relative path from the public folder or might be a url to an external website.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['video']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )
    withTimeline: Optional[bool] = Field(
        None, description='Whether to show the video timeline. Defaults to false.'
    )


warnings.filterwarnings("ignore", module="pydantic")


class WebsiteComponent(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the website (iframe). These can be used within your website to render different things.',
    )
    path: str = Field(
        ...,
        description='The path to the website. This should be a relative path from the public folder or could be an external website.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['website']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )  # End of class


class WebsiteComponentType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the website (iframe). These can be used within your website to render different things.',
    )
    path: str = Field(
        ...,
        description='The path to the website. This should be a relative path from the public folder or could be an external website.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['website']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )


warnings.filterwarnings("ignore", module="pydantic")


class BaseComponents1(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    config: Optional[Dict[str, Any]] = Field(
        None, description='The vega or vega-lite configuration.'
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    forceCompletion: Optional[bool] = Field(
        None,
        description='Whether to force the video to play until the end. Defaults to true.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the react component. These can be used within your react component to render different things.',
    )
    path: Optional[str] = Field(
        None,
        description='The path to the markdown file. This should be a relative path from the public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: Optional[List[Response]] = Field(
        None, description='The responses to the component'
    )
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Optional[Type] = None
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withActions: Optional[bool] = Field(
        None, description='Whether to include vega actions. Defaults to true.'
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )
    withTimeline: Optional[bool] = Field(
        None, description='Whether to show the video timeline. Defaults to false.'
    )  # End of class


class BaseComponents1Type(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    config: Optional[Dict[str, Any]] = Field(
        None, description='The vega or vega-lite configuration.'
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    forceCompletion: Optional[bool] = Field(
        None,
        description='Whether to force the video to play until the end. Defaults to true.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the react component. These can be used within your react component to render different things.',
    )
    path: Optional[str] = Field(
        None,
        description='The path to the markdown file. This should be a relative path from the public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: Optional[List[Response]] = Field(
        None, description='The responses to the component'
    )
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Optional[Type] = None
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withActions: Optional[bool] = Field(
        None, description='Whether to include vega actions. Defaults to true.'
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )
    withTimeline: Optional[bool] = Field(
        None, description='Whether to show the video timeline. Defaults to false.'
    )


class BaseComponents(RootModel[Optional[Dict[str, BaseComponents1]]]):
    root: Optional[Dict[str, BaseComponents1]] = None


# End of class


class BaseComponentsType(TypedDict):
    root: Optional[Dict[str, BaseComponents1]] = None


warnings.filterwarnings("ignore", module="pydantic")


class ImageComponent(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    path: str = Field(
        ...,
        description='The path to the image. This could be a relative path from the public folder or a url to an external image.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['image']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )  # End of class


class ImageComponentType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    path: str = Field(
        ...,
        description='The path to the image. This could be a relative path from the public folder or a url to an external image.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['image']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )


warnings.filterwarnings("ignore", module="pydantic")


class InheritedComponent(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    baseComponent: str
    config: Optional[Dict[str, Any]] = Field(
        None, description='The vega or vega-lite configuration.'
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    forceCompletion: Optional[bool] = Field(
        None,
        description='Whether to force the video to play until the end. Defaults to true.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the react component. These can be used within your react component to render different things.',
    )
    path: Optional[str] = Field(
        None,
        description='The path to the markdown file. This should be a relative path from the public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: Optional[List[Response]] = Field(
        None, description='The responses to the component'
    )
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Optional[Type] = None
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withActions: Optional[bool] = Field(
        None, description='Whether to include vega actions. Defaults to true.'
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )
    withTimeline: Optional[bool] = Field(
        None, description='Whether to show the video timeline. Defaults to false.'
    )  # End of class


class InheritedComponentType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    baseComponent: str
    config: Optional[Dict[str, Any]] = Field(
        None, description='The vega or vega-lite configuration.'
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    forceCompletion: Optional[bool] = Field(
        None,
        description='Whether to force the video to play until the end. Defaults to true.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the react component. These can be used within your react component to render different things.',
    )
    path: Optional[str] = Field(
        None,
        description='The path to the markdown file. This should be a relative path from the public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: Optional[List[Response]] = Field(
        None, description='The responses to the component'
    )
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Optional[Type] = None
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withActions: Optional[bool] = Field(
        None, description='Whether to include vega actions. Defaults to true.'
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )
    withTimeline: Optional[bool] = Field(
        None, description='Whether to show the video timeline. Defaults to false.'
    )


warnings.filterwarnings("ignore", module="pydantic")


class MarkdownComponent(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    path: str = Field(
        ...,
        description='The path to the markdown file. This should be a relative path from the public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['markdown']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )  # End of class


class MarkdownComponentType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    path: str = Field(
        ...,
        description='The path to the markdown file. This should be a relative path from the public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['markdown']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )


warnings.filterwarnings("ignore", module="pydantic")


class QuestionnaireComponent(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['questionnaire']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )  # End of class


class QuestionnaireComponentType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['questionnaire']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )


warnings.filterwarnings("ignore", module="pydantic")


class ReactComponent(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the react component. These can be used within your react component to render different things.',
    )
    path: str = Field(
        ...,
        description='The path to the react component. This should be a relative path from the src/public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['react-component']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )  # End of class


class ReactComponentType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    allowFailedTraining: Optional[bool] = Field(
        None,
        description='Controls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.',
    )
    correctAnswer: Optional[List[Answer]] = Field(
        None,
        description='The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.',
    )
    description: Optional[str] = Field(
        None,
        description='The description of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    enumerateQuestions: Optional[bool] = Field(
        None,
        description='Whether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.',
    )
    helpTextPath: Optional[str] = Field(
        None,
        description='The path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.',
    )
    instruction: Optional[str] = Field(
        None,
        description='The instruction of the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    instructionLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the instructions. If present, will override the instruction location setting in the uiConfig.',
    )
    meta: Optional[Dict[str, Any]] = Field(
        None,
        description='The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.',
    )
    nextButtonDisableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.',
    )
    nextButtonEnableTime: Optional[float] = Field(
        None,
        description='The time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.',
    )
    nextButtonLocation: Optional[ConfigResponseBlockLocation] = Field(
        None,
        description='The location of the next button. If present, will override the  next button location setting in the uiConfig.',
    )
    nextButtonText: Optional[str] = Field(
        None,
        description='The text to display on the next button. If present, will override the next button text setting in the uiConfig.',
    )
    nextOnEnter: Optional[bool] = Field(
        None,
        description='Whether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.',
    )
    parameters: Optional[Dict[str, Any]] = Field(
        None,
        description='The parameters that are passed to the react component. These can be used within your react component to render different things.',
    )
    path: str = Field(
        ...,
        description='The path to the react component. This should be a relative path from the src/public folder.',
    )
    previousButton: Optional[bool] = Field(
        None,
        description='Whether to show the previous button. If present, will override the previous button setting in the uiConfig.',
    )
    previousButtonText: Optional[str] = Field(
        None,
        description='The text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.',
    )
    provideFeedback: Optional[bool] = Field(
        None,
        description='Controls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.',
    )
    recordAudio: Optional[bool] = Field(
        None,
        description='Whether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.',
    )
    recordScreen: Optional[bool] = Field(
        None,
        description="Whether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.",
    )
    response: List[Response] = Field(..., description='The responses to the component')
    responseDividers: Optional[bool] = Field(
        None,
        description='Whether to show the response dividers. If present, will override the response dividers setting in the uiConfig.',
    )
    responseOrder: Optional[ResponseOrder] = Field(
        None, description="The order of the responses. Defaults to 'fixed'."
    )
    showTitle: Optional[bool] = Field(
        None,
        description='Controls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.',
    )
    showTitleBar: Optional[bool] = Field(
        None,
        description='Controls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.',
    )
    sidebarWidth: Optional[float] = Field(
        None,
        description='The width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.',
    )
    style: Optional[Styles] = Field(
        None,
        description='You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}',
    )
    stylesheetPath: Optional[str] = Field(
        None, description='The path to the external stylesheet file.'
    )
    trainingAttempts: Optional[float] = Field(
        None,
        description='The number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.',
    )
    type: Literal['react-component']
    windowEventDebounceTime: Optional[float] = Field(
        None,
        description='Debounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.',
    )
    withProgressBar: Optional[bool] = Field(
        None,
        description='Controls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.',
    )
    withSidebar: Optional[bool] = Field(
        None,
        description="Controls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.",
    )


class VegaComponent(RootModel[Union[VegaComponentPath, VegaComponentConfig]]):
    root: Union[VegaComponentPath, VegaComponentConfig]


# End of class


class VegaComponentType(TypedDict):
    root: Union[VegaComponentPath, VegaComponentConfig]


class IndividualComponent(
    RootModel[
        Union[
            MarkdownComponent,
            ReactComponent,
            ImageComponent,
            WebsiteComponent,
            QuestionnaireComponent,
            VegaComponent,
            VideoComponent,
        ]
    ]
):
    root: Union[
        MarkdownComponent,
        ReactComponent,
        ImageComponent,
        WebsiteComponent,
        QuestionnaireComponent,
        VegaComponent,
        VideoComponent,
    ]


# End of class


class IndividualComponentType(TypedDict):
    root: Union[
        MarkdownComponent,
        ReactComponent,
        ImageComponent,
        WebsiteComponent,
        QuestionnaireComponent,
        VegaComponent,
        VideoComponent,
    ]


warnings.filterwarnings("ignore", module="pydantic")


class StudyConfig(BaseModel):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    schema: str = Field(
        ...,
        alias='$schema',
        description="A required json schema property. This should point to the github link for the version of the schema you would like. The `$schema` line is used to verify the schema. If you're using VSCode (or other similar IDEs), including this line will allow for autocomplete and helpful suggestions when writing the study configuration. See examples for more information",
    )
    baseComponents: Optional[BaseComponents] = Field(
        None,
        description='The base components that are used in the study. These components can be used to template other components. See [BaseComponents](../../type-aliases/BaseComponents) for more information.',
    )
    components: Dict[str, Union[IndividualComponent, InheritedComponent]] = Field(
        ...,
        description='The components that are used in the study. They must be fully defined here with all properties. Some properties may be inherited from baseComponents.',
    )
    importedLibraries: Optional[List[str]] = Field(
        None,
        description='A list of libraries that are used in the study. This is used to import external libraries into the study. Library names are valid namespaces to be used later.',
    )
    sequence: Union[ComponentBlock, DynamicBlock] = Field(
        ...,
        description='The order of the components in the study. This might include some randomness.',
    )
    studyMetadata: StudyMetadata = Field(
        ...,
        description='The metadata for the study. This is used to identify the study and version in the data file.',
    )
    uiConfig: UIConfig = Field(
        ...,
        description='The UI configuration for the study. This is used to configure the UI of the app.',
    )  # End of class


class StudyConfigType(TypedDict):
    model_config = ConfigDict(extra='forbid', populate_by_name=True)
    schema: str = Field(
        ...,
        alias='$schema',
        description="A required json schema property. This should point to the github link for the version of the schema you would like. The `$schema` line is used to verify the schema. If you're using VSCode (or other similar IDEs), including this line will allow for autocomplete and helpful suggestions when writing the study configuration. See examples for more information",
    )
    baseComponents: Optional[BaseComponents] = Field(
        None,
        description='The base components that are used in the study. These components can be used to template other components. See [BaseComponents](../../type-aliases/BaseComponents) for more information.',
    )
    components: Dict[str, Union[IndividualComponent, InheritedComponent]] = Field(
        ...,
        description='The components that are used in the study. They must be fully defined here with all properties. Some properties may be inherited from baseComponents.',
    )
    importedLibraries: Optional[List[str]] = Field(
        None,
        description='A list of libraries that are used in the study. This is used to import external libraries into the study. Library names are valid namespaces to be used later.',
    )
    sequence: Union[ComponentBlock, DynamicBlock] = Field(
        ...,
        description='The order of the components in the study. This might include some randomness.',
    )
    studyMetadata: StudyMetadata = Field(
        ...,
        description='The metadata for the study. This is used to identify the study and version in the data file.',
    )
    uiConfig: UIConfig = Field(
        ...,
        description='The UI configuration for the study. This is used to configure the UI of the app.',
    )


class Model(RootModel[StudyConfig]):
    root: StudyConfig


# End of class


class ModelType(TypedDict):
    root: StudyConfig


ComponentBlock.model_rebuild()
