1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.683.1
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// ForloopFlow : Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ForloopFlow {
/// Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value'
#[serde(rename = "modules")]
pub modules: Vec<models::FlowModule>,
#[serde(rename = "iterator")]
pub iterator: Box<models::InputTransform>,
/// If true, iteration failures don't stop the loop. Failed iterations return null
#[serde(rename = "skip_failures")]
pub skip_failures: bool,
#[serde(rename = "type")]
pub r#type: Type,
/// If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency
#[serde(rename = "parallel", skip_serializing_if = "Option::is_none")]
pub parallel: Option<bool>,
#[serde(rename = "parallelism", skip_serializing_if = "Option::is_none")]
pub parallelism: Option<Box<models::InputTransform>>,
#[serde(rename = "squash", skip_serializing_if = "Option::is_none")]
pub squash: Option<bool>,
}
impl ForloopFlow {
/// Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations
pub fn new(modules: Vec<models::FlowModule>, iterator: models::InputTransform, skip_failures: bool, r#type: Type) -> ForloopFlow {
ForloopFlow {
modules,
iterator: Box::new(iterator),
skip_failures,
r#type,
parallel: None,
parallelism: None,
squash: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "forloopflow")]
Forloopflow,
}
impl Default for Type {
fn default() -> Type {
Self::Forloopflow
}
}