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