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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .block_state_updated_data_update_type import BlockStateUpdatedDataUpdateType
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class BlockStateUpdatedData(UncheckedBaseModel):
    workflow_id: str
    workflow_run_id: str
    block_id: typing.Optional[str] = None
    block_type: str = pydantic.Field()
    """
    The block archetype ID
    """

    update_data: typing.Dict[str, typing.Optional[typing.Any]]
    update_type: typing.Optional[BlockStateUpdatedDataUpdateType] = pydantic.Field(default=None)
    """
    If `complete` represents a full replacement of state, versus `partial` that indicates data must be _merged_.
    """

    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
