// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Body to create a workflow test: the target block, an input `source`, and an `assertion` to evaluate its output.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CreateWorkflowTestRequest {
    pub workflow_id: String,
    pub target: WorkflowTestBlockTarget,
    pub source: CreateWorkflowTestRequestSourceOneOf,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub name: Option<String>,
    pub assertion: AssertionSpec,
}
impl CreateWorkflowTestRequest {
    /// Construct a new `CreateWorkflowTestRequest` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        workflow_id: impl Into<String>,
        target: WorkflowTestBlockTarget,
        source: CreateWorkflowTestRequestSourceOneOf,
        assertion: AssertionSpec,
    ) -> Self {
        Self {
            workflow_id: workflow_id.into(),
            target,
            source,
            name: Default::default(),
            assertion,
        }
    }
}
