windmill_api/models/
http_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 HttpTrigger {
16    #[serde(rename = "route_path")]
17    pub route_path: String,
18    #[serde(rename = "static_asset_config", skip_serializing_if = "Option::is_none")]
19    pub static_asset_config: Option<Box<serde_json::Value>>,
20    #[serde(rename = "http_method")]
21    pub http_method: models::HttpMethod,
22    #[serde(rename = "authentication_resource_path", skip_serializing_if = "Option::is_none")]
23    pub authentication_resource_path: Option<String>,
24    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
25    pub summary: Option<String>,
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    #[serde(rename = "is_async")]
29    pub is_async: bool,
30    #[serde(rename = "authentication_method")]
31    pub authentication_method: models::AuthenticationMethod,
32    #[serde(rename = "is_static_website")]
33    pub is_static_website: bool,
34    #[serde(rename = "workspaced_route")]
35    pub workspaced_route: bool,
36    #[serde(rename = "wrap_body")]
37    pub wrap_body: bool,
38    #[serde(rename = "raw_string")]
39    pub raw_string: bool,
40    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
41    pub error_handler_path: Option<String>,
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    #[serde(rename = "path")]
47    pub path: String,
48    #[serde(rename = "script_path")]
49    pub script_path: String,
50    #[serde(rename = "email")]
51    pub email: String,
52    #[serde(rename = "extra_perms")]
53    pub extra_perms: std::collections::HashMap<String, bool>,
54    #[serde(rename = "workspace_id")]
55    pub workspace_id: String,
56    #[serde(rename = "edited_by")]
57    pub edited_by: String,
58    #[serde(rename = "edited_at")]
59    pub edited_at: String,
60    #[serde(rename = "is_flow")]
61    pub is_flow: bool,
62}
63
64impl HttpTrigger {
65    pub fn new(route_path: String, http_method: models::HttpMethod, is_async: bool, authentication_method: models::AuthenticationMethod, is_static_website: bool, workspaced_route: bool, wrap_body: bool, raw_string: bool, path: String, script_path: String, email: String, extra_perms: std::collections::HashMap<String, bool>, workspace_id: String, edited_by: String, edited_at: String, is_flow: bool) -> HttpTrigger {
66        HttpTrigger {
67            route_path,
68            static_asset_config: None,
69            http_method,
70            authentication_resource_path: None,
71            summary: None,
72            description: None,
73            is_async,
74            authentication_method,
75            is_static_website,
76            workspaced_route,
77            wrap_body,
78            raw_string,
79            error_handler_path: None,
80            error_handler_args: None,
81            retry: None,
82            path,
83            script_path,
84            email,
85            extra_perms,
86            workspace_id,
87            edited_by,
88            edited_at,
89            is_flow,
90        }
91    }
92}
93