windmill-api 1.884.1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.884.1
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RestartFlowAtStepRequest {
    /// top-level step id to restart the flow from (or the outermost container when restarting at a nested step)
    #[serde(rename = "step_id")]
    pub step_id: String,
    /// for branchall or loop at the top level, the iteration at which the flow should restart (optional)
    #[serde(rename = "branch_or_iteration_n", skip_serializing_if = "Option::is_none")]
    pub branch_or_iteration_n: Option<i32>,
    /// specific flow version to use for restart (optional, uses current version if not specified)
    #[serde(rename = "flow_version", skip_serializing_if = "Option::is_none")]
    pub flow_version: Option<i32>,
    /// for a parallel for-loop or branch-all at the restart point (`step_id`, or the last `nested_path` entry), keep the iterations (branches) that succeeded and rerun only the others from their first step, each in its original position. Cannot be combined with an iteration to restart at on that same step.
    #[serde(rename = "failed_only", skip_serializing_if = "Option::is_none")]
    pub failed_only: Option<bool>,
    /// with `failed_only`, resume each failed iteration (branch) at the step where it failed, keeping the steps before it, rather than rerunning it from its first step.
    #[serde(rename = "from_failed_step", skip_serializing_if = "Option::is_none")]
    pub from_failed_step: Option<bool>,
    /// path of additional steps to descend into AFTER `step_id`. Each entry represents one level of nesting inside the spawned child of the previous level's container (BranchOne / sequential ForLoop iteration / Subflow). When non-empty, the actual restart point is the LAST entry's step_id.
    #[serde(rename = "nested_path", skip_serializing_if = "Option::is_none")]
    pub nested_path: Option<Vec<models::RestartFlowAtStepRequestNestedPathInner>>,
}

impl RestartFlowAtStepRequest {
    pub fn new(step_id: String) -> RestartFlowAtStepRequest {
        RestartFlowAtStepRequest {
            step_id,
            branch_or_iteration_n: None,
            flow_version: None,
            failed_only: None,
            from_failed_step: None,
            nested_path: None,
        }
    }
}