# 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 .conversation_config_client_override_input import ConversationConfigClientOverrideInput
from .conversation_initiation_source_info import ConversationInitiationSourceInfo
from .dynamic_variable_value_type_input import DynamicVariableValueTypeInput


class ConversationInitiationClientDataRequestInput(UncheckedBaseModel):
    conversation_config_override: typing.Optional[ConversationConfigClientOverrideInput] = None
    custom_llm_extra_body: typing.Optional[typing.Dict[str, typing.Any]] = None
    user_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the end user participating in this conversation (for agent owner's user identification)
    """

    source_info: typing.Optional[ConversationInitiationSourceInfo] = None
    branch_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the agent branch to use for this conversation
    """

    environment: typing.Optional[str] = pydantic.Field(default=None)
    """
    Environment to use for resolving environment variables
    """

    starting_workflow_node_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    If set, start the workflow at this node id instead of the default entry
    """

    dynamic_variables: typing.Optional[typing.Dict[str, typing.Optional[DynamicVariableValueTypeInput]]] = 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
