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};
12use utoipa::OpenApi;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, OpenApi)]
18pub struct MakeCredential {
19    #[serde(rename = "provider")]
20    pub provider: Provider,
21    /// Team ID
22    #[serde(rename = "teamId")]
23    pub team_id: String,
24    /// Region of your application. For example: eu1, eu2, us1, us2
25    #[serde(rename = "region")]
26    pub region: String,
27    /// This is not returned in the API.
28    #[serde(rename = "apiKey")]
29    pub api_key: String,
30    /// This is the unique identifier for the credential.
31    #[serde(rename = "id")]
32    pub id: String,
33    /// This is the unique identifier for the org that this credential belongs to.
34    #[serde(rename = "orgId")]
35    pub org_id: String,
36    /// This is the ISO 8601 date-time string of when the credential was created.
37    #[serde(rename = "createdAt")]
38    pub created_at: String,
39    /// This is the ISO 8601 date-time string of when the assistant was last updated.
40    #[serde(rename = "updatedAt")]
41    pub updated_at: String,
42    /// This is the name of credential. This is just for your reference.
43    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
44    pub name: Option<String>,
45}
46
47impl MakeCredential {
48    pub fn new(
49        provider: Provider,
50        team_id: String,
51        region: String,
52        api_key: String,
53        id: String,
54        org_id: String,
55        created_at: String,
56        updated_at: String,
57    ) -> MakeCredential {
58        MakeCredential {
59            provider,
60            team_id,
61            region,
62            api_key,
63            id,
64            org_id,
65            created_at,
66            updated_at,
67            name: None,
68        }
69    }
70}
71///
72#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, OpenApi)]
73pub enum Provider {
74    #[serde(rename = "make")]
75    Make,
76}
77
78impl Default for Provider {
79    fn default() -> Provider {
80        Self::Make
81    }
82}