Skip to main content

windmill_api/models/
get_email_trigger_200_response.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.725.1
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 GetEmailTrigger200Response {
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    /// The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path.
28    #[serde(rename = "path")]
29    pub path: String,
30    /// Path to the script or flow to execute when triggered
31    #[serde(rename = "script_path")]
32    pub script_path: String,
33    /// The user or group this trigger runs as (permissioned_as)
34    #[serde(rename = "permissioned_as")]
35    pub permissioned_as: String,
36    /// Additional permissions for this trigger
37    #[serde(rename = "extra_perms")]
38    pub extra_perms: std::collections::HashMap<String, bool>,
39    /// The workspace this trigger belongs to
40    #[serde(rename = "workspace_id")]
41    pub workspace_id: String,
42    /// Username of the last person who edited this trigger
43    #[serde(rename = "edited_by")]
44    pub edited_by: String,
45    /// Timestamp of the last edit
46    #[serde(rename = "edited_at")]
47    pub edited_at: String,
48    /// True if script_path points to a flow, false if it points to a script
49    #[serde(rename = "is_flow")]
50    pub is_flow: bool,
51    #[serde(rename = "mode")]
52    pub mode: models::TriggerMode,
53    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
54    pub labels: Option<Vec<String>>,
55    /// True when this row is a per-user draft with no deployed trigger at the same path. Set by list endpoints when `include_draft_only=true` synthesizes the row from the draft. Frontend renders a \"Draft\" badge. 
56    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
57    pub draft_only: Option<bool>,
58    #[serde(rename = "is_draft")]
59    pub is_draft: bool,
60    #[serde(rename = "draft_saved_at", skip_serializing_if = "Option::is_none")]
61    pub draft_saved_at: Option<String>,
62    #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
63    pub no_deployed: Option<bool>,
64    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
65    pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
66    /// Other workspace users (and the legacy NULL-email row, if any) with a saved draft at the same path. Populated only on the authed user's \"get by path\" responses for kinds the editor surfaces a fork banner for (script, flow, app, raw_app). Empty / omitted for kinds without that UI. 
67    #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
68    pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
69}
70
71impl GetEmailTrigger200Response {
72    pub fn new(local_part: String, path: String, script_path: String, permissioned_as: String, extra_perms: std::collections::HashMap<String, bool>, workspace_id: String, edited_by: String, edited_at: String, is_flow: bool, mode: models::TriggerMode, is_draft: bool) -> GetEmailTrigger200Response {
73        GetEmailTrigger200Response {
74            local_part,
75            workspaced_local_part: None,
76            error_handler_path: None,
77            error_handler_args: None,
78            retry: None,
79            path,
80            script_path,
81            permissioned_as,
82            extra_perms,
83            workspace_id,
84            edited_by,
85            edited_at,
86            is_flow,
87            mode,
88            labels: None,
89            draft_only: None,
90            is_draft,
91            draft_saved_at: None,
92            no_deployed: None,
93            draft: None,
94            other_drafts_users: None,
95        }
96    }
97}
98