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