vapi_client/models/
template.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 Template {
16    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
17    pub details: Option<models::CreateToolTemplateDtoDetails>,
18    #[serde(rename = "providerDetails", skip_serializing_if = "Option::is_none")]
19    pub provider_details: Option<models::CreateToolTemplateDtoProviderDetails>,
20    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
21    pub metadata: Option<models::ToolTemplateMetadata>,
22    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
23    pub visibility: Option<Visibility>,
24    #[serde(rename = "type")]
25    pub r#type: Type,
26    /// The name of the template. This is just for your own reference.
27    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
28    pub name: Option<String>,
29    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
30    pub provider: Option<Provider>,
31    /// The unique identifier for the template.
32    #[serde(rename = "id")]
33    pub id: String,
34    /// The unique identifier for the organization that this template belongs to.
35    #[serde(rename = "orgId")]
36    pub org_id: String,
37    /// The ISO 8601 date-time string of when the template was created.
38    #[serde(rename = "createdAt")]
39    pub created_at: String,
40    /// The ISO 8601 date-time string of when the template was last updated.
41    #[serde(rename = "updatedAt")]
42    pub updated_at: String,
43}
44
45impl Template {
46    pub fn new(r#type: Type, id: String, org_id: String, created_at: String, updated_at: String) -> Template {
47        Template {
48            details: None,
49            provider_details: None,
50            metadata: None,
51            visibility: None,
52            r#type,
53            name: None,
54            provider: None,
55            id,
56            org_id,
57            created_at,
58            updated_at,
59        }
60    }
61}
62/// 
63#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
64pub enum Visibility {
65    #[serde(rename = "public")]
66    Public,
67    #[serde(rename = "private")]
68    Private,
69}
70
71impl Default for Visibility {
72    fn default() -> Visibility {
73        Self::Public
74    }
75}
76/// 
77#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
78pub enum Type {
79    #[serde(rename = "tool")]
80    Tool,
81}
82
83impl Default for Type {
84    fn default() -> Type {
85        Self::Tool
86    }
87}
88/// 
89#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
90pub enum Provider {
91    #[serde(rename = "make")]
92    Make,
93    #[serde(rename = "gohighlevel")]
94    Gohighlevel,
95    #[serde(rename = "function")]
96    Function,
97}
98
99impl Default for Provider {
100    fn default() -> Provider {
101        Self::Make
102    }
103}
104