windmill-api 1.544.2

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.544.2
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EditPostgresTrigger {
    #[serde(rename = "replication_slot_name")]
    pub replication_slot_name: String,
    #[serde(rename = "publication_name")]
    pub publication_name: String,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "script_path")]
    pub script_path: String,
    #[serde(rename = "is_flow")]
    pub is_flow: bool,
    #[serde(rename = "enabled")]
    pub enabled: bool,
    #[serde(rename = "postgres_resource_path")]
    pub postgres_resource_path: String,
    #[serde(rename = "publication", skip_serializing_if = "Option::is_none")]
    pub publication: Option<Box<models::PublicationData>>,
    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
    pub error_handler_path: Option<String>,
    /// The arguments to pass to the script or flow
    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
    pub retry: Option<Box<models::Retry>>,
}

impl EditPostgresTrigger {
    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 {
        EditPostgresTrigger {
            replication_slot_name,
            publication_name,
            path,
            script_path,
            is_flow,
            enabled,
            postgres_resource_path,
            publication: None,
            error_handler_path: None,
            error_handler_args: None,
            retry: None,
        }
    }
}