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.501.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 = "path")]
37    pub path: String,
38    #[serde(rename = "script_path")]
39    pub script_path: String,
40    #[serde(rename = "email")]
41    pub email: String,
42    #[serde(rename = "extra_perms")]
43    pub extra_perms: std::collections::HashMap<String, bool>,
44    #[serde(rename = "workspace_id")]
45    pub workspace_id: String,
46    #[serde(rename = "edited_by")]
47    pub edited_by: String,
48    #[serde(rename = "edited_at")]
49    pub edited_at: String,
50    #[serde(rename = "is_flow")]
51    pub is_flow: bool,
52}
53
54impl GcpTrigger {
55    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 {
56        GcpTrigger {
57            gcp_resource_path,
58            topic_id,
59            subscription_id,
60            server_id: None,
61            delivery_type,
62            delivery_config: None,
63            subscription_mode,
64            last_server_ping: None,
65            error: None,
66            enabled,
67            path,
68            script_path,
69            email,
70            extra_perms,
71            workspace_id,
72            edited_by,
73            edited_at,
74            is_flow,
75        }
76    }
77}
78