1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GetHttpTrigger200Response {
16 #[serde(rename = "route_path")]
18 pub route_path: String,
19 #[serde(rename = "static_asset_config", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21 pub static_asset_config: Option<Option<Box<serde_json::Value>>>,
22 #[serde(rename = "http_method")]
23 pub http_method: models::HttpMethod,
24 #[serde(rename = "authentication_resource_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26 pub authentication_resource_path: Option<Option<String>>,
27 #[serde(rename = "summary", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29 pub summary: Option<Option<String>>,
30 #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
32 pub description: Option<Option<String>>,
33 #[serde(rename = "request_type")]
34 pub request_type: models::HttpRequestType,
35 #[serde(rename = "authentication_method")]
36 pub authentication_method: models::AuthenticationMethod,
37 #[serde(rename = "is_static_website")]
39 pub is_static_website: bool,
40 #[serde(rename = "workspaced_route")]
42 pub workspaced_route: bool,
43 #[serde(rename = "wrap_body")]
45 pub wrap_body: bool,
46 #[serde(rename = "raw_string")]
48 pub raw_string: bool,
49 #[serde(rename = "allowed_origins", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
51 pub allowed_origins: Option<Option<Vec<String>>>,
52 #[serde(rename = "error_handler_path", skip_serializing_if = "Option::is_none")]
54 pub error_handler_path: Option<String>,
55 #[serde(rename = "error_handler_args", skip_serializing_if = "Option::is_none")]
57 pub error_handler_args: Option<std::collections::HashMap<String, serde_json::Value>>,
58 #[serde(rename = "retry", skip_serializing_if = "Option::is_none")]
59 pub retry: Option<Box<models::Retry>>,
60 #[serde(rename = "path")]
62 pub path: String,
63 #[serde(rename = "script_path")]
65 pub script_path: String,
66 #[serde(rename = "permissioned_as")]
68 pub permissioned_as: String,
69 #[serde(rename = "extra_perms")]
71 pub extra_perms: std::collections::HashMap<String, bool>,
72 #[serde(rename = "workspace_id")]
74 pub workspace_id: String,
75 #[serde(rename = "edited_by")]
77 pub edited_by: String,
78 #[serde(rename = "edited_at")]
80 pub edited_at: String,
81 #[serde(rename = "is_flow")]
83 pub is_flow: bool,
84 #[serde(rename = "mode")]
85 pub mode: models::TriggerMode,
86 #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
87 pub labels: Option<Vec<String>>,
88 #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
90 pub draft_only: Option<bool>,
91 #[serde(rename = "is_draft")]
92 pub is_draft: bool,
93 #[serde(rename = "draft_saved_at", skip_serializing_if = "Option::is_none")]
94 pub draft_saved_at: Option<String>,
95 #[serde(rename = "draft_base", skip_serializing_if = "Option::is_none")]
97 pub draft_base: Option<String>,
98 #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
99 pub no_deployed: Option<bool>,
100 #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
101 pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
102 #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
104 pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
105}
106
107impl GetHttpTrigger200Response {
108 pub fn new(route_path: String, http_method: models::HttpMethod, request_type: models::HttpRequestType, authentication_method: models::AuthenticationMethod, is_static_website: bool, workspaced_route: bool, wrap_body: bool, raw_string: bool, 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) -> GetHttpTrigger200Response {
109 GetHttpTrigger200Response {
110 route_path,
111 static_asset_config: None,
112 http_method,
113 authentication_resource_path: None,
114 summary: None,
115 description: None,
116 request_type,
117 authentication_method,
118 is_static_website,
119 workspaced_route,
120 wrap_body,
121 raw_string,
122 allowed_origins: None,
123 error_handler_path: None,
124 error_handler_args: None,
125 retry: None,
126 path,
127 script_path,
128 permissioned_as,
129 extra_perms,
130 workspace_id,
131 edited_by,
132 edited_at,
133 is_flow,
134 mode,
135 labels: None,
136 draft_only: None,
137 is_draft,
138 draft_saved_at: None,
139 draft_base: None,
140 no_deployed: None,
141 draft: None,
142 other_drafts_users: None,
143 }
144 }
145}
146