vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// 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.
/// 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.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateAssistantDtoVoicemailDetection {
    GoogleVoicemailDetectionPlan(models::GoogleVoicemailDetectionPlan),
    OpenAiVoicemailDetectionPlan(models::OpenAiVoicemailDetectionPlan),
    TwilioVoicemailDetectionPlan(models::TwilioVoicemailDetectionPlan),
    VapiVoicemailDetectionPlan(models::VapiVoicemailDetectionPlan),
}

impl Default for CreateAssistantDtoVoicemailDetection {
    fn default() -> Self {
        Self::GoogleVoicemailDetectionPlan(Default::default())
    }
}
/// This is the provider to use for voicemail detection.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderTrue {
    #[serde(rename = "vapi")]
    Vapi,
}

impl Default for ProviderTrue {
    fn default() -> ProviderTrue {
        Self::Vapi
    }
}
/// 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']
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum VoicemailDetectionTypesTrue {
    #[serde(rename = "machine_start")]
    MachineStart,
    #[serde(rename = "human")]
    Human,
    #[serde(rename = "fax")]
    Fax,
    #[serde(rename = "unknown")]
    Unknown,
    #[serde(rename = "machine_end_beep")]
    MachineEndBeep,
    #[serde(rename = "machine_end_silence")]
    MachineEndSilence,
    #[serde(rename = "machine_end_other")]
    MachineEndOther,
}

impl Default for VoicemailDetectionTypesTrue {
    fn default() -> VoicemailDetectionTypesTrue {
        Self::MachineStart
    }
}