// 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 eval: the target block, an input `source`, and an `assertion` to evaluate its output.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CreateWorkflowEvalRequest {
    pub workflow_id: String,
    pub target: WorkflowEvalBlockTarget,
    pub source: CreateWorkflowEvalRequestSourceOneOf,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub name: Option<String>,
    pub assertion: AssertionSpec,
}
impl CreateWorkflowEvalRequest {
    /// Construct a new `CreateWorkflowEvalRequest` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        workflow_id: impl Into<String>,
        target: WorkflowEvalBlockTarget,
        source: CreateWorkflowEvalRequestSourceOneOf,
        assertion: AssertionSpec,
    ) -> Self {
        Self {
            workflow_id: workflow_id.into(),
            target,
            source,
            name: Default::default(),
            assertion,
        }
    }
}
