windmill_api/models/
edit_email_trigger.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.543.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 EditEmailTrigger {
16    #[serde(rename = "path")]
17    pub path: String,
18    #[serde(rename = "script_path")]
19    pub script_path: String,
20    #[serde(rename = "local_part", skip_serializing_if = "Option::is_none")]
21    pub local_part: Option<String>,
22    #[serde(rename = "workspaced_local_part", skip_serializing_if = "Option::is_none")]
23    pub workspaced_local_part: Option<bool>,
24    #[serde(rename = "is_flow")]
25    pub is_flow: bool,
26    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
27    pub error_handler_path: Option<String>,
28    /// The arguments to pass to the script or flow
29    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
30    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
31    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
32    pub retry: Option<Box<models::Retry>>,
33}
34
35impl EditEmailTrigger {
36    pub fn new(path: String, script_path: String, is_flow: bool) -> EditEmailTrigger {
37        EditEmailTrigger {
38            path,
39            script_path,
40            local_part: None,
41            workspaced_local_part: None,
42            is_flow,
43            error_handler_path: None,
44            error_handler_args: None,
45            retry: None,
46        }
47    }
48}
49