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