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.505.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 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    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
39    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
40    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
41    pub retry: Option<Box<models::Retry>>,
42    #[serde(rename = "path")]
43    pub path: String,
44    #[serde(rename = "script_path")]
45    pub script_path: String,
46    #[serde(rename = "email")]
47    pub email: String,
48    #[serde(rename = "extra_perms")]
49    pub extra_perms: std::collections::HashMap<String, bool>,
50    #[serde(rename = "workspace_id")]
51    pub workspace_id: String,
52    #[serde(rename = "edited_by")]
53    pub edited_by: String,
54    #[serde(rename = "edited_at")]
55    pub edited_at: String,
56    #[serde(rename = "is_flow")]
57    pub is_flow: bool,
58}
59
60impl GcpTrigger {
61    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 {
62        GcpTrigger {
63            gcp_resource_path,
64            topic_id,
65            subscription_id,
66            server_id: None,
67            delivery_type,
68            delivery_config: None,
69            subscription_mode,
70            last_server_ping: None,
71            error: None,
72            enabled,
73            error_handler_path: None,
74            error_handler_args: None,
75            retry: None,
76            path,
77            script_path,
78            email,
79            extra_perms,
80            workspace_id,
81            edited_by,
82            edited_at,
83            is_flow,
84        }
85    }
86}
87