# 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 .decision_node_definition import DecisionNodeDefinition
from .lang2fhir_create_definition import Lang2FhirCreateDefinition
from .lang2fhir_search_definition import Lang2FhirSearchDefinition
from .sub_workflow_definition import SubWorkflowDefinition


class StepOperation(UniversalBaseModel):
    search_definition: typing.Optional[Lang2FhirSearchDefinition] = None
    create_definition: typing.Optional[Lang2FhirCreateDefinition] = None
    workflow_definition: typing.Optional[SubWorkflowDefinition] = None
    decision_definition: typing.Optional[DecisionNodeDefinition] = 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
