// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Request payload for ``POST /workflows/{id}/diagnose-graph``.
/// ``blocks`` and ``edges`` are both nullable so the route can tell apart
/// two intents:
/// * ``blocks`` / ``edges`` omitted (``None``): diagnose the persisted draft
/// — the route loads blocks and edges from MongoDB.
/// * ``blocks`` / ``edges`` provided (even as ``[]``): diagnose the in-memory
/// graph as-is — used by editor previews and ``workflows spec validate``
/// against a stub file.
/// Sending only one side (e.g. ``blocks=[]`` without ``edges``) is treated as
/// explicit-empty for the missing side too; the persisted-draft fallback only
/// kicks in when both are omitted.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WorkflowGraphDiagnosisRequest {
    /// Blocks to diagnose; if omitted, the persisted draft is loaded server-side
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub blocks: Option<Vec<WorkflowConfigBlock>>,
    /// Edges to diagnose; if omitted, the persisted draft is loaded server-side
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub edges: Option<Vec<WorkflowConfigEdge>>,
    /// Recompute derived schemas before validating the graph
    ///
    /// Defaults to `true`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub re_propagate: Option<bool>,
}
