Skip to main content

windmill_api/models/
branch_all.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.863.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BranchAll : Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BranchAll {
17    /// Array of branches that all execute (either in parallel or sequentially)
18    #[serde(rename = "branches")]
19    pub branches: Vec<models::BranchAllBranchesInner>,
20    #[serde(rename = "type")]
21    pub r#type: Type,
22    /// If true, all branches execute concurrently. If false, they execute sequentially
23    #[serde(rename = "parallel", skip_serializing_if = "Option::is_none")]
24    pub parallel: Option<bool>,
25    #[serde(rename = "parallelism", skip_serializing_if = "Option::is_none")]
26    pub parallelism: Option<Box<models::InputTransform>>,
27}
28
29impl BranchAll {
30    /// Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently
31    pub fn new(branches: Vec<models::BranchAllBranchesInner>, r#type: Type) -> BranchAll {
32        BranchAll {
33            branches,
34            r#type,
35            parallel: None,
36            parallelism: None,
37        }
38    }
39}
40/// 
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Type {
43    #[serde(rename = "branchall")]
44    Branchall,
45}
46
47impl Default for Type {
48    fn default() -> Type {
49        Self::Branchall
50    }
51}
52