windmill_api/models/
edit_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 EditPostgresTrigger {
16    #[serde(rename = "replication_slot_name")]
17    pub replication_slot_name: String,
18    #[serde(rename = "publication_name")]
19    pub publication_name: 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 EditPostgresTrigger {
35    pub fn new(replication_slot_name: String, publication_name: String, path: String, script_path: String, is_flow: bool, enabled: bool, postgres_resource_path: String) -> EditPostgresTrigger {
36        EditPostgresTrigger {
37            replication_slot_name,
38            publication_name,
39            path,
40            script_path,
41            is_flow,
42            enabled,
43            postgres_resource_path,
44            publication: None,
45        }
46    }
47}
48