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 EditSqsTrigger {
    #[serde(rename = "queue_url")]
    pub queue_url: String,
    #[serde(rename = "aws_auth_resource_type")]
    pub aws_auth_resource_type: models::AwsAuthResourceType,
    #[serde(rename = "aws_resource_path")]
    pub aws_resource_path: String,
    #[serde(rename = "message_attributes", skip_serializing_if = "Option::is_none")]
    pub message_attributes: Option<Vec<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 = "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 EditSqsTrigger {
    pub fn new(queue_url: String, aws_auth_resource_type: models::AwsAuthResourceType, aws_resource_path: String, path: String, script_path: String, is_flow: bool, enabled: bool) -> EditSqsTrigger {
        EditSqsTrigger {
            queue_url,
            aws_auth_resource_type,
            aws_resource_path,
            message_attributes: None,
            path,
            script_path,
            is_flow,
            enabled,
            error_handler_path: None,
            error_handler_args: None,
            retry: None,
        }
    }
}