vapi_client/models/
vonage_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 VonageCredential {
16    /// This is not returned in the API.
17    #[serde(rename = "vonageApplicationPrivateKey")]
18    pub vonage_application_private_key: String,
19    #[serde(rename = "provider")]
20    pub provider: Provider,
21    /// This is not returned in the API.
22    #[serde(rename = "apiSecret")]
23    pub api_secret: String,
24    /// This is the unique identifier for the credential.
25    #[serde(rename = "id")]
26    pub id: String,
27    /// This is the unique identifier for the org that this credential belongs to.
28    #[serde(rename = "orgId")]
29    pub org_id: String,
30    /// This is the ISO 8601 date-time string of when the credential was created.
31    #[serde(rename = "createdAt")]
32    pub created_at: String,
33    /// This is the ISO 8601 date-time string of when the assistant was last updated.
34    #[serde(rename = "updatedAt")]
35    pub updated_at: String,
36    /// This is the Vonage Application ID for the credential.  Only relevant for Vonage credentials.
37    #[serde(rename = "vonageApplicationId")]
38    pub vonage_application_id: 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    #[serde(rename = "apiKey")]
43    pub api_key: String,
44}
45
46impl VonageCredential {
47    pub fn new(vonage_application_private_key: String, provider: Provider, api_secret: String, id: String, org_id: String, created_at: String, updated_at: String, vonage_application_id: String, api_key: String) -> VonageCredential {
48        VonageCredential {
49            vonage_application_private_key,
50            provider,
51            api_secret,
52            id,
53            org_id,
54            created_at,
55            updated_at,
56            vonage_application_id,
57            name: None,
58            api_key,
59        }
60    }
61}
62/// 
63#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
64pub enum Provider {
65    #[serde(rename = "vonage")]
66    Vonage,
67}
68
69impl Default for Provider {
70    fn default() -> Provider {
71        Self::Vonage
72    }
73}
74