/*
 * 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 RestartedFrom {
    #[serde(rename = "flow_job_id", skip_serializing_if = "Option::is_none")]
    pub flow_job_id: Option<uuid::Uuid>,
    #[serde(rename = "step_id", skip_serializing_if = "Option::is_none")]
    pub step_id: Option<String>,
    /// 0-based iteration index for ForLoop / branch index for BranchAll. Iterations 0..n-1 are preserved; iteration n is restarted.
    #[serde(rename = "branch_or_iteration_n", skip_serializing_if = "Option::is_none")]
    pub branch_or_iteration_n: Option<i32>,
    #[serde(rename = "flow_version", skip_serializing_if = "Option::is_none")]
    pub flow_version: Option<i32>,
    #[serde(rename = "branch_chosen", skip_serializing_if = "Option::is_none")]
    pub branch_chosen: Option<Box<models::RestartedFromBranchChosen>>,
    #[serde(rename = "nested", skip_serializing_if = "Option::is_none")]
    pub nested: Option<Box<models::RestartedFrom>>,
}

impl RestartedFrom {
    pub fn new() -> RestartedFrom {
        RestartedFrom {
            flow_job_id: None,
            step_id: None,
            branch_or_iteration_n: None,
            flow_version: None,
            branch_chosen: None,
            nested: None,
        }
    }
}

