# 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 .step_operation import StepOperation
from .workflow_step_type import WorkflowStepType


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

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

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Detailed description of what the step does
    """

    type: typing.Optional[WorkflowStepType] = pydantic.Field(default=None)
    """
    Type of operation this step performs
    """

    operation: typing.Optional[StepOperation] = None
    provider_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Selected FHIR provider ID for this step
    """

    dependencies: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    IDs of steps this step depends on
    """

    dynamic_generation: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to use dynamic lang2fhir generation for this step
    """

    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
