windmill_api/models/
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.542.4
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 EmailTrigger {
16    #[serde(rename = "local_part")]
17    pub local_part: String,
18    #[serde(rename = "workspaced_local_part", skip_serializing_if = "Option::is_none")]
19    pub workspaced_local_part: Option<bool>,
20    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
21    pub error_handler_path: Option<String>,
22    /// The arguments to pass to the script or flow
23    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
24    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
25    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
26    pub retry: Option<Box<models::Retry>>,
27    #[serde(rename = "path")]
28    pub path: String,
29    #[serde(rename = "script_path")]
30    pub script_path: String,
31    #[serde(rename = "email")]
32    pub email: String,
33    #[serde(rename = "extra_perms")]
34    pub extra_perms: std::collections::HashMap<String, bool>,
35    #[serde(rename = "workspace_id")]
36    pub workspace_id: String,
37    #[serde(rename = "edited_by")]
38    pub edited_by: String,
39    #[serde(rename = "edited_at")]
40    pub edited_at: String,
41    #[serde(rename = "is_flow")]
42    pub is_flow: bool,
43}
44
45impl EmailTrigger {
46    pub fn new(local_part: String, 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) -> EmailTrigger {
47        EmailTrigger {
48            local_part,
49            workspaced_local_part: None,
50            error_handler_path: None,
51            error_handler_args: None,
52            retry: None,
53            path,
54            script_path,
55            email,
56            extra_perms,
57            workspace_id,
58            edited_by,
59            edited_at,
60            is_flow,
61        }
62    }
63}
64