vapi_client/models/
say_hook.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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SayHook {
17    #[serde(rename = "type")]
18    pub r#type: Type,
19    /// This is for metadata you want to store on the task.
20    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
21    pub metadata: Option<serde_json::Value>,
22    #[serde(rename = "exact", skip_serializing_if = "Option::is_none")]
23    pub exact: Option<String>,
24    #[serde(rename = "prompt", skip_serializing_if = "Option::is_none")]
25    pub prompt: Option<String>,
26}
27
28impl SayHook {
29    pub fn new(r#type: Type) -> SayHook {
30        SayHook {
31            r#type,
32            metadata: None,
33            exact: None,
34            prompt: None,
35        }
36    }
37}
38///
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "say")]
42    Say,
43}
44
45impl Default for Type {
46    fn default() -> Type {
47        Self::Say
48    }
49}