/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * 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 FlowPreview {
    #[serde(rename = "value")]
    pub value: Box<models::FlowValue>,
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
    /// The arguments to pass to the script or flow
    #[serde(rename = "args")]
    pub args: std::collections::HashMap<String, serde_json::Value>,
    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
    pub tag: Option<String>,
    #[serde(rename = "restarted_from", skip_serializing_if = "Option::is_none")]
    pub restarted_from: Option<Box<models::RestartedFrom>>,
}

impl FlowPreview {
    pub fn new(value: models::FlowValue, args: std::collections::HashMap<String, serde_json::Value>) -> FlowPreview {
        FlowPreview {
            value: Box::new(value),
            path: None,
            args,
            tag: None,
            restarted_from: None,
        }
    }
}

