vapi_client/models/
create_test_suite_test_chat_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 CreateTestSuiteTestChatDto {
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 script to be used for the chat 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 CreateTestSuiteTestChatDto {
34    pub fn new(
35        scorers: Vec<models::TestSuiteTestVoiceScorersInner>,
36        r#type: TypeTrue,
37        script: String,
38    ) -> CreateTestSuiteTestChatDto {
39        CreateTestSuiteTestChatDto {
40            scorers,
41            r#type,
42            script,
43            num_attempts: None,
44            name: None,
45        }
46    }
47}
48/// This is the type of the test, which must be chat.
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum TypeTrue {
51    #[serde(rename = "chat")]
52    Chat,
53}
54
55impl Default for TypeTrue {
56    fn default() -> TypeTrue {
57        Self::Chat
58    }
59}