# 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 .agent_call_limits import AgentCallLimits
from .agent_testing_settings import AgentTestingSettings
from .agent_trust_context import AgentTrustContext
from .agent_workspace_overrides_input import AgentWorkspaceOverridesInput
from .analysis_property import AnalysisProperty
from .analysis_scope import AnalysisScope
from .auth_settings import AuthSettings
from .conversation_initiation_client_data_config_input import ConversationInitiationClientDataConfigInput
from .evaluation_settings_input import EvaluationSettingsInput
from .guardrails_v_1_input import GuardrailsV1Input
from .llm import Llm
from .privacy_config_input import PrivacyConfigInput
from .topic_discovery_settings import TopicDiscoverySettings
from .widget_config import WidgetConfig


class AgentPlatformSettingsRequestModel(UncheckedBaseModel):
    evaluation: typing.Optional[EvaluationSettingsInput] = pydantic.Field(default=None)
    """
    Settings for evaluation
    """

    widget: typing.Optional[WidgetConfig] = pydantic.Field(default=None)
    """
    Configuration for the widget
    """

    data_collection: typing.Optional[typing.Dict[str, AnalysisProperty]] = pydantic.Field(default=None)
    """
    Data collection settings
    """

    data_collection_scopes: typing.Optional[typing.Dict[str, AnalysisScope]] = pydantic.Field(default=None)
    """
    Scope per data collection item ID. Missing keys default to conversation scope.
    """

    overrides: typing.Optional[ConversationInitiationClientDataConfigInput] = pydantic.Field(default=None)
    """
    Additional overrides for the agent during conversation initiation
    """

    workspace_overrides: typing.Optional[AgentWorkspaceOverridesInput] = pydantic.Field(default=None)
    """
    Workspace overrides for the agent
    """

    testing: typing.Optional[AgentTestingSettings] = pydantic.Field(default=None)
    """
    Testing configuration for the agent
    """

    archived: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether the agent is archived
    """

    guardrails: typing.Optional[GuardrailsV1Input] = pydantic.Field(default=None)
    """
    Guardrails configuration for the agent
    """

    summary_language: typing.Optional[str] = pydantic.Field(default=None)
    """
    Language for all conversation analysis outputs (summaries, titles, evaluation rationales, data collection rationales). If not set, the language will be inferred from the conversation. Must be one of the supported conversation languages.
    """

    auth: typing.Optional[AuthSettings] = pydantic.Field(default=None)
    """
    Settings for authentication
    """

    call_limits: typing.Optional[AgentCallLimits] = pydantic.Field(default=None)
    """
    Call limits for the agent
    """

    privacy: typing.Optional[PrivacyConfigInput] = pydantic.Field(default=None)
    """
    Privacy settings for the agent
    """

    trust_context: typing.Optional[AgentTrustContext] = pydantic.Field(default=None)
    """
    The trust context in which the agent operates.
    """

    analysis_llm: typing.Optional[Llm] = pydantic.Field(default=None)
    """
    Default LLM model for post-call analysis (evaluation and data collection)
    """

    topic_discovery: typing.Optional[TopicDiscoverySettings] = pydantic.Field(default=None)
    """
    Per-agent topic discovery configuration
    """

    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
