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.817.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 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    /// The deployed version the draft forked from, as text whatever the kind (script hash, flow version id, app version id). Compare to the deployed head to tell a draft that is behind. Absent when there is no draft or it was never forked from a deploy. 
79    #[serde(rename = "draft_base", skip_serializing_if = "Option::is_none")]
80    pub draft_base: Option<String>,
81    #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
82    pub no_deployed: Option<bool>,
83    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
84    pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
85    /// 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. 
86    #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
87    pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
88}
89
90impl GetAzureTrigger200Response {
91    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 {
92        GetAzureTrigger200Response {
93            azure_resource_path,
94            azure_mode,
95            scope_resource_id,
96            topic_name: None,
97            subscription_name,
98            event_type_filters: None,
99            server_id: None,
100            last_server_ping: None,
101            error: None,
102            error_handler_path: None,
103            error_handler_args: None,
104            retry: None,
105            path,
106            script_path,
107            permissioned_as,
108            extra_perms,
109            workspace_id,
110            edited_by,
111            edited_at,
112            is_flow,
113            mode,
114            labels: None,
115            draft_only: None,
116            is_draft,
117            draft_saved_at: None,
118            draft_base: None,
119            no_deployed: None,
120            draft: None,
121            other_drafts_users: None,
122        }
123    }
124}
125