vapi_client/models/
inflection_ai_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 InflectionAiCredential {
16    /// This is the api key for Pi in InflectionAI's console. Get it from here: https://developers.inflection.ai/keys, billing will need to be setup
17    #[serde(rename = "provider")]
18    pub provider: ProviderTrue,
19    /// This is not returned in the API.
20    #[serde(rename = "apiKey")]
21    pub api_key: String,
22    /// This is the unique identifier for the credential.
23    #[serde(rename = "id")]
24    pub id: String,
25    /// This is the unique identifier for the org that this credential belongs to.
26    #[serde(rename = "orgId")]
27    pub org_id: String,
28    /// This is the ISO 8601 date-time string of when the credential was created.
29    #[serde(rename = "createdAt")]
30    pub created_at: String,
31    /// This is the ISO 8601 date-time string of when the assistant was last updated.
32    #[serde(rename = "updatedAt")]
33    pub updated_at: String,
34    /// This is the name of credential. This is just for your reference.
35    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
36    pub name: Option<String>,
37}
38
39impl InflectionAiCredential {
40    pub fn new(
41        provider: ProviderTrue,
42        api_key: String,
43        id: String,
44        org_id: String,
45        created_at: String,
46        updated_at: String,
47    ) -> InflectionAiCredential {
48        InflectionAiCredential {
49            provider,
50            api_key,
51            id,
52            org_id,
53            created_at,
54            updated_at,
55            name: None,
56        }
57    }
58}
59/// This is the api key for Pi in InflectionAI's console. Get it from here: https://developers.inflection.ai/keys, billing will need to be setup
60#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
61pub enum ProviderTrue {
62    #[serde(rename = "inflection-ai")]
63    InflectionAi,
64}
65
66impl Default for ProviderTrue {
67    fn default() -> ProviderTrue {
68        Self::InflectionAi
69    }
70}