windmill-api 1.681.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.681.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,
        }
    }
}