vapi_client/models/
azure_voice.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AzureVoice {
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::AzureVoiceVoiceId,
24 #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
26 pub chunk_plan: Option<models::ChunkPlan>,
27 #[serde(rename = "speed", skip_serializing_if = "Option::is_none")]
29 pub speed: Option<f64>,
30 #[serde(rename = "fallbackPlan", skip_serializing_if = "Option::is_none")]
32 pub fallback_plan: Option<models::FallbackPlan>,
33}
34
35impl AzureVoice {
36 pub fn new(provider: ProviderTrue, voice_id: models::AzureVoiceVoiceId) -> AzureVoice {
37 AzureVoice {
38 caching_enabled: None,
39 provider,
40 voice_id,
41 chunk_plan: None,
42 speed: None,
43 fallback_plan: None,
44 }
45 }
46}
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
49pub enum ProviderTrue {
50 #[serde(rename = "azure")]
51 Azure,
52}
53
54impl Default for ProviderTrue {
55 fn default() -> ProviderTrue {
56 Self::Azure
57 }
58}