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: Status,
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(status: Status, id: String, org_id: String, test_suite_id: String, created_at: String, updated_at: String, test_results: Vec<models::TestSuiteRunTestResult>) -> TestSuiteRun {
44        TestSuiteRun {
45            status,
46            id,
47            org_id,
48            test_suite_id,
49            created_at,
50            updated_at,
51            test_results,
52            name: None,
53        }
54    }
55}
56/// This is the current status of the test suite run.
57#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
58pub enum Status {
59    #[serde(rename = "queued")]
60    Queued,
61    #[serde(rename = "in-progress")]
62    InProgress,
63    #[serde(rename = "completed")]
64    Completed,
65    #[serde(rename = "failed")]
66    Failed,
67}
68
69impl Default for Status {
70    fn default() -> Status {
71        Self::Queued
72    }
73}
74