vapi_client/models/
make_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 MakeCredential {
16    #[serde(rename = "provider")]
17    pub provider: ProviderTrue,
18    /// Team ID
19    #[serde(rename = "teamId")]
20    pub team_id: String,
21    /// Region of your application. For example: eu1, eu2, us1, us2
22    #[serde(rename = "region")]
23    pub region: String,
24    /// This is not returned in the API.
25    #[serde(rename = "apiKey")]
26    pub api_key: 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}
43
44impl MakeCredential {
45    pub fn new(
46        provider: ProviderTrue,
47        team_id: String,
48        region: String,
49        api_key: String,
50        id: String,
51        org_id: String,
52        created_at: String,
53        updated_at: String,
54    ) -> MakeCredential {
55        MakeCredential {
56            provider,
57            team_id,
58            region,
59            api_key,
60            id,
61            org_id,
62            created_at,
63            updated_at,
64            name: None,
65        }
66    }
67}
68///
69#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
70pub enum ProviderTrue {
71    #[serde(rename = "make")]
72    Make,
73}
74
75impl Default for ProviderTrue {
76    fn default() -> ProviderTrue {
77        Self::Make
78    }
79}