windmill_api/models/
edit_sqs_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.512.0
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 EditSqsTrigger {
16    #[serde(rename = "queue_url")]
17    pub queue_url: String,
18    #[serde(rename = "aws_auth_resource_type")]
19    pub aws_auth_resource_type: models::AwsAuthResourceType,
20    #[serde(rename = "aws_resource_path")]
21    pub aws_resource_path: String,
22    #[serde(rename = "message_attributes", skip_serializing_if = "Option::is_none")]
23    pub message_attributes: Option<Vec<String>>,
24    #[serde(rename = "path")]
25    pub path: String,
26    #[serde(rename = "script_path")]
27    pub script_path: String,
28    #[serde(rename = "is_flow")]
29    pub is_flow: bool,
30    #[serde(rename = "enabled")]
31    pub enabled: bool,
32    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
33    pub error_handler_path: Option<String>,
34    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
35    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
36    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
37    pub retry: Option<Box<models::Retry>>,
38}
39
40impl EditSqsTrigger {
41    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 {
42        EditSqsTrigger {
43            queue_url,
44            aws_auth_resource_type,
45            aws_resource_path,
46            message_attributes: None,
47            path,
48            script_path,
49            is_flow,
50            enabled,
51            error_handler_path: None,
52            error_handler_args: None,
53            retry: None,
54        }
55    }
56}
57