vapi_client/models/
azure_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 AzureCredential {
16    #[serde(rename = "provider")]
17    pub provider: ProviderTrue,
18    /// This is the service being used in Azure.
19    #[serde(rename = "service")]
20    pub service: ServiceTrue,
21    /// This is the region of the Azure resource.
22    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
23    pub region: Option<RegionTrue>,
24    /// This is not returned in the API.
25    #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")]
26    pub api_key: Option<String>,
27    /// This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.
28    #[serde(rename = "fallbackIndex", skip_serializing_if = "Option::is_none")]
29    pub fallback_index: Option<f64>,
30    /// This is the unique identifier for the credential.
31    #[serde(rename = "id")]
32    pub id: String,
33    /// This is the unique identifier for the org that this credential belongs to.
34    #[serde(rename = "orgId")]
35    pub org_id: String,
36    /// This is the ISO 8601 date-time string of when the credential was created.
37    #[serde(rename = "createdAt")]
38    pub created_at: String,
39    /// This is the ISO 8601 date-time string of when the assistant was last updated.
40    #[serde(rename = "updatedAt")]
41    pub updated_at: String,
42    /// This is the name of credential. This is just for your reference.
43    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
44    pub name: Option<String>,
45    /// This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.
46    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
47    pub bucket_plan: Option<models::AzureBlobStorageBucketPlan>,
48}
49
50impl AzureCredential {
51    pub fn new(
52        provider: ProviderTrue,
53        service: ServiceTrue,
54        id: String,
55        org_id: String,
56        created_at: String,
57        updated_at: String,
58    ) -> AzureCredential {
59        AzureCredential {
60            provider,
61            service,
62            region: None,
63            api_key: None,
64            fallback_index: None,
65            id,
66            org_id,
67            created_at,
68            updated_at,
69            name: None,
70            bucket_plan: None,
71        }
72    }
73}
74///
75#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
76pub enum ProviderTrue {
77    #[serde(rename = "azure")]
78    Azure,
79}
80
81impl Default for ProviderTrue {
82    fn default() -> ProviderTrue {
83        Self::Azure
84    }
85}
86/// This is the service being used in Azure.
87#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
88pub enum ServiceTrue {
89    #[serde(rename = "speech")]
90    Speech,
91    #[serde(rename = "blob_storage")]
92    BlobStorage,
93}
94
95impl Default for ServiceTrue {
96    fn default() -> ServiceTrue {
97        Self::Speech
98    }
99}
100/// This is the region of the Azure resource.
101#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
102pub enum RegionTrue {
103    #[serde(rename = "australia")]
104    Australia,
105    #[serde(rename = "canadaeast")]
106    Canadaeast,
107    #[serde(rename = "canadacentral")]
108    Canadacentral,
109    #[serde(rename = "eastus2")]
110    Eastus2,
111    #[serde(rename = "eastus")]
112    Eastus,
113    #[serde(rename = "france")]
114    France,
115    #[serde(rename = "india")]
116    India,
117    #[serde(rename = "japaneast")]
118    Japaneast,
119    #[serde(rename = "japanwest")]
120    Japanwest,
121    #[serde(rename = "uaenorth")]
122    Uaenorth,
123    #[serde(rename = "northcentralus")]
124    Northcentralus,
125    #[serde(rename = "norway")]
126    Norway,
127    #[serde(rename = "southcentralus")]
128    Southcentralus,
129    #[serde(rename = "swedencentral")]
130    Swedencentral,
131    #[serde(rename = "switzerland")]
132    Switzerland,
133    #[serde(rename = "uk")]
134    Uk,
135    #[serde(rename = "westus")]
136    Westus,
137    #[serde(rename = "westus3")]
138    Westus3,
139}
140
141impl Default for RegionTrue {
142    fn default() -> RegionTrue {
143        Self::Australia
144    }
145}