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