vapi_client/models/
azure_open_ai_credential.rs

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