vapi_client/models/
voicemail_detection_cost.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct VoicemailDetectionCost {
16 #[serde(rename = "type")]
18 pub r#type: Type,
19 #[serde(rename = "model")]
21 pub model: serde_json::Value,
22 #[serde(rename = "provider")]
24 pub provider: Provider,
25 #[serde(rename = "promptTextTokens")]
27 pub prompt_text_tokens: f64,
28 #[serde(rename = "promptAudioTokens")]
30 pub prompt_audio_tokens: f64,
31 #[serde(rename = "completionTextTokens")]
33 pub completion_text_tokens: f64,
34 #[serde(rename = "completionAudioTokens")]
36 pub completion_audio_tokens: f64,
37 #[serde(rename = "cost")]
39 pub cost: f64,
40}
41
42impl VoicemailDetectionCost {
43 pub fn new(r#type: Type, model: serde_json::Value, provider: Provider, prompt_text_tokens: f64, prompt_audio_tokens: f64, completion_text_tokens: f64, completion_audio_tokens: f64, cost: f64) -> VoicemailDetectionCost {
44 VoicemailDetectionCost {
45 r#type,
46 model,
47 provider,
48 prompt_text_tokens,
49 prompt_audio_tokens,
50 completion_text_tokens,
51 completion_audio_tokens,
52 cost,
53 }
54 }
55}
56#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
58pub enum Type {
59 #[serde(rename = "voicemail-detection")]
60 VoicemailDetection,
61}
62
63impl Default for Type {
64 fn default() -> Type {
65 Self::VoicemailDetection
66 }
67}
68#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
70pub enum Provider {
71 #[serde(rename = "twilio")]
72 Twilio,
73 #[serde(rename = "google")]
74 Google,
75 #[serde(rename = "openai")]
76 Openai,
77}
78
79impl Default for Provider {
80 fn default() -> Provider {
81 Self::Twilio
82 }
83}
84