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