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