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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .input_text_action_data import InputTextActionData


class InputTextAction(UniversalBaseModel):
    """
    Input text action parameters.
    """

    selector: typing.Optional[str] = pydantic.Field(default=None)
    """
    CSS selector for the element
    """

    value: typing.Optional[str] = pydantic.Field(default=None)
    """
    Value to input
    """

    intention: typing.Optional[str] = pydantic.Field(default=None)
    """
    The intention or goal of the input
    """

    data: typing.Optional[InputTextActionData] = pydantic.Field(default=None)
    """
    Additional context data
    """

    totp_identifier: typing.Optional[str] = pydantic.Field(default=None)
    """
    TOTP identifier for input_text actions
    """

    totp_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    TOTP URL for input_text actions
    """

    timeout: typing.Optional[float] = pydantic.Field(default=None)
    """
    Timeout in milliseconds
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
