# 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 .reference_video import ReferenceVideo


class GenerationSourceContext(UncheckedBaseModel):
    source_type: typing.Optional[typing.Literal["generation"]] = None
    generation_id: str
    prompt: typing.Optional[str] = None
    model_id: str
    model_provider: typing.Optional[str] = None
    generation_session_id: typing.Optional[str] = None
    session_iteration_id: typing.Optional[str] = None
    model_parameters: typing.Optional[typing.Dict[str, typing.Any]] = None
    extend_video: typing.Optional[ReferenceVideo] = 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
