vapi_client/models/
deepgram_voice.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DeepgramVoice {
17 #[serde(rename = "provider")]
19 pub provider: Provider,
20 #[serde(rename = "voiceId")]
21 pub voice_id: models::DeepgramVoiceVoiceId,
22 #[serde(rename = "mipOptOut", skip_serializing_if = "Option::is_none")]
24 pub mip_opt_out: Option<bool>,
25 #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
27 pub chunk_plan: Option<models::ChunkPlan>,
28 #[serde(rename = "fallbackPlan", skip_serializing_if = "Option::is_none")]
30 pub fallback_plan: Option<models::FallbackPlan>,
31}
32
33impl DeepgramVoice {
34 pub fn new(provider: Provider, voice_id: models::DeepgramVoiceVoiceId) -> DeepgramVoice {
35 DeepgramVoice {
36 provider,
37 voice_id,
38 mip_opt_out: None,
39 chunk_plan: None,
40 fallback_plan: None,
41 }
42 }
43}
44#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum Provider {
47 #[serde(rename = "deepgram")]
48 Deepgram,
49}
50
51impl Default for Provider {
52 fn default() -> Provider {
53 Self::Deepgram
54 }
55}