vapi_client/models/
transcriber_cost.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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TranscriberCost {
17    /// This is the type of cost, always 'transcriber' for this class.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    /// This is the transcriber that was used during the call.  This matches one of the below: - `call.assistant.transcriber`, - `call.assistantId->transcriber`, - `call.squad[n].assistant.transcriber`, - `call.squad[n].assistantId->transcriber`, - `call.squadId->[n].assistant.transcriber`, - `call.squadId->[n].assistantId->transcriber`.
21    #[serde(rename = "transcriber")]
22    pub transcriber: serde_json::Value,
23    /// This is the minutes of `transcriber` usage. This should match `call.endedAt` - `call.startedAt` for single assistant calls, while squad calls will have multiple transcriber costs one for each assistant that was used.
24    #[serde(rename = "minutes")]
25    pub minutes: f64,
26    /// This is the cost of the component in USD.
27    #[serde(rename = "cost")]
28    pub cost: f64,
29}
30
31impl TranscriberCost {
32    pub fn new(
33        r#type: Type,
34        transcriber: serde_json::Value,
35        minutes: f64,
36        cost: f64,
37    ) -> TranscriberCost {
38        TranscriberCost {
39            r#type,
40            transcriber,
41            minutes,
42            cost,
43        }
44    }
45}
46/// This is the type of cost, always 'transcriber' for this class.
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Type {
49    #[serde(rename = "transcriber")]
50    Transcriber,
51}
52
53impl Default for Type {
54    fn default() -> Type {
55        Self::Transcriber
56    }
57}