// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Re-run a single block.
/// `block_id` is the block to run; `run_id` is the workflow run that
/// supplied the original inputs. `step_id` optionally selects a specific
/// step whose inputs should be used, which is useful for blocks inside a
/// `for_each` loop.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CreateBlockExecutionRequest {
    /// Workflow run id that owns the step.
    pub run_id: String,
    /// Workflow block id to execute.
    pub block_id: String,
    /// Optional concrete step id whose inputs should be used. When omitted, the block id is used to look up the step.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub step_id: Option<String>,
    /// Optional override for n_consensus on extract / split / classifier blocks. Must be 3, 5, or 7.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub n_consensus: Option<i64>,
    /// Whether to verify the upstream subgraph hasn't drifted since the source run. Disable only for explicit force-rerun flows.
    ///
    /// Defaults to `true`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub check_eligibility: Option<bool>,
}
impl CreateBlockExecutionRequest {
    /// Construct a new `CreateBlockExecutionRequest` with the required fields set.
    #[allow(deprecated)]
    pub fn new(run_id: impl Into<String>, block_id: impl Into<String>) -> Self {
        Self {
            run_id: run_id.into(),
            block_id: block_id.into(),
            step_id: Default::default(),
            n_consensus: Default::default(),
            check_eligibility: Default::default(),
        }
    }
}
