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