vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TestSuiteRun {
    /// This is the current status of the test suite run.
    #[serde(rename = "status")]
    pub status: StatusTrue,
    /// This is the unique identifier for the test suite run.
    #[serde(rename = "id")]
    pub id: String,
    /// This is the unique identifier for the organization this run belongs to.
    #[serde(rename = "orgId")]
    pub org_id: String,
    /// This is the unique identifier for the test suite this run belongs to.
    #[serde(rename = "testSuiteId")]
    pub test_suite_id: String,
    /// This is the ISO 8601 date-time string of when the test suite run was created.
    #[serde(rename = "createdAt")]
    pub created_at: String,
    /// This is the ISO 8601 date-time string of when the test suite run was last updated.
    #[serde(rename = "updatedAt")]
    pub updated_at: String,
    /// These are the results of the tests in this test suite run.
    #[serde(rename = "testResults")]
    pub test_results: Vec<models::TestSuiteRunTestResult>,
    /// This is the name of the test suite run.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

impl TestSuiteRun {
    pub fn new(
        status: StatusTrue,
        id: String,
        org_id: String,
        test_suite_id: String,
        created_at: String,
        updated_at: String,
        test_results: Vec<models::TestSuiteRunTestResult>,
    ) -> TestSuiteRun {
        TestSuiteRun {
            status,
            id,
            org_id,
            test_suite_id,
            created_at,
            updated_at,
            test_results,
            name: None,
        }
    }
}
/// This is the current status of the test suite run.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StatusTrue {
    #[serde(rename = "queued")]
    Queued,
    #[serde(rename = "in-progress")]
    InProgress,
    #[serde(rename = "completed")]
    Completed,
    #[serde(rename = "failed")]
    Failed,
}

impl Default for StatusTrue {
    fn default() -> StatusTrue {
        Self::Queued
    }
}