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 AnalysisCostBreakdown {
    /// This is the cost to summarize the call.
    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
    pub summary: Option<f64>,
    /// This is the number of prompt tokens used to summarize the call.
    #[serde(
        rename = "summaryPromptTokens",
        skip_serializing_if = "Option::is_none"
    )]
    pub summary_prompt_tokens: Option<f64>,
    /// This is the number of completion tokens used to summarize the call.
    #[serde(
        rename = "summaryCompletionTokens",
        skip_serializing_if = "Option::is_none"
    )]
    pub summary_completion_tokens: Option<f64>,
    /// This is the cost to extract structured data from the call.
    #[serde(rename = "structuredData", skip_serializing_if = "Option::is_none")]
    pub structured_data: Option<f64>,
    /// This is the number of prompt tokens used to extract structured data from the call.
    #[serde(
        rename = "structuredDataPromptTokens",
        skip_serializing_if = "Option::is_none"
    )]
    pub structured_data_prompt_tokens: Option<f64>,
    /// This is the number of completion tokens used to extract structured data from the call.
    #[serde(
        rename = "structuredDataCompletionTokens",
        skip_serializing_if = "Option::is_none"
    )]
    pub structured_data_completion_tokens: Option<f64>,
    /// This is the cost to evaluate if the call was successful.
    #[serde(rename = "successEvaluation", skip_serializing_if = "Option::is_none")]
    pub success_evaluation: Option<f64>,
    /// This is the number of prompt tokens used to evaluate if the call was successful.
    #[serde(
        rename = "successEvaluationPromptTokens",
        skip_serializing_if = "Option::is_none"
    )]
    pub success_evaluation_prompt_tokens: Option<f64>,
    /// This is the number of completion tokens used to evaluate if the call was successful.
    #[serde(
        rename = "successEvaluationCompletionTokens",
        skip_serializing_if = "Option::is_none"
    )]
    pub success_evaluation_completion_tokens: Option<f64>,
}

impl AnalysisCostBreakdown {
    pub fn new() -> AnalysisCostBreakdown {
        AnalysisCostBreakdown {
            summary: None,
            summary_prompt_tokens: None,
            summary_completion_tokens: None,
            structured_data: None,
            structured_data_prompt_tokens: None,
            structured_data_completion_tokens: None,
            success_evaluation: None,
            success_evaluation_prompt_tokens: None,
            success_evaluation_completion_tokens: None,
        }
    }
}