vapi_client/models/
test_suite_test_voice.rs1use serde::{Deserialize, Serialize};
12use utoipa::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct TestSuiteTestVoice {
19 #[serde(rename = "scorers")]
21 pub scorers: Vec<models::TestSuiteTestVoiceScorersInner>,
22 #[serde(rename = "type")]
24 pub r#type: Type,
25 #[serde(rename = "id")]
27 pub id: String,
28 #[serde(rename = "testSuiteId")]
30 pub test_suite_id: String,
31 #[serde(rename = "orgId")]
33 pub org_id: String,
34 #[serde(rename = "createdAt")]
36 pub created_at: String,
37 #[serde(rename = "updatedAt")]
39 pub updated_at: String,
40 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
42 pub name: Option<String>,
43 #[serde(rename = "script")]
45 pub script: String,
46 #[serde(rename = "numAttempts", skip_serializing_if = "Option::is_none")]
48 pub num_attempts: Option<f64>,
49}
50
51impl TestSuiteTestVoice {
52 pub fn new(
53 scorers: Vec<models::TestSuiteTestVoiceScorersInner>,
54 r#type: Type,
55 id: String,
56 test_suite_id: String,
57 org_id: String,
58 created_at: String,
59 updated_at: String,
60 script: String,
61 ) -> TestSuiteTestVoice {
62 TestSuiteTestVoice {
63 scorers,
64 r#type,
65 id,
66 test_suite_id,
67 org_id,
68 created_at,
69 updated_at,
70 name: None,
71 script,
72 num_attempts: None,
73 }
74 }
75}
76#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, ToSchema)]
78pub enum Type {
79 #[serde(rename = "voice")]
80 Voice,
81}
82
83impl Default for Type {
84 fn default() -> Type {
85 Self::Voice
86 }
87}