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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from .parse_result import ParseResult
from .parse_step_run_step import ParseStepRunStep
from .step_run_base import StepRunBase


class ParseStepRun(StepRunBase):
    step: ParseStepRunStep
    result: typing.Optional[ParseResult] = pydantic.Field(default=None)
    """
    The result of this parse step. Currently, `result` is always present for returned step runs. It is nullable to allow for future support of returning step runs with non-successful statuses.
    """

    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


update_forward_refs(ParseStepRun)
