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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .step_run_output_rules_item import StepRunOutputRulesItem


class StepRunOutput(UncheckedBaseModel):
    """
    The output of the WorkflowStepRun. The shape of the output depends on the type of the WorkflowStep in the `step` field:
    * For `"EXTERNAL_DATA_VALIDATION"` steps - The output will be the same object that was returned by the external endpoint configured for this step
    * For `"RULE_VALIDATION"` steps - See the below shape:
    """

    rules: typing.Optional[typing.List[StepRunOutputRulesItem]] = 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
