vapi_client/models/
create_custom_llm_credential_dto.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateCustomLlmCredentialDto {
16 #[serde(rename = "provider")]
17 pub provider: ProviderTrue,
18 #[serde(rename = "apiKey")]
20 pub api_key: String,
21 #[serde(rename = "authenticationPlan", skip_serializing_if = "Option::is_none")]
23 pub authentication_plan: Option<models::OAuth2AuthenticationPlan>,
24 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
26 pub name: Option<String>,
27}
28
29impl CreateCustomLlmCredentialDto {
30 pub fn new(provider: ProviderTrue, api_key: String) -> CreateCustomLlmCredentialDto {
31 CreateCustomLlmCredentialDto {
32 provider,
33 api_key,
34 authentication_plan: None,
35 name: None,
36 }
37 }
38}
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum ProviderTrue {
42 #[serde(rename = "custom-llm")]
43 CustomLlm,
44}
45
46impl Default for ProviderTrue {
47 fn default() -> ProviderTrue {
48 Self::CustomLlm
49 }
50}