vapi_client/models/
create_test_suite_test_voice_dto.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 CreateTestSuiteTestVoiceDto {
16    /// These are the scorers used to evaluate the test.
17    #[serde(rename = "scorers")]
18    pub scorers: Vec<models::TestSuiteTestVoiceScorersInner>,
19    /// This is the type of the test, which must be voice.
20    #[serde(rename = "type")]
21    pub r#type: Type,
22    /// This is the script to be used for the voice test.
23    #[serde(rename = "script")]
24    pub script: String,
25    /// This is the number of attempts allowed for the test.
26    #[serde(rename = "numAttempts", skip_serializing_if = "Option::is_none")]
27    pub num_attempts: Option<f64>,
28    /// This is the name of the test.
29    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
30    pub name: Option<String>,
31}
32
33impl CreateTestSuiteTestVoiceDto {
34    pub fn new(scorers: Vec<models::TestSuiteTestVoiceScorersInner>, r#type: Type, script: String) -> CreateTestSuiteTestVoiceDto {
35        CreateTestSuiteTestVoiceDto {
36            scorers,
37            r#type,
38            script,
39            num_attempts: None,
40            name: None,
41        }
42    }
43}
44/// This is the type of the test, which must be voice.
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum Type {
47    #[serde(rename = "voice")]
48    Voice,
49}
50
51impl Default for Type {
52    fn default() -> Type {
53        Self::Voice
54    }
55}
56