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