vapi_client/models/
test_suite_run.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 TestSuiteRun {
16    /// This is the current status of the test suite run.
17    #[serde(rename = "status")]
18    pub status: StatusTrue,
19    /// This is the unique identifier for the test suite run.
20    #[serde(rename = "id")]
21    pub id: String,
22    /// This is the unique identifier for the organization this run belongs to.
23    #[serde(rename = "orgId")]
24    pub org_id: String,
25    /// This is the unique identifier for the test suite this run belongs to.
26    #[serde(rename = "testSuiteId")]
27    pub test_suite_id: String,
28    /// This is the ISO 8601 date-time string of when the test suite run was created.
29    #[serde(rename = "createdAt")]
30    pub created_at: String,
31    /// This is the ISO 8601 date-time string of when the test suite run was last updated.
32    #[serde(rename = "updatedAt")]
33    pub updated_at: String,
34    /// These are the results of the tests in this test suite run.
35    #[serde(rename = "testResults")]
36    pub test_results: Vec<models::TestSuiteRunTestResult>,
37    /// This is the name of the test suite run.
38    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
39    pub name: Option<String>,
40}
41
42impl TestSuiteRun {
43    pub fn new(
44        status: StatusTrue,
45        id: String,
46        org_id: String,
47        test_suite_id: String,
48        created_at: String,
49        updated_at: String,
50        test_results: Vec<models::TestSuiteRunTestResult>,
51    ) -> TestSuiteRun {
52        TestSuiteRun {
53            status,
54            id,
55            org_id,
56            test_suite_id,
57            created_at,
58            updated_at,
59            test_results,
60            name: None,
61        }
62    }
63}
64/// This is the current status of the test suite run.
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
66pub enum StatusTrue {
67    #[serde(rename = "queued")]
68    Queued,
69    #[serde(rename = "in-progress")]
70    InProgress,
71    #[serde(rename = "completed")]
72    Completed,
73    #[serde(rename = "failed")]
74    Failed,
75}
76
77impl Default for StatusTrue {
78    fn default() -> StatusTrue {
79        Self::Queued
80    }
81}