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