windmill_api/models/
edit_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.575.2
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 EditHttpTrigger {
16    #[serde(rename = "path")]
17    pub path: String,
18    #[serde(rename = "script_path")]
19    pub script_path: String,
20    #[serde(rename = "route_path", skip_serializing_if = "Option::is_none")]
21    pub route_path: Option<String>,
22    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
23    pub summary: Option<String>,
24    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
25    pub description: Option<String>,
26    #[serde(rename = "workspaced_route", skip_serializing_if = "Option::is_none")]
27    pub workspaced_route: Option<bool>,
28    #[serde(rename = "static_asset_config", skip_serializing_if = "Option::is_none")]
29    pub static_asset_config: Option<Box<models::NewHttpTriggerStaticAssetConfig>>,
30    #[serde(rename = "authentication_resource_path", skip_serializing_if = "Option::is_none")]
31    pub authentication_resource_path: Option<String>,
32    #[serde(rename = "is_flow")]
33    pub is_flow: bool,
34    #[serde(rename = "http_method")]
35    pub http_method: models::HttpMethod,
36    /// Deprecated, use request_type instead
37    #[serde(rename = "is_async", skip_serializing_if = "Option::is_none")]
38    pub is_async: Option<bool>,
39    #[serde(rename = "request_type", skip_serializing_if = "Option::is_none")]
40    pub request_type: Option<models::HttpRequestType>,
41    #[serde(rename = "authentication_method")]
42    pub authentication_method: models::AuthenticationMethod,
43    #[serde(rename = "is_static_website")]
44    pub is_static_website: bool,
45    #[serde(rename = "wrap_body", skip_serializing_if = "Option::is_none")]
46    pub wrap_body: Option<bool>,
47    #[serde(rename = "raw_string", skip_serializing_if = "Option::is_none")]
48    pub raw_string: Option<bool>,
49    #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
50    pub error_handler_path: Option<String>,
51    /// The arguments to pass to the script or flow
52    #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
53    pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
54    #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
55    pub retry: Option<Box<models::Retry>>,
56}
57
58impl EditHttpTrigger {
59    pub fn new(path: String, script_path: String, is_flow: bool, http_method: models::HttpMethod, authentication_method: models::AuthenticationMethod, is_static_website: bool) -> EditHttpTrigger {
60        EditHttpTrigger {
61            path,
62            script_path,
63            route_path: None,
64            summary: None,
65            description: None,
66            workspaced_route: None,
67            static_asset_config: None,
68            authentication_resource_path: None,
69            is_flow,
70            http_method,
71            is_async: None,
72            request_type: None,
73            authentication_method,
74            is_static_website,
75            wrap_body: None,
76            raw_string: None,
77            error_handler_path: None,
78            error_handler_args: None,
79            retry: None,
80        }
81    }
82}
83