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 TestSuiteRunTestAttempt {
    /// These are the results of the scorers used to evaluate the test attempt.
    #[serde(rename = "scorerResults")]
    pub scorer_results: Vec<models::TestSuiteRunTestAttemptScorerResultsInner>,
    /// This is the call made during the test attempt.
    #[serde(rename = "call", skip_serializing_if = "Option::is_none")]
    pub call: Option<models::TestSuiteRunTestAttemptCall>,
    /// This is the call ID for the test attempt.
    #[serde(rename = "callId", skip_serializing_if = "Option::is_none")]
    pub call_id: Option<String>,
    /// This is the metadata for the test attempt.
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<models::TestSuiteRunTestAttemptMetadata>,
}

impl TestSuiteRunTestAttempt {
    pub fn new(
        scorer_results: Vec<models::TestSuiteRunTestAttemptScorerResultsInner>,
    ) -> TestSuiteRunTestAttempt {
        TestSuiteRunTestAttempt {
            scorer_results,
            call: None,
            call_id: None,
            metadata: None,
        }
    }
}