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

import datetime as dt
import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .workflow_config import WorkflowConfig
from .workflow_response_graph import WorkflowResponseGraph


class WorkflowResponse(UniversalBaseModel):
    """
    Simplified workflow representation without implementation details
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unique identifier for the workflow
    """

    user_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the user who created the workflow
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Human-readable name for the workflow
    """

    workflow_instructions: typing.Optional[str] = pydantic.Field(default=None)
    """
    Natural language instructions that define the workflow logic
    """

    sample_data: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Sample data used for workflow graph generation
    """

    config: typing.Optional[WorkflowConfig] = None
    graph: typing.Optional[WorkflowResponseGraph] = None
    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Timestamp when the workflow was created
    """

    updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Timestamp when the workflow was last updated
    """

    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
