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
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.680.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// NativeTriggerData : Data for creating or updating a native trigger
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NativeTriggerData {
/// The path to the script or flow that will be triggered
#[serde(rename = "script_path")]
pub script_path: String,
/// Whether the trigger targets a flow (true) or a script (false)
#[serde(rename = "is_flow")]
pub is_flow: bool,
/// Service-specific configuration (e.g., event types, filters)
#[serde(rename = "service_config")]
pub service_config: std::collections::HashMap<String, serde_json::Value>,
/// Short summary to be displayed when listed
#[serde(rename = "summary", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub summary: Option<Option<String>>,
}
impl NativeTriggerData {
/// Data for creating or updating a native trigger
pub fn new(script_path: String, is_flow: bool, service_config: std::collections::HashMap<String, serde_json::Value>) -> NativeTriggerData {
NativeTriggerData {
script_path,
is_flow,
service_config,
summary: None,
}
}
}