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