"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
import requests as requests_http
from ...models.components import agent as components_agent
from dataclasses_json import Undefined, dataclass_json
from typing import List, Optional, Union
from retellclient import utils


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class UpdateAgentRequestBody:
    llm_websocket_url: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('llm_websocket_url'), 'exclude': lambda f: f is None }})
    r"""The URL we will establish LLM websocket for getting response, usually your server."""
    enable_backchannel: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enable_backchannel'), 'exclude': lambda f: f is None }})
    r"""Controls whether the agent would backchannel (agent interjects the speaker with phrases like "yeah", "uh-huh" to signify interest and engagement)."""
    voice_temperature: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('voice_temperature'), 'exclude': lambda f: f is None }})
    r"""Controls how stable the voice is."""
    voice_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('voice_id'), 'exclude': lambda f: f is None }})
    r"""Unique voice id used for the agent. """
    agent_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('agent_name'), 'exclude': lambda f: f is None }})
    r"""Name of agent."""
    voice_temperature: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': {'letter_case': utils.get_field_name('voice_temperature'), 'exclude': lambda f: f is None}})
    r"""Controls how stable the voice is. Value ranging from [0,2]. Lower value means more stable, and higher value means more variant speech generation. Currently this setting only applies to 11labs voices. If unset, default value 1 will apply."""
    voice_speed: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': {'letter_case': utils.get_field_name('voice_speed'), 'exclude': lambda f: f is None}})
    r"""Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply."""
    responsiveness: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': {'letter_case': utils.get_field_name('responsiveness'), 'exclude': lambda f: f is None}})
    r"""Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply."""
    webhook_url: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': {'letter_case': utils.get_field_name('webhook_url'), 'exclude': lambda f: f is None}})
    r"""The webhook for agent to listen to call events. If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to string null to remove webhook url from this agent."""
    boosted_keywords: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': {'letter_case': utils.get_field_name('boosted_keywords'), 'exclude': lambda f: f is None}})
    r"""Provide a customized list of keywords to expand our models' vocabulary, aimed at improving performance and understanding within your specific context."""
    activate_hipaa_compliance: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('activate_hipaa_compliance'), 'exclude': lambda f: f is None }})
    r"""Disable transcripts and recordings storage for enhanced privacy. Access transcripts securely via webhooks"""
    format_text: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('format_text'), 'exclude': lambda f: f is None }})
    r"""Whether to format the text with inverse text normalization. It transforms the spoken form of text into written form for entities like phone number, email address, street address, etc. For example, "february fourth twenty twenty two" can be converted into "february 4th 2022". If not set, the default is true."""
    language: Optional[components_agent.Language] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('language'), 'exclude': lambda f: f is None }})
    r"""Beta feature, Language that agent operates in. This would decide the language agent transcribes audio to and synthesize audio into."""

@dataclasses.dataclass
class UpdateAgentRequest:
    agent_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'agent_id', 'style': 'simple', 'explode': False }})
    r"""Unique id of the agent to be updated."""
    request_body: UpdateAgentRequestBody = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }})


@dataclasses.dataclass
class UpdateAgentResponse:
    content_type: str = dataclasses.field()
    r"""HTTP response content type for this operation"""
    raw_response: requests_http.Response = dataclasses.field()
    r"""Raw HTTP response; suitable for custom response parsing"""
    status_code: int = dataclasses.field()
    r"""HTTP response status code for this operation"""
    agent: Optional[components_agent.Agent] = dataclasses.field(default=None)
    r"""Successfully registered the call"""
    

