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::AnyscaleModelToolsInner>,
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<VisibilityTrue>,
24    #[serde(rename = "type")]
25    pub r#type: TypeTrue,
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<ProviderTrue>,
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(
47        r#type: TypeTrue,
48        id: String,
49        org_id: String,
50        created_at: String,
51        updated_at: String,
52    ) -> Template {
53        Template {
54            details: None,
55            provider_details: None,
56            metadata: None,
57            visibility: None,
58            r#type,
59            name: None,
60            provider: None,
61            id,
62            org_id,
63            created_at,
64            updated_at,
65        }
66    }
67}
68///
69#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
70pub enum VisibilityTrue {
71    #[serde(rename = "public")]
72    Public,
73    #[serde(rename = "private")]
74    Private,
75}
76
77impl Default for VisibilityTrue {
78    fn default() -> VisibilityTrue {
79        Self::Public
80    }
81}
82///
83#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
84pub enum TypeTrue {
85    #[serde(rename = "tool")]
86    Tool,
87}
88
89impl Default for TypeTrue {
90    fn default() -> TypeTrue {
91        Self::Tool
92    }
93}
94///
95#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
96pub enum ProviderTrue {
97    #[serde(rename = "make")]
98    Make,
99    #[serde(rename = "gohighlevel")]
100    Gohighlevel,
101    #[serde(rename = "function")]
102    Function,
103}
104
105impl Default for ProviderTrue {
106    fn default() -> ProviderTrue {
107        Self::Make
108    }
109}