vapi_client/models/
azure_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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AzureCredential {
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    /// This is the service being used in Azure.
20    #[serde(rename = "service")]
21    pub service: Service,
22    /// This is the region of the Azure resource.
23    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
24    pub region: Option<Region>,
25    /// This is not returned in the API.
26    #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")]
27    pub api_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    /// This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.
44    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
45    pub bucket_plan: Option<models::AzureBlobStorageBucketPlan>,
46}
47
48impl AzureCredential {
49    pub fn new(
50        provider: Provider,
51        service: Service,
52        id: String,
53        org_id: String,
54        created_at: String,
55        updated_at: String,
56    ) -> AzureCredential {
57        AzureCredential {
58            provider,
59            service,
60            region: None,
61            api_key: None,
62            id,
63            org_id,
64            created_at,
65            updated_at,
66            name: None,
67            bucket_plan: None,
68        }
69    }
70}
71///
72#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
73pub enum Provider {
74    #[serde(rename = "azure")]
75    Azure,
76}
77
78impl Default for Provider {
79    fn default() -> Provider {
80        Self::Azure
81    }
82}
83/// This is the service being used in Azure.
84#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
85pub enum Service {
86    #[serde(rename = "speech")]
87    Speech,
88    #[serde(rename = "blob_storage")]
89    BlobStorage,
90}
91
92impl Default for Service {
93    fn default() -> Service {
94        Self::Speech
95    }
96}
97/// This is the region of the Azure resource.
98#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
99pub enum Region {
100    #[serde(rename = "australia")]
101    Australia,
102    #[serde(rename = "canadaeast")]
103    Canadaeast,
104    #[serde(rename = "canadacentral")]
105    Canadacentral,
106    #[serde(rename = "eastus2")]
107    Eastus2,
108    #[serde(rename = "eastus")]
109    Eastus,
110    #[serde(rename = "france")]
111    France,
112    #[serde(rename = "india")]
113    India,
114    #[serde(rename = "japaneast")]
115    Japaneast,
116    #[serde(rename = "japanwest")]
117    Japanwest,
118    #[serde(rename = "uaenorth")]
119    Uaenorth,
120    #[serde(rename = "northcentralus")]
121    Northcentralus,
122    #[serde(rename = "norway")]
123    Norway,
124    #[serde(rename = "southcentralus")]
125    Southcentralus,
126    #[serde(rename = "swedencentral")]
127    Swedencentral,
128    #[serde(rename = "switzerland")]
129    Switzerland,
130    #[serde(rename = "uk")]
131    Uk,
132    #[serde(rename = "westus")]
133    Westus,
134    #[serde(rename = "westus3")]
135    Westus3,
136}
137
138impl Default for Region {
139    fn default() -> Region {
140        Self::Australia
141    }
142}