# 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, UniversalBaseModel, update_forward_refs
from .output_parameter import OutputParameter
from .print_page_block_parameters_item import PrintPageBlockParametersItem


class PrintPageBlock(UniversalBaseModel):
    label: str = pydantic.Field()
    """
    Author-facing identifier for a block; unique within a workflow.
    """

    next_block_label: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
    """

    output_parameter: OutputParameter
    continue_on_failure: typing.Optional[bool] = None
    model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    disable_cache: typing.Optional[bool] = None
    next_loop_on_failure: typing.Optional[bool] = None
    include_timestamp: typing.Optional[bool] = None
    custom_filename: typing.Optional[str] = None
    format: typing.Optional[str] = None
    landscape: typing.Optional[bool] = None
    print_background: typing.Optional[bool] = None
    parameters: typing.Optional[typing.List[PrintPageBlockParametersItem]] = 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


from .context_parameter import ContextParameter  # noqa: E402, F401, I001

update_forward_refs(PrintPageBlock)
