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