vapi_client/models/
fallback_tavus_voice.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct FallbackTavusVoice {
16 #[serde(rename = "cachingEnabled", skip_serializing_if = "Option::is_none")]
18 pub caching_enabled: Option<bool>,
19 #[serde(rename = "provider")]
21 pub provider: ProviderTrue,
22 #[serde(rename = "voiceId")]
23 pub voice_id: models::TavusVoiceVoiceId,
24 #[serde(rename = "personaId", skip_serializing_if = "Option::is_none")]
26 pub persona_id: Option<String>,
27 #[serde(rename = "callbackUrl", skip_serializing_if = "Option::is_none")]
29 pub callback_url: Option<String>,
30 #[serde(rename = "conversationName", skip_serializing_if = "Option::is_none")]
32 pub conversation_name: Option<String>,
33 #[serde(
35 rename = "conversationalContext",
36 skip_serializing_if = "Option::is_none"
37 )]
38 pub conversational_context: Option<String>,
39 #[serde(rename = "customGreeting", skip_serializing_if = "Option::is_none")]
41 pub custom_greeting: Option<String>,
42 #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
44 pub properties: Option<models::TavusConversationProperties>,
45 #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
47 pub chunk_plan: Option<models::ChunkPlan>,
48}
49
50impl FallbackTavusVoice {
51 pub fn new(provider: ProviderTrue, voice_id: models::TavusVoiceVoiceId) -> FallbackTavusVoice {
52 FallbackTavusVoice {
53 caching_enabled: None,
54 provider,
55 voice_id,
56 persona_id: None,
57 callback_url: None,
58 conversation_name: None,
59 conversational_context: None,
60 custom_greeting: None,
61 properties: None,
62 chunk_plan: None,
63 }
64 }
65}
66#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
68pub enum ProviderTrue {
69 #[serde(rename = "tavus")]
70 Tavus,
71}
72
73impl Default for ProviderTrue {
74 fn default() -> ProviderTrue {
75 Self::Tavus
76 }
77}