Skip to main content

windmill_api/models/
get_gcp_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 GetGcpTrigger200Response {
16    /// Path to the GCP resource containing service account credentials for authentication.
17    #[serde(rename = "gcp_resource_path")]
18    pub gcp_resource_path: String,
19    /// Google Cloud Pub/Sub topic ID to subscribe to.
20    #[serde(rename = "topic_id")]
21    pub topic_id: String,
22    /// Google Cloud Pub/Sub subscription ID.
23    #[serde(rename = "subscription_id")]
24    pub subscription_id: String,
25    /// ID of the server currently handling this trigger (internal use).
26    #[serde(rename = "server_id", skip_serializing_if = "Option::is_none")]
27    pub server_id: Option<String>,
28    #[serde(rename = "delivery_type")]
29    pub delivery_type: models::DeliveryType,
30    #[serde(rename = "delivery_config", skip_serializing_if = "Option::is_none")]
31    pub delivery_config: Option<Box<models::PushConfig>>,
32    #[serde(rename = "subscription_mode")]
33    pub subscription_mode: models::SubscriptionMode,
34    /// Timestamp of last server heartbeat (internal use).
35    #[serde(rename = "last_server_ping", skip_serializing_if = "Option::is_none")]
36    pub last_server_ping: Option<String>,
37    /// Last error message if the trigger failed.
38    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
39    pub error: Option<String>,
40    /// Path to a script or flow to run when the triggered job fails.
41    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
42    pub error_handler_path: Option<String>,
43    /// The arguments to pass to the script or flow
44    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
45    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
46    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
47    pub retry: Option<Box<models::Retry>>,
48    /// 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.
49    #[serde(rename = "path")]
50    pub path: String,
51    /// Path to the script or flow to execute when triggered
52    #[serde(rename = "script_path")]
53    pub script_path: String,
54    /// The user or group this trigger runs as (permissioned_as)
55    #[serde(rename = "permissioned_as")]
56    pub permissioned_as: String,
57    /// Additional permissions for this trigger
58    #[serde(rename = "extra_perms")]
59    pub extra_perms: std::collections::HashMap<String, bool>,
60    /// The workspace this trigger belongs to
61    #[serde(rename = "workspace_id")]
62    pub workspace_id: String,
63    /// Username of the last person who edited this trigger
64    #[serde(rename = "edited_by")]
65    pub edited_by: String,
66    /// Timestamp of the last edit
67    #[serde(rename = "edited_at")]
68    pub edited_at: String,
69    /// True if script_path points to a flow, false if it points to a script
70    #[serde(rename = "is_flow")]
71    pub is_flow: bool,
72    #[serde(rename = "mode")]
73    pub mode: models::TriggerMode,
74    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
75    pub labels: Option<Vec<String>>,
76    /// 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. 
77    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
78    pub draft_only: Option<bool>,
79    #[serde(rename = "is_draft")]
80    pub is_draft: bool,
81    #[serde(rename = "draft_saved_at", skip_serializing_if = "Option::is_none")]
82    pub draft_saved_at: Option<String>,
83    #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
84    pub no_deployed: Option<bool>,
85    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
86    pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
87    /// 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. 
88    #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
89    pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
90}
91
92impl GetGcpTrigger200Response {
93    pub fn new(gcp_resource_path: String, topic_id: String, subscription_id: String, delivery_type: models::DeliveryType, subscription_mode: models::SubscriptionMode, 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) -> GetGcpTrigger200Response {
94        GetGcpTrigger200Response {
95            gcp_resource_path,
96            topic_id,
97            subscription_id,
98            server_id: None,
99            delivery_type,
100            delivery_config: None,
101            subscription_mode,
102            last_server_ping: None,
103            error: None,
104            error_handler_path: None,
105            error_handler_args: None,
106            retry: None,
107            path,
108            script_path,
109            permissioned_as,
110            extra_perms,
111            workspace_id,
112            edited_by,
113            edited_at,
114            is_flow,
115            mode,
116            labels: None,
117            draft_only: None,
118            is_draft,
119            draft_saved_at: None,
120            no_deployed: None,
121            draft: None,
122            other_drafts_users: None,
123        }
124    }
125}
126