// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WorkflowTestRun {
    pub id: String,
    pub workflow: WorkflowSnapshotRef,
    pub trigger: WorkflowRunTriggerOneOf,
    pub lifecycle: WorkflowTestResultLifecycleOneOf,
    pub timing: WorkflowTestRunTiming,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub target: Option<WorkflowTestBlockTarget>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub test_id: Option<String>,
    pub total_tests: i64,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub counts: Option<BlockTestBatchExecutionCounts>,
}
impl WorkflowTestRun {
    /// Construct a new `WorkflowTestRun` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        workflow: WorkflowSnapshotRef,
        trigger: WorkflowRunTriggerOneOf,
        lifecycle: WorkflowTestResultLifecycleOneOf,
        timing: WorkflowTestRunTiming,
        total_tests: i64,
    ) -> Self {
        Self {
            id: id.into(),
            workflow,
            trigger,
            lifecycle,
            timing,
            target: Default::default(),
            test_id: Default::default(),
            total_tests,
            counts: Default::default(),
        }
    }
}
