1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.683.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// PathScript : Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PathScript {
/// Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments
#[serde(rename = "input_transforms")]
pub input_transforms: std::collections::HashMap<String, models::InputTransform>,
/// Path to the script in the workspace (e.g., 'f/scripts/send_email')
#[serde(rename = "path")]
pub path: String,
/// Optional specific version hash of the script to use
#[serde(rename = "hash", skip_serializing_if = "Option::is_none")]
pub hash: Option<String>,
#[serde(rename = "type")]
pub r#type: Type,
/// Override the script's default worker group tag
#[serde(rename = "tag_override", skip_serializing_if = "Option::is_none")]
pub tag_override: Option<String>,
/// If true, this script is a trigger that can start the flow
#[serde(rename = "is_trigger", skip_serializing_if = "Option::is_none")]
pub is_trigger: Option<bool>,
}
impl PathScript {
/// Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code
pub fn new(input_transforms: std::collections::HashMap<String, models::InputTransform>, path: String, r#type: Type) -> PathScript {
PathScript {
input_transforms,
path,
hash: None,
r#type,
tag_override: None,
is_trigger: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "script")]
Script,
}
impl Default for Type {
fn default() -> Type {
Self::Script
}
}