windmill_api/models/
new_postgres_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.500.2
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 NewPostgresTrigger {
16    #[serde(rename = "replication_slot_name", skip_serializing_if = "Option::is_none")]
17    pub replication_slot_name: Option<String>,
18    #[serde(rename = "publication_name", skip_serializing_if = "Option::is_none")]
19    pub publication_name: Option<String>,
20    #[serde(rename = "path")]
21    pub path: String,
22    #[serde(rename = "script_path")]
23    pub script_path: String,
24    #[serde(rename = "is_flow")]
25    pub is_flow: bool,
26    #[serde(rename = "enabled")]
27    pub enabled: bool,
28    #[serde(rename = "postgres_resource_path")]
29    pub postgres_resource_path: String,
30    #[serde(rename = "publication", skip_serializing_if = "Option::is_none")]
31    pub publication: Option<Box<models::PublicationData>>,
32}
33
34impl NewPostgresTrigger {
35    pub fn new(path: String, script_path: String, is_flow: bool, enabled: bool, postgres_resource_path: String) -> NewPostgresTrigger {
36        NewPostgresTrigger {
37            replication_slot_name: None,
38            publication_name: None,
39            path,
40            script_path,
41            is_flow,
42            enabled,
43            postgres_resource_path,
44            publication: None,
45        }
46    }
47}
48