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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .block_input_block_config_item import BlockInputBlockConfigItem
from .dependency import Dependency
from .node_ui import NodeUi
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class BlockInput(UncheckedBaseModel):
    block_archetype_id: str
    block_config: typing.Optional[typing.List[BlockInputBlockConfigItem]] = None
    block_display_name: str
    block_id: str
    block_inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    block_is_output: typing.Optional[bool] = None
    dependencies: typing.Optional[typing.List[Dependency]] = None
    input_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    output_schema: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None
    ui: typing.Optional[NodeUi] = None
    trigger_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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
