// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Result of validating a workflow YAML definition: whether it `is_valid`, block/edge counts, and `diagnostics`.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DeclarativeValidationResponse {
    pub workflow_id: String,
    pub block_count: i64,
    pub edge_count: i64,
    pub is_valid: bool,
    pub diagnostics: std::collections::HashMap<String, serde_json::Value>,
}
impl DeclarativeValidationResponse {
    /// Construct a new `DeclarativeValidationResponse` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        workflow_id: impl Into<String>,
        block_count: i64,
        edge_count: i64,
        is_valid: bool,
        diagnostics: std::collections::HashMap<String, serde_json::Value>,
    ) -> Self {
        Self {
            workflow_id: workflow_id.into(),
            block_count,
            edge_count,
            is_valid,
            diagnostics,
        }
    }
}
