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