# 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_analysis_items_output import AgentAnalysisItemsOutput
from .agent_call_limits import AgentCallLimits
from .agent_testing_settings import AgentTestingSettings
from .agent_trust_context import AgentTrustContext
from .agent_workspace_overrides_output import AgentWorkspaceOverridesOutput
from .analysis_property import AnalysisProperty
from .analysis_scope import AnalysisScope
from .auth_settings import AuthSettings
from .conversation_initiation_client_data_config_output import ConversationInitiationClientDataConfigOutput
from .evaluation_settings_output import EvaluationSettingsOutput
from .guardrails_v_1_output import GuardrailsV1Output
from .llm import Llm
from .privacy_config_output import PrivacyConfigOutput
from .safety_response_model import SafetyResponseModel
from .sentiment_analysis_settings import SentimentAnalysisSettings
from .topic_discovery_settings import TopicDiscoverySettings
from .widget_config import WidgetConfig


class AgentPlatformSettingsResponseModel(UncheckedBaseModel):
    evaluation: typing.Optional[EvaluationSettingsOutput] = 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.
    """

    analysis_items: typing.Optional[AgentAnalysisItemsOutput] = pydantic.Field(default=None)
    """
    Evaluation + data-collection items attached by reference. None means the agent has not been migrated onto analysis items yet (distinct from an empty, migrated set); reads fall back to the legacy evaluation/data_collection fields in that case.
    """

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

    workspace_overrides: typing.Optional[AgentWorkspaceOverridesOutput] = 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[GuardrailsV1Output] = 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.
    """

    auto_translate_transcript_to_app_language: typing.Optional[bool] = pydantic.Field(default=None)
    """
    When enabled, a conversation transcript is automatically translated to the viewer's application language when they open the transcript page. If not set or false, transcripts are shown in their original language unless the viewer manually selects a translation.
    """

    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[PrivacyConfigOutput] = 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
    """

    sentiment_analysis: typing.Optional[SentimentAnalysisSettings] = pydantic.Field(default=None)
    """
    Per-agent post-call sentiment analysis configuration
    """

    safety: typing.Optional[SafetyResponseModel] = 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
