vapi_client/models/
google_voicemail_detection_plan.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12use utoipa::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct GoogleVoicemailDetectionPlan {
19    /// This is the provider to use for voicemail detection.
20    #[serde(rename = "provider")]
21    pub provider: Provider,
22    /// This is how long should we listen in order to determine if we were sent to voicemail or not?  @default 15
23    #[serde(rename = "voicemailExpectedDurationSeconds")]
24    pub voicemail_expected_duration_seconds: f64,
25}
26
27impl GoogleVoicemailDetectionPlan {
28    pub fn new(
29        provider: Provider,
30        voicemail_expected_duration_seconds: f64,
31    ) -> GoogleVoicemailDetectionPlan {
32        GoogleVoicemailDetectionPlan {
33            provider,
34            voicemail_expected_duration_seconds,
35        }
36    }
37}
38/// This is the provider to use for voicemail detection.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
40pub enum Provider {
41    #[serde(rename = "google")]
42    Google,
43}
44
45impl Default for Provider {
46    fn default() -> Provider {
47        Self::Google
48    }
49}