Skip to main content

windmill_api/models/
restart_flow_at_step_request.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.697.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RestartFlowAtStepRequest {
16    /// top-level step id to restart the flow from (or the outermost container when restarting at a nested step)
17    #[serde(rename = "step_id")]
18    pub step_id: String,
19    /// for branchall or loop at the top level, the iteration at which the flow should restart (optional)
20    #[serde(rename = "branch_or_iteration_n", skip_serializing_if = "Option::is_none")]
21    pub branch_or_iteration_n: Option<i32>,
22    /// specific flow version to use for restart (optional, uses current version if not specified)
23    #[serde(rename = "flow_version", skip_serializing_if = "Option::is_none")]
24    pub flow_version: Option<i32>,
25    /// 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.
26    #[serde(rename = "nested_path", skip_serializing_if = "Option::is_none")]
27    pub nested_path: Option<Vec<models::RestartFlowAtStepRequestNestedPathInner>>,
28}
29
30impl RestartFlowAtStepRequest {
31    pub fn new(step_id: String) -> RestartFlowAtStepRequest {
32        RestartFlowAtStepRequest {
33            step_id,
34            branch_or_iteration_n: None,
35            flow_version: None,
36            nested_path: None,
37        }
38    }
39}
40