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<Provider>,
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<Gender>,
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(id: String, org_id: String, is_public: bool, is_deleted: bool, created_at: String, updated_at: String) -> VoiceLibrary {
77        VoiceLibrary {
78            provider: None,
79            provider_id: None,
80            slug: None,
81            name: None,
82            language: None,
83            language_code: None,
84            model: None,
85            supported_models: None,
86            gender: None,
87            accent: None,
88            preview_url: None,
89            description: None,
90            credential_id: None,
91            id,
92            org_id,
93            is_public,
94            is_deleted,
95            created_at,
96            updated_at,
97        }
98    }
99}
100/// This is the voice provider that will be used.
101#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
102pub enum Provider {
103    #[serde(rename = "vapi")]
104    Vapi,
105    #[serde(rename = "11labs")]
106    Variant11labs,
107    #[serde(rename = "azure")]
108    Azure,
109    #[serde(rename = "cartesia")]
110    Cartesia,
111    #[serde(rename = "custom-voice")]
112    CustomVoice,
113    #[serde(rename = "deepgram")]
114    Deepgram,
115    #[serde(rename = "hume")]
116    Hume,
117    #[serde(rename = "lmnt")]
118    Lmnt,
119    #[serde(rename = "neets")]
120    Neets,
121    #[serde(rename = "neuphonic")]
122    Neuphonic,
123    #[serde(rename = "openai")]
124    Openai,
125    #[serde(rename = "playht")]
126    Playht,
127    #[serde(rename = "rime-ai")]
128    RimeAi,
129    #[serde(rename = "smallest-ai")]
130    SmallestAi,
131    #[serde(rename = "tavus")]
132    Tavus,
133}
134
135impl Default for Provider {
136    fn default() -> Provider {
137        Self::Vapi
138    }
139}
140/// The gender of the voice.
141#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
142pub enum Gender {
143    #[serde(rename = "male")]
144    Male,
145    #[serde(rename = "female")]
146    Female,
147}
148
149impl Default for Gender {
150    fn default() -> Gender {
151        Self::Male
152    }
153}
154