vapi_client/models/
transcriber_cost.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 TranscriberCost {
16    /// This is the type of cost, always 'transcriber' for this class.
17    #[serde(rename = "type")]
18    pub r#type: Type,
19    /// 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`.
20    #[serde(rename = "transcriber")]
21    pub transcriber: serde_json::Value,
22    /// 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.
23    #[serde(rename = "minutes")]
24    pub minutes: f64,
25    /// This is the cost of the component in USD.
26    #[serde(rename = "cost")]
27    pub cost: f64,
28}
29
30impl TranscriberCost {
31    pub fn new(r#type: Type, transcriber: serde_json::Value, minutes: f64, cost: f64) -> TranscriberCost {
32        TranscriberCost {
33            r#type,
34            transcriber,
35            minutes,
36            cost,
37        }
38    }
39}
40/// This is the type of cost, always 'transcriber' for this class.
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Type {
43    #[serde(rename = "transcriber")]
44    Transcriber,
45}
46
47impl Default for Type {
48    fn default() -> Type {
49        Self::Transcriber
50    }
51}
52