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
62
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.699.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TriggerExtraProperty {
/// The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path.
#[serde(rename = "path")]
pub path: String,
/// Path to the script or flow to execute when triggered
#[serde(rename = "script_path")]
pub script_path: String,
/// The user or group this trigger runs as (permissioned_as)
#[serde(rename = "permissioned_as")]
pub permissioned_as: String,
/// Additional permissions for this trigger
#[serde(rename = "extra_perms")]
pub extra_perms: std::collections::HashMap<String, bool>,
/// The workspace this trigger belongs to
#[serde(rename = "workspace_id")]
pub workspace_id: String,
/// Username of the last person who edited this trigger
#[serde(rename = "edited_by")]
pub edited_by: String,
/// Timestamp of the last edit
#[serde(rename = "edited_at")]
pub edited_at: String,
/// True if script_path points to a flow, false if it points to a script
#[serde(rename = "is_flow")]
pub is_flow: bool,
#[serde(rename = "mode")]
pub mode: models::TriggerMode,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<String>>,
}
impl TriggerExtraProperty {
pub fn new(path: String, script_path: String, permissioned_as: String, extra_perms: std::collections::HashMap<String, bool>, workspace_id: String, edited_by: String, edited_at: String, is_flow: bool, mode: models::TriggerMode) -> TriggerExtraProperty {
TriggerExtraProperty {
path,
script_path,
permissioned_as,
extra_perms,
workspace_id,
edited_by,
edited_at,
is_flow,
mode,
labels: None,
}
}
}