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: ProviderTrue,
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(
34        provider: ProviderTrue,
35        public_key: String,
36        api_key: String,
37        api_url: String,
38    ) -> CreateLangfuseCredentialDto {
39        CreateLangfuseCredentialDto {
40            provider,
41            public_key,
42            api_key,
43            api_url,
44            name: None,
45        }
46    }
47}
48///
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum ProviderTrue {
51    #[serde(rename = "langfuse")]
52    Langfuse,
53}
54
55impl Default for ProviderTrue {
56    fn default() -> ProviderTrue {
57        Self::Langfuse
58    }
59}