Skip to main content

windmill_api/models/
get_azure_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.726.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 GetAzureTrigger200Response {
16    #[serde(rename = "azure_resource_path")]
17    pub azure_resource_path: String,
18    #[serde(rename = "azure_mode")]
19    pub azure_mode: models::AzureMode,
20    /// ARM resource ID of the topic (basic) or namespace (namespace modes).
21    #[serde(rename = "scope_resource_id")]
22    pub scope_resource_id: String,
23    /// Topic name within the namespace (namespace modes only).
24    #[serde(rename = "topic_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub topic_name: Option<Option<String>>,
26    #[serde(rename = "subscription_name")]
27    pub subscription_name: String,
28    #[serde(rename = "event_type_filters", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub event_type_filters: Option<Option<Vec<String>>>,
30    #[serde(rename = "server_id", skip_serializing_if = "Option::is_none")]
31    pub server_id: Option<String>,
32    #[serde(rename = "last_server_ping", skip_serializing_if = "Option::is_none")]
33    pub last_server_ping: Option<String>,
34    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
35    pub error: Option<String>,
36    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
37    pub error_handler_path: Option<String>,
38    /// The arguments to pass to the script or flow
39    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
40    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
41    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
42    pub retry: Option<Box<models::Retry>>,
43    /// 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.
44    #[serde(rename = "path")]
45    pub path: String,
46    /// Path to the script or flow to execute when triggered
47    #[serde(rename = "script_path")]
48    pub script_path: String,
49    /// The user or group this trigger runs as (permissioned_as)
50    #[serde(rename = "permissioned_as")]
51    pub permissioned_as: String,
52    /// Additional permissions for this trigger
53    #[serde(rename = "extra_perms")]
54    pub extra_perms: std::collections::HashMap<String, bool>,
55    /// The workspace this trigger belongs to
56    #[serde(rename = "workspace_id")]
57    pub workspace_id: String,
58    /// Username of the last person who edited this trigger
59    #[serde(rename = "edited_by")]
60    pub edited_by: String,
61    /// Timestamp of the last edit
62    #[serde(rename = "edited_at")]
63    pub edited_at: String,
64    /// True if script_path points to a flow, false if it points to a script
65    #[serde(rename = "is_flow")]
66    pub is_flow: bool,
67    #[serde(rename = "mode")]
68    pub mode: models::TriggerMode,
69    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
70    pub labels: Option<Vec<String>>,
71    /// 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. 
72    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
73    pub draft_only: Option<bool>,
74    #[serde(rename = "is_draft")]
75    pub is_draft: bool,
76    #[serde(rename = "draft_saved_at", skip_serializing_if = "Option::is_none")]
77    pub draft_saved_at: Option<String>,
78    #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
79    pub no_deployed: Option<bool>,
80    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
81    pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
82    /// 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. 
83    #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
84    pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
85}
86
87impl GetAzureTrigger200Response {
88    pub fn new(azure_resource_path: String, azure_mode: models::AzureMode, scope_resource_id: String, subscription_name: 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) -> GetAzureTrigger200Response {
89        GetAzureTrigger200Response {
90            azure_resource_path,
91            azure_mode,
92            scope_resource_id,
93            topic_name: None,
94            subscription_name,
95            event_type_filters: None,
96            server_id: None,
97            last_server_ping: None,
98            error: None,
99            error_handler_path: None,
100            error_handler_args: None,
101            retry: None,
102            path,
103            script_path,
104            permissioned_as,
105            extra_perms,
106            workspace_id,
107            edited_by,
108            edited_at,
109            is_flow,
110            mode,
111            labels: None,
112            draft_only: None,
113            is_draft,
114            draft_saved_at: None,
115            no_deployed: None,
116            draft: None,
117            other_drafts_users: None,
118        }
119    }
120}
121