vapi_client/models/
google_voicemail_detection_plan.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GoogleVoicemailDetectionPlan {
16    /// This is the provider to use for voicemail detection.
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    /// This is how long should we listen in order to determine if we were sent to voicemail or not?  @default 15
20    #[serde(rename = "voicemailExpectedDurationSeconds")]
21    pub voicemail_expected_duration_seconds: f64,
22}
23
24impl GoogleVoicemailDetectionPlan {
25    pub fn new(provider: Provider, voicemail_expected_duration_seconds: f64) -> GoogleVoicemailDetectionPlan {
26        GoogleVoicemailDetectionPlan {
27            provider,
28            voicemail_expected_duration_seconds,
29        }
30    }
31}
32/// This is the provider to use for voicemail detection.
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Provider {
35    #[serde(rename = "google")]
36    Google,
37}
38
39impl Default for Provider {
40    fn default() -> Provider {
41        Self::Google
42    }
43}
44