windmill_api/models/native_trigger_data.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.617.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// NativeTriggerData : Data for creating or updating a native trigger
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct NativeTriggerData {
17 /// The path to the script or flow that will be triggered
18 #[serde(rename = "script_path")]
19 pub script_path: String,
20 /// Whether the trigger targets a flow (true) or a script (false)
21 #[serde(rename = "is_flow")]
22 pub is_flow: bool,
23 /// Service-specific configuration (e.g., event types, filters)
24 #[serde(rename = "service_config")]
25 pub service_config: std::collections::HashMap<String, serde_json::Value>,
26}
27
28impl NativeTriggerData {
29 /// Data for creating or updating a native trigger
30 pub fn new(script_path: String, is_flow: bool, service_config: std::collections::HashMap<String, serde_json::Value>) -> NativeTriggerData {
31 NativeTriggerData {
32 script_path,
33 is_flow,
34 service_config,
35 }
36 }
37}
38