vapi_client/models/
create_assistant_dto_voicemail_detection.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CreateAssistantDtoVoicemailDetection : These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.
15/// These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.
16#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17#[serde(untagged)]
18pub enum CreateAssistantDtoVoicemailDetection {
19    GoogleVoicemailDetectionPlan(Box<models::GoogleVoicemailDetectionPlan>),
20    OpenAiVoicemailDetectionPlan(Box<models::OpenAiVoicemailDetectionPlan>),
21    TwilioVoicemailDetectionPlan(Box<models::TwilioVoicemailDetectionPlan>),
22}
23
24impl Default for CreateAssistantDtoVoicemailDetection {
25    fn default() -> Self {
26        Self::GoogleVoicemailDetectionPlan(Default::default())
27    }
28}
29/// This is the provider to use for voicemail detection.
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Provider {
32    #[serde(rename = "twilio")]
33    Twilio,
34}
35
36impl Default for Provider {
37    fn default() -> Provider {
38        Self::Twilio
39    }
40}
41/// These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].  @default {Array} ['machine_end_beep', 'machine_end_silence']
42#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
43pub enum VoicemailDetectionTypes {
44    #[serde(rename = "machine_start")]
45    MachineStart,
46    #[serde(rename = "human")]
47    Human,
48    #[serde(rename = "fax")]
49    Fax,
50    #[serde(rename = "unknown")]
51    Unknown,
52    #[serde(rename = "machine_end_beep")]
53    MachineEndBeep,
54    #[serde(rename = "machine_end_silence")]
55    MachineEndSilence,
56    #[serde(rename = "machine_end_other")]
57    MachineEndOther,
58}
59
60impl Default for VoicemailDetectionTypes {
61    fn default() -> VoicemailDetectionTypes {
62        Self::MachineStart
63    }
64}
65