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

from ..core.pydantic_utilities import UniversalBaseModel
from .for_loop_block_yaml import ForLoopBlockYaml
import typing
from .proxy_location import ProxyLocation
from .workflow_definition_yaml import WorkflowDefinitionYaml
from .workflow_status import WorkflowStatus
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class WorkflowCreateYamlRequest(UniversalBaseModel):
    title: str
    description: typing.Optional[str] = None
    proxy_location: typing.Optional[ProxyLocation] = None
    webhook_callback_url: typing.Optional[str] = None
    totp_verification_url: typing.Optional[str] = None
    totp_identifier: typing.Optional[str] = None
    persist_browser_session: typing.Optional[bool] = None
    workflow_definition: WorkflowDefinitionYaml
    is_saved_task: typing.Optional[bool] = None
    status: typing.Optional[WorkflowStatus] = None

    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
