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