vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ChatCost {
    /// This is the type of cost, always 'chat' for this class.
    #[serde(rename = "type")]
    pub r#type: TypeTrue,
    /// This is the cost of the component in USD.
    #[serde(rename = "cost")]
    pub cost: f64,
}

impl ChatCost {
    pub fn new(r#type: TypeTrue, cost: f64) -> ChatCost {
        ChatCost { r#type, cost }
    }
}
/// This is the type of cost, always 'chat' for this class.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeTrue {
    #[serde(rename = "chat")]
    Chat,
}

impl Default for TypeTrue {
    fn default() -> TypeTrue {
        Self::Chat
    }
}