vapi_client/models/
voice_library.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 VoiceLibrary {
16    /// This is the voice provider that will be used.
17    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
18    pub provider: Option<ProviderTrue>,
19    /// The ID of the voice provided by the provider.
20    #[serde(rename = "providerId", skip_serializing_if = "Option::is_none")]
21    pub provider_id: Option<String>,
22    /// The unique slug of the voice.
23    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
24    pub slug: Option<String>,
25    /// The name of the voice.
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28    /// The language of the voice.
29    #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
30    pub language: Option<String>,
31    /// The language code of the voice.
32    #[serde(rename = "languageCode", skip_serializing_if = "Option::is_none")]
33    pub language_code: Option<String>,
34    /// The model of the voice.
35    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
36    pub model: Option<String>,
37    /// The supported models of the voice.
38    #[serde(rename = "supportedModels", skip_serializing_if = "Option::is_none")]
39    pub supported_models: Option<String>,
40    /// The gender of the voice.
41    #[serde(rename = "gender", skip_serializing_if = "Option::is_none")]
42    pub gender: Option<GenderTrue>,
43    /// The accent of the voice.
44    #[serde(rename = "accent", skip_serializing_if = "Option::is_none")]
45    pub accent: Option<String>,
46    /// The preview URL of the voice.
47    #[serde(rename = "previewUrl", skip_serializing_if = "Option::is_none")]
48    pub preview_url: Option<String>,
49    /// The description of the voice.
50    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
51    pub description: Option<String>,
52    /// The credential ID of the voice.
53    #[serde(rename = "credentialId", skip_serializing_if = "Option::is_none")]
54    pub credential_id: Option<String>,
55    /// The unique identifier for the voice library.
56    #[serde(rename = "id")]
57    pub id: String,
58    /// The unique identifier for the organization that this voice library belongs to.
59    #[serde(rename = "orgId")]
60    pub org_id: String,
61    /// The Public voice is shared accross all the organizations.
62    #[serde(rename = "isPublic")]
63    pub is_public: bool,
64    /// The deletion status of the voice.
65    #[serde(rename = "isDeleted")]
66    pub is_deleted: bool,
67    /// The ISO 8601 date-time string of when the voice library was created.
68    #[serde(rename = "createdAt")]
69    pub created_at: String,
70    /// The ISO 8601 date-time string of when the voice library was last updated.
71    #[serde(rename = "updatedAt")]
72    pub updated_at: String,
73}
74
75impl VoiceLibrary {
76    pub fn new(
77        id: String,
78        org_id: String,
79        is_public: bool,
80        is_deleted: bool,
81        created_at: String,
82        updated_at: String,
83    ) -> VoiceLibrary {
84        VoiceLibrary {
85            provider: None,
86            provider_id: None,
87            slug: None,
88            name: None,
89            language: None,
90            language_code: None,
91            model: None,
92            supported_models: None,
93            gender: None,
94            accent: None,
95            preview_url: None,
96            description: None,
97            credential_id: None,
98            id,
99            org_id,
100            is_public,
101            is_deleted,
102            created_at,
103            updated_at,
104        }
105    }
106}
107/// This is the voice provider that will be used.
108#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
109pub enum ProviderTrue {
110    #[serde(rename = "vapi")]
111    Vapi,
112    #[serde(rename = "11labs")]
113    Variant11labs,
114    #[serde(rename = "azure")]
115    Azure,
116    #[serde(rename = "cartesia")]
117    Cartesia,
118    #[serde(rename = "custom-voice")]
119    CustomVoice,
120    #[serde(rename = "deepgram")]
121    Deepgram,
122    #[serde(rename = "hume")]
123    Hume,
124    #[serde(rename = "lmnt")]
125    Lmnt,
126    #[serde(rename = "neuphonic")]
127    Neuphonic,
128    #[serde(rename = "openai")]
129    Openai,
130    #[serde(rename = "playht")]
131    Playht,
132    #[serde(rename = "rime-ai")]
133    RimeAi,
134    #[serde(rename = "smallest-ai")]
135    SmallestAi,
136    #[serde(rename = "tavus")]
137    Tavus,
138    #[serde(rename = "sesame")]
139    Sesame,
140}
141
142impl Default for ProviderTrue {
143    fn default() -> ProviderTrue {
144        Self::Vapi
145    }
146}
147/// The gender of the voice.
148#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
149pub enum GenderTrue {
150    #[serde(rename = "male")]
151    Male,
152    #[serde(rename = "female")]
153    Female,
154}
155
156impl Default for GenderTrue {
157    fn default() -> GenderTrue {
158        Self::Male
159    }
160}