vapi_client/models/
test_suite_test_chat.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 TestSuiteTestChat {
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 chat.
20    #[serde(rename = "type")]
21    pub r#type: TypeTrue,
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 chat 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 TestSuiteTestChat {
49    pub fn new(
50        scorers: Vec<models::TestSuiteTestVoiceScorersInner>,
51        r#type: TypeTrue,
52        id: String,
53        test_suite_id: String,
54        org_id: String,
55        created_at: String,
56        updated_at: String,
57        script: String,
58    ) -> TestSuiteTestChat {
59        TestSuiteTestChat {
60            scorers,
61            r#type,
62            id,
63            test_suite_id,
64            org_id,
65            created_at,
66            updated_at,
67            name: None,
68            script,
69            num_attempts: None,
70        }
71    }
72}
73/// This is the type of the test, which must be chat.
74#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
75pub enum TypeTrue {
76    #[serde(rename = "chat")]
77    Chat,
78}
79
80impl Default for TypeTrue {
81    fn default() -> TypeTrue {
82        Self::Chat
83    }
84}