Skip to main content

windmill_api/models/
trigger_extra_property.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.626.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 TriggerExtraProperty {
16    /// The unique path identifier for this trigger
17    #[serde(rename = "path")]
18    pub path: String,
19    /// Path to the script or flow to execute when triggered
20    #[serde(rename = "script_path")]
21    pub script_path: String,
22    /// Email of the user who owns this trigger, used for permissioned_as
23    #[serde(rename = "email")]
24    pub email: String,
25    /// Additional permissions for this trigger
26    #[serde(rename = "extra_perms")]
27    pub extra_perms: std::collections::HashMap<String, bool>,
28    /// The workspace this trigger belongs to
29    #[serde(rename = "workspace_id")]
30    pub workspace_id: String,
31    /// Username of the last person who edited this trigger
32    #[serde(rename = "edited_by")]
33    pub edited_by: String,
34    /// Timestamp of the last edit
35    #[serde(rename = "edited_at")]
36    pub edited_at: String,
37    /// True if script_path points to a flow, false if it points to a script
38    #[serde(rename = "is_flow")]
39    pub is_flow: bool,
40    #[serde(rename = "mode")]
41    pub mode: models::TriggerMode,
42}
43
44impl TriggerExtraProperty {
45    pub fn new(path: String, script_path: String, email: String, extra_perms: std::collections::HashMap<String, bool>, workspace_id: String, edited_by: String, edited_at: String, is_flow: bool, mode: models::TriggerMode) -> TriggerExtraProperty {
46        TriggerExtraProperty {
47            path,
48            script_path,
49            email,
50            extra_perms,
51            workspace_id,
52            edited_by,
53            edited_at,
54            is_flow,
55            mode,
56        }
57    }
58}
59