Skip to main content

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.626.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    /// The full URL of the AWS SQS queue to poll for messages
17    #[serde(rename = "queue_url")]
18    pub queue_url: String,
19    #[serde(rename = "aws_auth_resource_type")]
20    pub aws_auth_resource_type: models::AwsAuthResourceType,
21    /// Path to the AWS resource containing credentials or OIDC configuration
22    #[serde(rename = "aws_resource_path")]
23    pub aws_resource_path: String,
24    /// Array of SQS message attribute names to include with each message
25    #[serde(rename = "message_attributes", skip_serializing_if = "Option::is_none")]
26    pub message_attributes: Option<Vec<String>>,
27    /// The unique path identifier for this trigger
28    #[serde(rename = "path")]
29    pub path: String,
30    /// Path to the script or flow to execute when a message is received
31    #[serde(rename = "script_path")]
32    pub script_path: String,
33    /// True if script_path points to a flow, false if it points to a script
34    #[serde(rename = "is_flow")]
35    pub is_flow: bool,
36    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
37    pub mode: Option<models::TriggerMode>,
38    /// Path to a script or flow to run when the triggered job fails
39    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
40    pub error_handler_path: Option<String>,
41    /// The arguments to pass to the script or flow
42    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
43    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
44    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
45    pub retry: Option<Box<models::Retry>>,
46}
47
48impl EditSqsTrigger {
49    pub fn new(queue_url: String, aws_auth_resource_type: models::AwsAuthResourceType, aws_resource_path: String, path: String, script_path: String, is_flow: bool) -> EditSqsTrigger {
50        EditSqsTrigger {
51            queue_url,
52            aws_auth_resource_type,
53            aws_resource_path,
54            message_attributes: None,
55            path,
56            script_path,
57            is_flow,
58            mode: None,
59            error_handler_path: None,
60            error_handler_args: None,
61            retry: None,
62        }
63    }
64}
65