Skip to main content

windmill_api/models/
get_sqs_trigger_200_response.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.725.1
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 GetSqsTrigger200Response {
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", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub message_attributes: Option<Option<Vec<String>>>,
27    /// ID of the server currently handling this trigger (internal)
28    #[serde(rename = "server_id", skip_serializing_if = "Option::is_none")]
29    pub server_id: Option<String>,
30    /// Timestamp of last server heartbeat (internal)
31    #[serde(rename = "last_server_ping", skip_serializing_if = "Option::is_none")]
32    pub last_server_ping: Option<String>,
33    /// Last error message if the trigger failed
34    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
35    pub error: Option<String>,
36    /// Path to a script or flow to run when the triggered job fails
37    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
38    pub error_handler_path: Option<String>,
39    /// The arguments to pass to the script or flow
40    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
41    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
42    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
43    pub retry: Option<Box<models::Retry>>,
44    /// The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path.
45    #[serde(rename = "path")]
46    pub path: String,
47    /// Path to the script or flow to execute when triggered
48    #[serde(rename = "script_path")]
49    pub script_path: String,
50    /// The user or group this trigger runs as (permissioned_as)
51    #[serde(rename = "permissioned_as")]
52    pub permissioned_as: String,
53    /// Additional permissions for this trigger
54    #[serde(rename = "extra_perms")]
55    pub extra_perms: std::collections::HashMap<String, bool>,
56    /// The workspace this trigger belongs to
57    #[serde(rename = "workspace_id")]
58    pub workspace_id: String,
59    /// Username of the last person who edited this trigger
60    #[serde(rename = "edited_by")]
61    pub edited_by: String,
62    /// Timestamp of the last edit
63    #[serde(rename = "edited_at")]
64    pub edited_at: String,
65    /// True if script_path points to a flow, false if it points to a script
66    #[serde(rename = "is_flow")]
67    pub is_flow: bool,
68    #[serde(rename = "mode")]
69    pub mode: models::TriggerMode,
70    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
71    pub labels: Option<Vec<String>>,
72    /// True when this row is a per-user draft with no deployed trigger at the same path. Set by list endpoints when `include_draft_only=true` synthesizes the row from the draft. Frontend renders a \"Draft\" badge. 
73    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
74    pub draft_only: Option<bool>,
75    #[serde(rename = "is_draft")]
76    pub is_draft: bool,
77    #[serde(rename = "draft_saved_at", skip_serializing_if = "Option::is_none")]
78    pub draft_saved_at: Option<String>,
79    #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
80    pub no_deployed: Option<bool>,
81    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
82    pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
83    /// Other workspace users (and the legacy NULL-email row, if any) with a saved draft at the same path. Populated only on the authed user's \"get by path\" responses for kinds the editor surfaces a fork banner for (script, flow, app, raw_app). Empty / omitted for kinds without that UI. 
84    #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
85    pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
86}
87
88impl GetSqsTrigger200Response {
89    pub fn new(queue_url: String, aws_auth_resource_type: models::AwsAuthResourceType, aws_resource_path: String, path: String, script_path: String, permissioned_as: String, extra_perms: std::collections::HashMap<String, bool>, workspace_id: String, edited_by: String, edited_at: String, is_flow: bool, mode: models::TriggerMode, is_draft: bool) -> GetSqsTrigger200Response {
90        GetSqsTrigger200Response {
91            queue_url,
92            aws_auth_resource_type,
93            aws_resource_path,
94            message_attributes: None,
95            server_id: None,
96            last_server_ping: None,
97            error: None,
98            error_handler_path: None,
99            error_handler_args: None,
100            retry: None,
101            path,
102            script_path,
103            permissioned_as,
104            extra_perms,
105            workspace_id,
106            edited_by,
107            edited_at,
108            is_flow,
109            mode,
110            labels: None,
111            draft_only: None,
112            is_draft,
113            draft_saved_at: None,
114            no_deployed: None,
115            draft: None,
116            other_drafts_users: None,
117        }
118    }
119}
120