vapi_client/models/
chat_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 ChatCost {
16    /// This is the type of cost, always 'chat' for this class.
17    #[serde(rename = "type")]
18    pub r#type: TypeTrue,
19    /// This is the cost of the component in USD.
20    #[serde(rename = "cost")]
21    pub cost: f64,
22}
23
24impl ChatCost {
25    pub fn new(r#type: TypeTrue, cost: f64) -> ChatCost {
26        ChatCost { r#type, cost }
27    }
28}
29/// This is the type of cost, always 'chat' for this class.
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum TypeTrue {
32    #[serde(rename = "chat")]
33    Chat,
34}
35
36impl Default for TypeTrue {
37    fn default() -> TypeTrue {
38        Self::Chat
39    }
40}