vapi_client/models/
create_langfuse_credential_dto.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 CreateLangfuseCredentialDto {
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 name of credential. This is just for your reference.
28    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
29    pub name: Option<String>,
30}
31
32impl CreateLangfuseCredentialDto {
33    pub fn new(provider: Provider, public_key: String, api_key: String, api_url: String) -> CreateLangfuseCredentialDto {
34        CreateLangfuseCredentialDto {
35            provider,
36            public_key,
37            api_key,
38            api_url,
39            name: None,
40        }
41    }
42}
43/// 
44#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
45pub enum Provider {
46    #[serde(rename = "langfuse")]
47    Langfuse,
48}
49
50impl Default for Provider {
51    fn default() -> Provider {
52        Self::Langfuse
53    }
54}
55