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 TestSuiteRunScorerAi {
    /// This is the type of the scorer, which must be AI.
    #[serde(rename = "type")]
    pub r#type: TypeTrue,
    /// This is the result of the test suite.
    #[serde(rename = "result")]
    pub result: ResultTrue,
    /// This is the reasoning provided by the AI scorer.
    #[serde(rename = "reasoning")]
    pub reasoning: String,
    /// This is the rubric used by the AI scorer.
    #[serde(rename = "rubric")]
    pub rubric: String,
}

impl TestSuiteRunScorerAi {
    pub fn new(
        r#type: TypeTrue,
        result: ResultTrue,
        reasoning: String,
        rubric: String,
    ) -> TestSuiteRunScorerAi {
        TestSuiteRunScorerAi {
            r#type,
            result,
            reasoning,
            rubric,
        }
    }
}
/// This is the type of the scorer, which must be AI.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeTrue {
    #[serde(rename = "ai")]
    Ai,
}

impl Default for TypeTrue {
    fn default() -> TypeTrue {
        Self::Ai
    }
}
/// This is the result of the test suite.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ResultTrue {
    #[serde(rename = "pass")]
    Pass,
    #[serde(rename = "fail")]
    Fail,
}

impl Default for ResultTrue {
    fn default() -> ResultTrue {
        Self::Pass
    }
}