Skip to main content

windmill_api/models/
flow_preview.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.721.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct FlowPreview {
16    #[serde(rename = "value")]
17    pub value: Box<models::FlowValue>,
18    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
19    pub path: Option<String>,
20    /// The arguments to pass to the script or flow
21    #[serde(rename = "args")]
22    pub args: std::collections::HashMap<String, serde_json::Value>,
23    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
24    pub tag: Option<String>,
25    #[serde(rename = "restarted_from", skip_serializing_if = "Option::is_none")]
26    pub restarted_from: Option<Box<models::RestartedFrom>>,
27    /// Map of relative-import script path -> temp storage hash, propagated to each flow step so inline-script relative imports resolve from not-yet-deployed local content instead of the deployed script
28    #[serde(rename = "temp_script_refs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub temp_script_refs: Option<Option<std::collections::HashMap<String, String>>>,
30}
31
32impl FlowPreview {
33    pub fn new(value: models::FlowValue, args: std::collections::HashMap<String, serde_json::Value>) -> FlowPreview {
34        FlowPreview {
35            value: Box::new(value),
36            path: None,
37            args,
38            tag: None,
39            restarted_from: None,
40            temp_script_refs: None,
41        }
42    }
43}
44