vapi_client/models/
gather.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Gather {
17 #[serde(rename = "type")]
18 pub r#type: Type,
19 #[serde(rename = "output")]
20 pub output: models::JsonSchema,
21 #[serde(rename = "confirmContent", skip_serializing_if = "Option::is_none")]
23 pub confirm_content: Option<bool>,
24 #[serde(rename = "hooks", skip_serializing_if = "Option::is_none")]
26 pub hooks: Option<Vec<models::Hook>>,
27 #[serde(rename = "maxRetries", skip_serializing_if = "Option::is_none")]
29 pub max_retries: Option<f64>,
30 #[serde(rename = "literalTemplate", skip_serializing_if = "Option::is_none")]
32 pub literal_template: Option<String>,
33 #[serde(rename = "name")]
34 pub name: String,
35 #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
37 pub metadata: Option<serde_json::Value>,
38}
39
40impl Gather {
41 pub fn new(r#type: Type, output: models::JsonSchema, name: String) -> Gather {
42 Gather {
43 r#type,
44 output,
45 confirm_content: None,
46 hooks: None,
47 max_retries: None,
48 literal_template: None,
49 name,
50 metadata: None,
51 }
52 }
53}
54#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
56pub enum Type {
57 #[serde(rename = "gather")]
58 Gather,
59}
60
61impl Default for Type {
62 fn default() -> Type {
63 Self::Gather
64 }
65}