# 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 .rule_validation_next_entry_result import RuleValidationNextEntryResult


class RuleValidationNextEntry(UncheckedBaseModel):
    """
    A next entry for `RULE_VALIDATION` steps. Routes based on whether all validation rules passed.

    See the [Configuring Workflows via API guide](https://docs.extend.ai/2026-02-09/product/workflows/configuring-workflows-via-api) for end-to-end examples.
    """

    step: str = pydantic.Field()
    """
    The name of the target step.
    """

    result: RuleValidationNextEntryResult = pydantic.Field()
    """
    Routes based on whether all validation rules passed.
    """

    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
