1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* 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 TestSuiteTestVoice {
/// These are the scorers used to evaluate the test.
#[serde(rename = "scorers")]
pub scorers: Vec<models::TestSuiteTestVoiceScorersInner>,
/// This is the type of the test, which must be voice.
#[serde(rename = "type")]
pub r#type: TypeTrue,
/// This is the unique identifier for the test.
#[serde(rename = "id")]
pub id: String,
/// This is the unique identifier for the test suite this test belongs to.
#[serde(rename = "testSuiteId")]
pub test_suite_id: String,
/// This is the unique identifier for the organization this test belongs to.
#[serde(rename = "orgId")]
pub org_id: String,
/// This is the ISO 8601 date-time string of when the test was created.
#[serde(rename = "createdAt")]
pub created_at: String,
/// This is the ISO 8601 date-time string of when the test was last updated.
#[serde(rename = "updatedAt")]
pub updated_at: String,
/// This is the name of the test.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// This is the script to be used for the voice test.
#[serde(rename = "script")]
pub script: String,
/// This is the number of attempts allowed for the test.
#[serde(rename = "numAttempts", skip_serializing_if = "Option::is_none")]
pub num_attempts: Option<f64>,
}
impl TestSuiteTestVoice {
pub fn new(
scorers: Vec<models::TestSuiteTestVoiceScorersInner>,
r#type: TypeTrue,
id: String,
test_suite_id: String,
org_id: String,
created_at: String,
updated_at: String,
script: String,
) -> TestSuiteTestVoice {
TestSuiteTestVoice {
scorers,
r#type,
id,
test_suite_id,
org_id,
created_at,
updated_at,
name: None,
script,
num_attempts: None,
}
}
}
/// This is the type of the test, which must be voice.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeTrue {
#[serde(rename = "voice")]
Voice,
}
impl Default for TypeTrue {
fn default() -> TypeTrue {
Self::Voice
}
}