/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.6
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BranchOneBranchesInner {
    /// Short description of this branch condition
    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
    pub summary: Option<String>,
    /// JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins
    #[serde(rename = "expr")]
    pub expr: String,
    /// Steps to execute if this branch's expr is true
    #[serde(rename = "modules")]
    pub modules: Vec<models::FlowModule>,
}

impl BranchOneBranchesInner {
    pub fn new(expr: String, modules: Vec<models::FlowModule>) -> BranchOneBranchesInner {
        BranchOneBranchesInner {
            summary: None,
            expr,
            modules,
        }
    }
}

