vapi_client/models/
assistant_hook_assistant_speech_interrupted.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 AssistantHookAssistantSpeechInterrupted {
16    /// This is the event that triggers this hook
17    #[serde(rename = "on")]
18    pub on: OnTrue,
19    /// This is the set of actions to perform when the hook triggers
20    #[serde(rename = "do")]
21    pub r#do: Vec<models::AssistantHookAssistantSpeechInterruptedDoInner>,
22}
23
24impl AssistantHookAssistantSpeechInterrupted {
25    pub fn new(
26        on: OnTrue,
27        r#do: Vec<models::AssistantHookAssistantSpeechInterruptedDoInner>,
28    ) -> AssistantHookAssistantSpeechInterrupted {
29        AssistantHookAssistantSpeechInterrupted { on, r#do }
30    }
31}
32/// This is the event that triggers this hook
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum OnTrue {
35    #[serde(rename = "assistant.speech.interrupted")]
36    AssistantPeriodSpeechPeriodInterrupted,
37}
38
39impl Default for OnTrue {
40    fn default() -> OnTrue {
41        Self::AssistantPeriodSpeechPeriodInterrupted
42    }
43}