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.592.1
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}
26
27impl BranchAll {
28    /// Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently
29    pub fn new(branches: Vec<models::BranchAllBranchesInner>, r#type: Type) -> BranchAll {
30        BranchAll {
31            branches,
32            r#type,
33            parallel: None,
34        }
35    }
36}
37/// 
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum Type {
40    #[serde(rename = "branchall")]
41    Branchall,
42}
43
44impl Default for Type {
45    fn default() -> Type {
46        Self::Branchall
47    }
48}
49