windmill_api/models/
gcp_trigger.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.539.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 GcpTrigger {
16    #[serde(rename = "gcp_resource_path")]
17    pub gcp_resource_path: String,
18    #[serde(rename = "topic_id")]
19    pub topic_id: String,
20    #[serde(rename = "subscription_id")]
21    pub subscription_id: String,
22    #[serde(rename = "server_id", skip_serializing_if = "Option::is_none")]
23    pub server_id: Option<String>,
24    #[serde(rename = "delivery_type")]
25    pub delivery_type: models::DeliveryType,
26    #[serde(rename = "delivery_config", skip_serializing_if = "Option::is_none")]
27    pub delivery_config: Option<Box<models::PushConfig>>,
28    #[serde(rename = "subscription_mode")]
29    pub subscription_mode: models::SubscriptionMode,
30    #[serde(rename = "last_server_ping", skip_serializing_if = "Option::is_none")]
31    pub last_server_ping: Option<String>,
32    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
33    pub error: Option<String>,
34    #[serde(rename = "enabled")]
35    pub enabled: bool,
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    #[serde(rename = "path")]
44    pub path: String,
45    #[serde(rename = "script_path")]
46    pub script_path: String,
47    #[serde(rename = "email")]
48    pub email: String,
49    #[serde(rename = "extra_perms")]
50    pub extra_perms: std::collections::HashMap<String, bool>,
51    #[serde(rename = "workspace_id")]
52    pub workspace_id: String,
53    #[serde(rename = "edited_by")]
54    pub edited_by: String,
55    #[serde(rename = "edited_at")]
56    pub edited_at: String,
57    #[serde(rename = "is_flow")]
58    pub is_flow: bool,
59}
60
61impl GcpTrigger {
62    pub fn new(gcp_resource_path: String, topic_id: String, subscription_id: String, delivery_type: models::DeliveryType, subscription_mode: models::SubscriptionMode, enabled: bool, path: String, script_path: String, email: String, extra_perms: std::collections::HashMap<String, bool>, workspace_id: String, edited_by: String, edited_at: String, is_flow: bool) -> GcpTrigger {
63        GcpTrigger {
64            gcp_resource_path,
65            topic_id,
66            subscription_id,
67            server_id: None,
68            delivery_type,
69            delivery_config: None,
70            subscription_mode,
71            last_server_ping: None,
72            error: None,
73            enabled,
74            error_handler_path: None,
75            error_handler_args: None,
76            retry: None,
77            path,
78            script_path,
79            email,
80            extra_perms,
81            workspace_id,
82            edited_by,
83            edited_at,
84            is_flow,
85        }
86    }
87}
88