vapi_client/models/
azure_open_ai_credential.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 AzureOpenAiCredential {
16    #[serde(rename = "provider")]
17    pub provider: Provider,
18    #[serde(rename = "region")]
19    pub region: Region,
20    #[serde(rename = "models")]
21    pub models: Vec<Models>,
22    /// This is not returned in the API.
23    #[serde(rename = "openAIKey")]
24    pub open_ai_key: String,
25    /// This is not returned in the API.
26    #[serde(rename = "ocpApimSubscriptionKey", skip_serializing_if = "Option::is_none")]
27    pub ocp_apim_subscription_key: Option<String>,
28    /// This is the unique identifier for the credential.
29    #[serde(rename = "id")]
30    pub id: String,
31    /// This is the unique identifier for the org that this credential belongs to.
32    #[serde(rename = "orgId")]
33    pub org_id: String,
34    /// This is the ISO 8601 date-time string of when the credential was created.
35    #[serde(rename = "createdAt")]
36    pub created_at: String,
37    /// This is the ISO 8601 date-time string of when the assistant was last updated.
38    #[serde(rename = "updatedAt")]
39    pub updated_at: String,
40    /// This is the name of credential. This is just for your reference.
41    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
42    pub name: Option<String>,
43    #[serde(rename = "openAIEndpoint")]
44    pub open_ai_endpoint: String,
45}
46
47impl AzureOpenAiCredential {
48    pub fn new(provider: Provider, region: Region, models: Vec<Models>, open_ai_key: String, id: String, org_id: String, created_at: String, updated_at: String, open_ai_endpoint: String) -> AzureOpenAiCredential {
49        AzureOpenAiCredential {
50            provider,
51            region,
52            models,
53            open_ai_key,
54            ocp_apim_subscription_key: None,
55            id,
56            org_id,
57            created_at,
58            updated_at,
59            name: None,
60            open_ai_endpoint,
61        }
62    }
63}
64/// 
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
66pub enum Provider {
67    #[serde(rename = "azure-openai")]
68    AzureOpenai,
69}
70
71impl Default for Provider {
72    fn default() -> Provider {
73        Self::AzureOpenai
74    }
75}
76/// 
77#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
78pub enum Region {
79    #[serde(rename = "australia")]
80    Australia,
81    #[serde(rename = "canadaeast")]
82    Canadaeast,
83    #[serde(rename = "canadacentral")]
84    Canadacentral,
85    #[serde(rename = "eastus2")]
86    Eastus2,
87    #[serde(rename = "eastus")]
88    Eastus,
89    #[serde(rename = "france")]
90    France,
91    #[serde(rename = "india")]
92    India,
93    #[serde(rename = "japaneast")]
94    Japaneast,
95    #[serde(rename = "japanwest")]
96    Japanwest,
97    #[serde(rename = "uaenorth")]
98    Uaenorth,
99    #[serde(rename = "northcentralus")]
100    Northcentralus,
101    #[serde(rename = "norway")]
102    Norway,
103    #[serde(rename = "southcentralus")]
104    Southcentralus,
105    #[serde(rename = "swedencentral")]
106    Swedencentral,
107    #[serde(rename = "switzerland")]
108    Switzerland,
109    #[serde(rename = "uk")]
110    Uk,
111    #[serde(rename = "westus")]
112    Westus,
113    #[serde(rename = "westus3")]
114    Westus3,
115}
116
117impl Default for Region {
118    fn default() -> Region {
119        Self::Australia
120    }
121}
122/// 
123#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
124pub enum Models {
125    #[serde(rename = "gpt-4o-2024-08-06")]
126    Gpt4o20240806,
127    #[serde(rename = "gpt-4o-mini-2024-07-18")]
128    Gpt4oMini20240718,
129    #[serde(rename = "gpt-4o-2024-05-13")]
130    Gpt4o20240513,
131    #[serde(rename = "gpt-4-turbo-2024-04-09")]
132    Gpt4Turbo20240409,
133    #[serde(rename = "gpt-4-0125-preview")]
134    Gpt40125Preview,
135    #[serde(rename = "gpt-4-1106-preview")]
136    Gpt41106Preview,
137    #[serde(rename = "gpt-4-0613")]
138    Gpt40613,
139    #[serde(rename = "gpt-35-turbo-0125")]
140    Gpt35Turbo0125,
141    #[serde(rename = "gpt-35-turbo-1106")]
142    Gpt35Turbo1106,
143}
144
145impl Default for Models {
146    fn default() -> Models {
147        Self::Gpt4o20240806
148    }
149}
150