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