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