vapi_client/models/
create_azure_credential_dto.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 CreateAzureCredentialDto {
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 bucket plan that can be provided to store call artifacts in Azure Blob Storage.
31    #[serde(rename = "bucketPlan", skip_serializing_if = "Option::is_none")]
32    pub bucket_plan: Option<models::AzureBlobStorageBucketPlan>,
33    /// This is the name of credential. This is just for your reference.
34    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
35    pub name: Option<String>,
36}
37
38impl CreateAzureCredentialDto {
39    pub fn new(provider: ProviderTrue, service: ServiceTrue) -> CreateAzureCredentialDto {
40        CreateAzureCredentialDto {
41            provider,
42            service,
43            region: None,
44            api_key: None,
45            fallback_index: None,
46            bucket_plan: None,
47            name: None,
48        }
49    }
50}
51///
52#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
53pub enum ProviderTrue {
54    #[serde(rename = "azure")]
55    Azure,
56}
57
58impl Default for ProviderTrue {
59    fn default() -> ProviderTrue {
60        Self::Azure
61    }
62}
63/// This is the service being used in Azure.
64#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
65pub enum ServiceTrue {
66    #[serde(rename = "speech")]
67    Speech,
68    #[serde(rename = "blob_storage")]
69    BlobStorage,
70}
71
72impl Default for ServiceTrue {
73    fn default() -> ServiceTrue {
74        Self::Speech
75    }
76}
77/// This is the region of the Azure resource.
78#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
79pub enum RegionTrue {
80    #[serde(rename = "australia")]
81    Australia,
82    #[serde(rename = "canadaeast")]
83    Canadaeast,
84    #[serde(rename = "canadacentral")]
85    Canadacentral,
86    #[serde(rename = "eastus2")]
87    Eastus2,
88    #[serde(rename = "eastus")]
89    Eastus,
90    #[serde(rename = "france")]
91    France,
92    #[serde(rename = "india")]
93    India,
94    #[serde(rename = "japaneast")]
95    Japaneast,
96    #[serde(rename = "japanwest")]
97    Japanwest,
98    #[serde(rename = "uaenorth")]
99    Uaenorth,
100    #[serde(rename = "northcentralus")]
101    Northcentralus,
102    #[serde(rename = "norway")]
103    Norway,
104    #[serde(rename = "southcentralus")]
105    Southcentralus,
106    #[serde(rename = "swedencentral")]
107    Swedencentral,
108    #[serde(rename = "switzerland")]
109    Switzerland,
110    #[serde(rename = "uk")]
111    Uk,
112    #[serde(rename = "westus")]
113    Westus,
114    #[serde(rename = "westus3")]
115    Westus3,
116}
117
118impl Default for RegionTrue {
119    fn default() -> RegionTrue {
120        Self::Australia
121    }
122}