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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AssistantHookCustomerSpeechInterrupted {
    /// This is the event that triggers this hook
    #[serde(rename = "on")]
    pub on: OnTrue,
    /// This is the set of actions to perform when the hook triggers
    #[serde(rename = "do")]
    pub r#do: Vec<models::AssistantHookAssistantSpeechInterruptedDoInner>,
}

impl AssistantHookCustomerSpeechInterrupted {
    pub fn new(
        on: OnTrue,
        r#do: Vec<models::AssistantHookAssistantSpeechInterruptedDoInner>,
    ) -> AssistantHookCustomerSpeechInterrupted {
        AssistantHookCustomerSpeechInterrupted { on, r#do }
    }
}
/// This is the event that triggers this hook
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OnTrue {
    #[serde(rename = "customer.speech.interrupted")]
    CustomerPeriodSpeechPeriodInterrupted,
}

impl Default for OnTrue {
    fn default() -> OnTrue {
        Self::CustomerPeriodSpeechPeriodInterrupted
    }
}