vapi_client/models/
cost_breakdown.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 CostBreakdown {
16    /// This is the cost of the transport provider, like Twilio or Vonage.
17    #[serde(rename = "transport", skip_serializing_if = "Option::is_none")]
18    pub transport: Option<f64>,
19    /// This is the cost of the speech-to-text service.
20    #[serde(rename = "stt", skip_serializing_if = "Option::is_none")]
21    pub stt: Option<f64>,
22    /// This is the cost of the language model.
23    #[serde(rename = "llm", skip_serializing_if = "Option::is_none")]
24    pub llm: Option<f64>,
25    /// This is the cost of the text-to-speech service.
26    #[serde(rename = "tts", skip_serializing_if = "Option::is_none")]
27    pub tts: Option<f64>,
28    /// This is the cost of Vapi.
29    #[serde(rename = "vapi", skip_serializing_if = "Option::is_none")]
30    pub vapi: Option<f64>,
31    /// This is the total cost of the call.
32    #[serde(rename = "total", skip_serializing_if = "Option::is_none")]
33    pub total: Option<f64>,
34    /// This is the LLM prompt tokens used for the call.
35    #[serde(rename = "llmPromptTokens", skip_serializing_if = "Option::is_none")]
36    pub llm_prompt_tokens: Option<f64>,
37    /// This is the LLM completion tokens used for the call.
38    #[serde(rename = "llmCompletionTokens", skip_serializing_if = "Option::is_none")]
39    pub llm_completion_tokens: Option<f64>,
40    /// This is the TTS characters used for the call.
41    #[serde(rename = "ttsCharacters", skip_serializing_if = "Option::is_none")]
42    pub tts_characters: Option<f64>,
43    /// This is the cost of the analysis.
44    #[serde(rename = "analysisCostBreakdown", skip_serializing_if = "Option::is_none")]
45    pub analysis_cost_breakdown: Option<models::AnalysisCostBreakdown>,
46}
47
48impl CostBreakdown {
49    pub fn new() -> CostBreakdown {
50        CostBreakdown {
51            transport: None,
52            stt: None,
53            llm: None,
54            tts: None,
55            vapi: None,
56            total: None,
57            llm_prompt_tokens: None,
58            llm_completion_tokens: None,
59            tts_characters: None,
60            analysis_cost_breakdown: None,
61        }
62    }
63}
64