vapi_client/models/
test_suite_run.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TestSuiteRun {
17    /// This is the current status of the test suite run.
18    #[serde(rename = "status")]
19    pub status: Status,
20    /// This is the unique identifier for the test suite run.
21    #[serde(rename = "id")]
22    pub id: String,
23    /// This is the unique identifier for the organization this run belongs to.
24    #[serde(rename = "orgId")]
25    pub org_id: String,
26    /// This is the unique identifier for the test suite this run belongs to.
27    #[serde(rename = "testSuiteId")]
28    pub test_suite_id: String,
29    /// This is the ISO 8601 date-time string of when the test suite run was created.
30    #[serde(rename = "createdAt")]
31    pub created_at: String,
32    /// This is the ISO 8601 date-time string of when the test suite run was last updated.
33    #[serde(rename = "updatedAt")]
34    pub updated_at: String,
35    /// These are the results of the tests in this test suite run.
36    #[serde(rename = "testResults")]
37    pub test_results: Vec<models::TestSuiteRunTestResult>,
38    /// This is the name of the test suite run.
39    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
40    pub name: Option<String>,
41}
42
43impl TestSuiteRun {
44    pub fn new(
45        status: Status,
46        id: String,
47        org_id: String,
48        test_suite_id: String,
49        created_at: String,
50        updated_at: String,
51        test_results: Vec<models::TestSuiteRunTestResult>,
52    ) -> TestSuiteRun {
53        TestSuiteRun {
54            status,
55            id,
56            org_id,
57            test_suite_id,
58            created_at,
59            updated_at,
60            test_results,
61            name: None,
62        }
63    }
64}
65/// This is the current status of the test suite run.
66#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
67pub enum Status {
68    #[serde(rename = "queued")]
69    Queued,
70    #[serde(rename = "in-progress")]
71    InProgress,
72    #[serde(rename = "completed")]
73    Completed,
74    #[serde(rename = "failed")]
75    Failed,
76}
77
78impl Default for Status {
79    fn default() -> Status {
80        Self::Queued
81    }
82}